User → AI Assistant (Claude/Cursor)
↓ MCP Protocol @frihet/mcp-server (npm)
↓ REST API calls api.frihet.io/v1
↓ Auth (X-API-Key) Firebase Cloud Functions
↓ Firestore CODE_BLOCK: User → AI Assistant (Claude/Cursor)
↓ MCP Protocol @frihet/mcp-server (npm)
↓ REST API calls api.frihet.io/v1
↓ Auth (X-API-Key) Firebase Cloud Functions
↓ Firestore CODE_BLOCK: User → AI Assistant (Claude/Cursor)
↓ MCP Protocol @frihet/mcp-server (npm)
↓ REST API calls api.frihet.io/v1
↓ Auth (X-API-Key) Firebase Cloud Functions
↓ Firestore CODE_BLOCK: { "mcpServers": { "frihet": { "command": "npx", "args": ["-y", "@frihet/mcp-server"], "env": { "FRIHET_API_KEY": "fri_your_key" } } } } CODE_BLOCK: { "mcpServers": { "frihet": { "command": "npx", "args": ["-y", "@frihet/mcp-server"], "env": { "FRIHET_API_KEY": "fri_your_key" } } } } CODE_BLOCK: { "mcpServers": { "frihet": { "command": "npx", "args": ["-y", "@frihet/mcp-server"], "env": { "FRIHET_API_KEY": "fri_your_key" } } } } CODE_BLOCK: name: "create_invoice" description: "Creates an invoice" CODE_BLOCK: name: "create_invoice" description: "Creates an invoice" CODE_BLOCK: name: "create_invoice" description: "Creates an invoice" CODE_BLOCK: name: "create_invoice" description: "Create a new invoice for a client. Requires client_id, at least one line item with description and amount. Optionally accepts tax_rate, due_date, currency, and notes. Returns the created invoice with assigned number and calculated totals." CODE_BLOCK: name: "create_invoice" description: "Create a new invoice for a client. Requires client_id, at least one line item with description and amount. Optionally accepts tax_rate, due_date, currency, and notes. Returns the created invoice with assigned number and calculated totals." CODE_BLOCK: name: "create_invoice" description: "Create a new invoice for a client. Requires client_id, at least one line item with description and amount. Optionally accepts tax_rate, due_date, currency, and notes. Returns the created invoice with assigned number and calculated totals." CODE_BLOCK: npx @frihet/mcp-server CODE_BLOCK: npx @frihet/mcp-server CODE_BLOCK: npx @frihet/mcp-server
- API = for developers who write code
- MCP = for anyone who uses an AI assistant - "Create invoice for [client] for [amount]" — Most common. The AI resolves the client by name, applies tax rules, assigns the number. - "Show unpaid invoices older than 30 days" — Uses search_invoices with filters. The AI formats results into a readable summary. - "What's my total revenue this quarter?" — Combines multiple API calls. The AI calculates totals from invoice data. - "Record a 47.50 EUR fuel expense from yesterday" — Creates expense with correct date, category suggestion, and VAT deduction.