fortnox — Claude Code MCP server for Fortnox accounting
Wires the Fortnox accounting system into your AI agent: invoices, customers, suppliers, vouchers and reports. Handy when the books live in Fortnox.
claude mcp add fortnox -e FORTNOX_CLIENT_ID=<FORTNOX_CLIENT_ID> -e FORTNOX_CLIENT_SECRET=<FORTNOX_CLIENT_SECRET> -e FORTNOX_REFRESH_TOKEN=<FORTNOX_REFRESH_TOKEN> -- npx -y fortnox-mcp-serverWhat fortnox does
The server exposes Fortnox to an agent over MCP. It covers customers and suppliers, invoice creation and editing, credit notes, emailing invoices, sales orders, supplier invoices and the chart of accounts. A separate group of tools handles analytics: invoice totals for a period, top customers by revenue, an unpaid invoice report, cash flow forecasting, a sales funnel from offers to invoices, period comparisons and gross margin trends.
Two modes are available. Remote mode needs only the URL https://fortnox-mcp.vercel.app/mcp plus a browser authorization — no credentials of your own. Local mode is for self-hosting and reads FORTNOX_CLIENT_ID, FORTNOX_CLIENT_SECRET and FORTNOX_REFRESH_TOKEN from the Fortnox developer portal. Transport defaults to stdio; switch it to http and set PORT if you prefer.
Local runs go through npx -y fortnox-mcp-server. The refresh token matters only for the first start, since it gets persisted afterwards and the access token refreshes on its own. Self-hosting the remote variant means setting AUTH_MODE=remote, SERVER_URL and JWT_SECRET — skip them and the server will not come up.
What it helps with
- raise an invoice and email it to the customer
- list customers with unpaid invoices
- issue a credit note for a wrong invoice
- create a manual voucher against the chart of accounts
- rank top customers by revenue for a quarter
Example prompts for the agent
- Show unpaid invoices from last month
- Create an invoice for a customer and email it
- Compare this year's revenue with last year
How to install fortnox
Platform CLI
claude mcp add fortnox -e FORTNOX_CLIENT_ID=<FORTNOX_CLIENT_ID> -e FORTNOX_CLIENT_SECRET=<FORTNOX_CLIENT_SECRET> -e FORTNOX_REFRESH_TOKEN=<FORTNOX_REFRESH_TOKEN> -- npx -y fortnox-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add fortnox --env FORTNOX_CLIENT_ID=<FORTNOX_CLIENT_ID> --env FORTNOX_CLIENT_SECRET=<FORTNOX_CLIENT_SECRET> --env FORTNOX_REFRESH_TOKEN=<FORTNOX_REFRESH_TOKEN> -- npx -y fortnox-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"fortnox": {
"command": "npx",
"args": [
"-y",
"fortnox-mcp-server"
],
"env": {
"FORTNOX_CLIENT_ID": "<FORTNOX_CLIENT_ID>",
"FORTNOX_CLIENT_SECRET": "<FORTNOX_CLIENT_SECRET>",
"FORTNOX_REFRESH_TOKEN": "<FORTNOX_REFRESH_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"fortnox": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"fortnox-mcp-server"
],
"env": {
"FORTNOX_CLIENT_ID": "<FORTNOX_CLIENT_ID>",
"FORTNOX_CLIENT_SECRET": "<FORTNOX_CLIENT_SECRET>",
"FORTNOX_REFRESH_TOKEN": "<FORTNOX_REFRESH_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e FORTNOX_CLIENT_ID=<FORTNOX_CLIENT_ID> -e FORTNOX_CLIENT_SECRET=<FORTNOX_CLIENT_SECRET> -e FORTNOX_REFRESH_TOKEN=<FORTNOX_REFRESH_TOKEN> fortnox npx -y fortnox-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fortnox
How do I install fortnox in Claude Code?
Run `claude mcp add fortnox -e FORTNOX_CLIENT_ID=<FORTNOX_CLIENT_ID> -e FORTNOX_CLIENT_SECRET=<FORTNOX_CLIENT_SECRET> -e FORTNOX_REFRESH_TOKEN=<FORTNOX_REFRESH_TOKEN> -- npx -y fortnox-mcp-server`, filling in the values from your Fortnox developer app.
What does fortnox do?
It gives the agent Fortnox tools for customers, invoices, suppliers, orders, accounts and vouchers, plus reporting such as cash flow forecasts and sales funnel analysis.
Can I use it without my own Fortnox credentials?
Yes. Remote mode only asks you to add https://fortnox-mcp.vercel.app/mcp and authorize in the browser. Your own FORTNOX_CLIENT_ID and FORTNOX_CLIENT_SECRET are needed for local hosting.