Fortnox MCP server: connect Claude to Fortnox bookkeeping and invoices

fortnox-mcp is an open-source MCP server for Fortnox, built by Walma. It reads invoices, supplier invoices, vouchers and accounts through the Fortnox API, builds income statements, balance sheets and AR/AP ageing from SIE, and only ever creates drafts. Setup for Claude Code, Claude Desktop and Cursor.

Walma Engineering·Updated 15 October 2026·7 min read

Fortnox is the accounting system behind a large share of Swedish small and mid-sized companies. fortnox-mcp lets Claude, ChatGPT, Cursor or any MCP client read it: unpaid invoices, the quarter's result, what is owed to suppliers, cash in the bank.

We built it because Fortnox has no MCP server of its own, and because we had already solved the hard parts in our own production Fortnox integration. The code is open source at github.com/Walma-Labs/fortnox-mcp under the MIT licence. It is unofficial and not affiliated with Fortnox AB. A longer Swedish version of this guide is Fortnox MCP på svenska.

What it reads

AreaTools
Companyget_company_info (details, financial years, locked period), list_financial_years
Customer invoiceslist_invoices, get_invoice, list_invoice_payments
Supplier invoiceslist_supplier_invoices (including those awaiting approval), get_supplier_invoice
Registerscustomers, suppliers, articles, orders, offers, projects, cost centres
Bookkeepinglist_accounts (with opening and closing balances), list_vouchers, get_voucher
Reportsincome_statement, balance_sheet, account_totals_by_month, receivables_aging, payables_aging
Everything elselist_endpoints and fortnox_get: every other read endpoint in the Fortnox API

The reports are the point. The Fortnox API has no income-statement or balance-sheet endpoint, and building them from vouchers costs one request per voucher under a limit of 25 requests per 5 seconds. The SIE 4 export holds the same data in one request, so fortnox-mcp fetches it once per financial year and computes a profit and loss for any period (grouped by the Swedish BAS chart of accounts), a balance sheet on any date, monthly totals for any account range, and receivables and payables ageing by days past due.

The rest of the API (assets, contracts, employees, salaries, price lists, warehouse) is reachable through fortnox_get, but only via an allowlist generated from Fortnox's published OpenAPI document. Endpoints that send something (email, e-invoice, print) or return files are not on it.

What it does not do

Write tools are not registered unless FORTNOX_ENABLE_WRITES=true, and then they only create drafts: create_customer, create_offer, create_order and create_invoice_draft (neither booked nor sent). Each returns a preview of the exact request first and needs confirm: true. Bookkeeping, payments, sending and deleting are not in the server at all.

Setup

  1. Create an app in the Fortnox Developer Portal (you get a test company). Set the redirect URI to http://localhost:8765/callback and enable the scopes you need. The default set is companyinformation bookkeeping invoice customer supplierinvoice supplier article payment settings; each scope is also a licence the approving user must hold.
  2. Connect the company:
    git clone https://github.com/Walma-Labs/fortnox-mcp.git
    cd fortnox-mcp && npm install
    FORTNOX_CLIENT_ID=… FORTNOX_CLIENT_SECRET=… node dist/cli.js login
    

    Approve in the browser. Tokens are saved to ~/.config/fortnox-mcp/tokens.json (mode 600) and refreshed automatically.
  3. Add it to Claude Code:
    claude mcp add fortnox \
      -e FORTNOX_CLIENT_ID=… -e FORTNOX_CLIENT_SECRET=… \
      -- node /path/to/fortnox-mcp/dist/cli.js
    

    For Claude Desktop and Cursor, use the same command and environment in claude_desktop_config.json or .cursor/mcp.json; see adding an MCP server to Claude Desktop.

Fortnox API details worth knowing

  • Refresh tokens rotate. Each refresh invalidates the old one at once, so the new one must be saved before use; fortnox-mcp does that and shares one refresh between concurrent calls.
  • A token chain dies after 45 days unused. Use the server at least monthly and you never log in again.
  • List views show totals including VAT. Net amounts are on the detail view only; the reports work from the books and avoid the issue.
  • SIE files are CP437, not UTF-8.
  • Every scope is a licence. Asking for one the user lacks fails the whole authorization.

Bookkeeping data and where it goes

An MCP server passes what it reads to your AI client and on to that client's model provider. For bookkeeping, with customer names, salaries and margins in every answer, that matters. Walma AI Hub runs Claude and GPT in your own EU region with servers like fortnox-mcp behind a gateway with per-user access and a full log. See AI for finance teams.

Frequently asked questions

Does Fortnox have an official MCP server?+

No. Fortnox does not publish its own MCP server. There are commercial MCP apps in Fortnox's integration store, community servers on GitHub, and fortnox-mcp, which Walma built and released under the MIT licence at github.com/Walma-Labs/fortnox-mcp. It is not affiliated with or endorsed by Fortnox AB.

What do I need to use the Fortnox API?+

A developer account in Fortnox's Developer Portal, where you create an app and get a client ID and client secret. Fortnox uses OAuth 2.0: a user at the company approves the app and its scopes, and each scope requires the matching licence on that user. The company normally needs the Fortnox Integration licence to connect integrations through the API.

Can the AI book or send invoices in Fortnox?+

Not with fortnox-mcp. It is read-only by default; write tools only exist with FORTNOX_ENABLE_WRITES=true, and even then they create drafts: customers, offers, orders and invoices that are neither booked nor sent. Every write returns a preview first and needs explicit confirmation.

Can I get an income statement from the Fortnox API?+

Not from an endpoint; the Fortnox API has none for income statements or balance sheets. fortnox-mcp builds them from the SIE 4 export, which contains a whole financial year's vouchers in one request, so the figures match the books for any period.

What is the Fortnox API rate limit?+

25 requests per 5 seconds per access token (300 a minute). fortnox-mcp paces its calls under that limit and retries 429s, but never retries a POST after a server error, since the document may already exist.

Walma AI Hub

The same tools, in your EU region, under your control

A 20-minute walkthrough with an engineer. We map it to your tools, your MCP servers and your budget model.

About AI Hub