---
title: "Connect Fortnox to Claude: Track Suppliers, Sales and Inventory"
slug: connect-fortnox-to-claude-track-suppliers-sales-and-inventory
date: 2026-09-16
author: Riya Sethi
categories: ["AI & Agents"]
excerpt: "Learn how to connect Fortnox to claude using Truto. Step-by-step guide to tool calling, API quirks, and autonomous workflows."
canonical: https://truto.one/blog/connect-fortnox-to-claude-track-suppliers-sales-and-inventory/
---

# Connect Fortnox to Claude: Track Suppliers, Sales and Inventory


If your team needs to connect Fortnox to Claude to automate sales invoicing, audit supply chains, or retrieve real-time customer data, you need a [Model Context Protocol (MCP) server](https://truto.one/model-context-protocol-mcp-guide/). This server acts as the translation layer between Claude's natural language tool calls and Fortnox's REST APIs. You can either build and maintain this infrastructure yourself, or use a [managed integration platform](https://truto.one/why-use-a-unified-api-for-ai-integrations/) like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on [connecting Fortnox to ChatGPT](https://truto.one/connect-fortnox-to-chatgpt-manage-invoicing-and-customer-data/) or explore our broader architectural overview on [connecting Fortnox to AI Agents](https://truto.one/connect-fortnox-to-ai-agents-automate-billing-and-erp-tasks/).

Giving a Large Language Model (LLM) read and write access to a sprawling financial and ERP ecosystem like Fortnox is an engineering challenge. You must handle complex authentication token lifecycles, map massive JSON schemas to MCP tool definitions, and deal with Fortnox's strict API quotas. Every time Fortnox updates an endpoint or changes a VAT calculation requirement, you have to update your custom server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Fortnox, connect it natively to Claude, and execute complex ERP workflows using natural language.

> Want to give your AI agents secure, authenticated access to Fortnox and 100+ other SaaS APIs? Let's talk about managed MCP architecture.
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the Fortnox API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against Fortnox's APIs is painful. You are not just integrating a simple database - you are integrating a highly regulated accounting, sales, and supply chain system with strict domain validation.

If you decide to build a custom MCP server for Fortnox, you own the entire API lifecycle. Here are the specific challenges you will face:

### Heavily Nested Financial Schemas
Fortnox requires exactingly structured JSON payloads for write operations. Creating an invoice is not a simple flat object. It requires a primary customer reference, correct invoice dates, and an array of `InvoiceRows` where each row must specify an article number, delivered quantity, price, and VAT rules. An LLM cannot simply guess this payload structure. A managed MCP server exposes tools with strictly defined `body_schema` parameters derived directly from Fortnox's API documentation, explicitly guiding the LLM to format the nested arrays correctly before the network request is ever made.

### Strict Rate Limiting and Backoff
When interacting with Fortnox, rate limits are a mathematical certainty. Financial APIs enforce strict throttling to protect their databases. It is critical to understand that Truto does not automatically retry, throttle, or apply backoff on rate limit errors. When the Fortnox API returns an HTTP 429 Too Many Requests, Truto passes that exact error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF spec. The caller - whether it is [Claude Desktop](https://truto.one/connect-claude-desktop-to-any-saas-api/), a custom LangChain agent, or your backend - is entirely responsible for reading these headers and implementing its own retry and backoff logic. Do not expect the integration layer to absorb poor LLM planning.

### Relational Entity Coupling
Fortnox enforces strict relational integrity. You cannot delete a customer who has associated invoices, and you cannot create an invoice for an article number that does not exist in the master inventory list. LLMs often attempt to hallucinate ID strings or execute operations out of order. Your MCP server must present the tools in a way that forces the model to search for existing entities (like `get_single_fortnox_article_by_id`) before attempting to use those IDs in subsequent mutations.

## Generating the Fortnox MCP Server

Truto derives MCP tools dynamically from the integration's documented endpoints. Rather than hand-coding a Fortnox integration, Truto maps Fortnox's [OpenAPI specifications](https://truto.one/how-truto-uses-openapi-to-generate-mcp-tools/) and documentation into an execution-ready JSON-RPC 2.0 endpoint.

You can generate your Fortnox MCP server using two methods: the Truto UI or the API.

### Method 1: Via the Truto UI

This method is ideal for operators setting up Claude Desktop for internal team use.

1. Navigate to the **Integrated Accounts** page in your Truto dashboard and select your connected Fortnox account.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Configure the server name (e.g., "Fortnox Sales Ops"), select allowable methods (e.g., `read`, `write`), and assign any required tags.
5. Click **Create** and copy the generated MCP server URL (e.g., `https://api.truto.one/mcp/a1b2c3d4e5f6...`).

### Method 2: Via the Truto API

For developers programmatically provisioning AI access for their own end-users, you can generate the MCP server dynamically via a REST call.

Make a `POST` request to `/integrated-account/:id/mcp`:

```typescript
const response = await fetch('https://api.truto.one/integrated-account/YOUR_ACCOUNT_ID/mcp', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TRUTO_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: "Fortnox automated billing agent",
    config: {
      methods: ["read", "write"], // Allow both queries and mutations
      require_api_token_auth: false
    }
  })
});

const mcpServer = await response.json();
console.log(mcpServer.url); // Pass this URL to your MCP client
```

This creates a secure, self-contained server endpoint. The token in the URL cryptographically encodes the specific integrated account and configuration, removing the need for complex OAuth flows on the Claude client side.

## Connecting the MCP Server to Claude

Once you have the Truto MCP URL, you must register it with your Claude client. You can do this via a visual interface or a configuration file, depending on your setup.

### Method A: Via the Claude UI

If you are using the Claude web interface or enterprise admin panel:

1. Go to **Settings -> Integrations -> Add MCP Server**.
2. Paste your Truto MCP URL into the connection field.
3. Click **Add**. Claude will instantly execute a protocol handshake (`initialize`) and request the available tools via `tools/list`.

### Method B: Via Manual Configuration File (Claude Desktop)

If you are using Claude Desktop locally, you will configure it using the `claude_desktop_config.json` file. Because Truto uses [Server-Sent Events (SSE)](https://truto.one/mcp-sse-vs-stdio-transport/) for remote MCP servers, you will use the official `@modelcontextprotocol/server-sse` package as the command runner.

Open your Claude Desktop config file (located at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows) and add the following:

```json
{
  "mcpServers": {
    "fortnox_erp": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/YOUR_TRUTO_TOKEN"
      ]
    }
  }
}
```

Restart Claude Desktop. The app will spawn the SSE transport, connect to Truto, and pull down the complete set of Fortnox tools.

## Fortnox Hero Tools for Claude

The Truto Fortnox MCP server dynamically exposes the underlying APIs as discrete, descriptive tools. Here are the highest-leverage tools available for your AI agents.

### list_all_fortnox_companyinformation

This tool retrieves the baseline organizational data for the connected Fortnox account, including the DatabaseNumber, OrganizationNumber, and full registered address. This is critical for agents needing to verify the legal entity before drafting external communications or contracts.

**Usage Note:** Takes no parameters. It is highly recommended to instruct Claude to call this once per session to anchor its context about the operating company.

> "Retrieve our company information from Fortnox. I need to know our OrganizationNumber and registered ZipCode so I can draft a formal vendor agreement."

### list_all_fortnox_customers

This tool allows Claude to query the customer database, returning active statuses, contact emails, and organization numbers. It supports powerful filtering, allowing the agent to find specific clients by name, city, or phone number rather than paginating through thousands of records.

**Usage Note:** Ensure the LLM uses the `active` filter if you only want to retrieve currently billable clients.

> "Search Fortnox for a customer named 'Acme Corp'. Check if their account is currently active and return their primary email address."

### create_a_fortnox_customer

This tool provisions a new customer record in Fortnox. The MCP server provides Claude with a strictly validated schema, ensuring it passes the required `name` parameter while allowing it to populate optional fields like email and address.

**Usage Note:** Because Fortnox relies heavily on OrganizationNumbers for B2B compliance, prompt Claude to always include the organization number if known.

> "Create a new customer in Fortnox named 'Global Logistics Inc'. Their email is billing@globallogistics.com and their organization number is 555-1234."

### get_single_fortnox_article_by_id

Before an LLM can create an invoice, it needs to verify that the items being sold exist in the Fortnox inventory and have the correct pricing attached. This tool fetches a single article by its unique article number (ID).

**Usage Note:** The ID is required. Instruct the agent to query the article list if it does not already know the exact article number.

> "Look up the article in Fortnox with the article number 'A-100' and tell me its current unit price and VAT status."

### create_a_fortnox_invoice

This is the most complex and powerful tool in the set. It creates a complete invoice for a customer. The schema requires the `customer_number`, `invoice_date`, and an array of `invoice_rows`.

**Usage Note:** The LLM must be explicitly told to construct the `invoice_rows` array carefully, mapping the article numbers and quantities accurately. If the payload is malformed, Fortnox will reject it, and Truto will pass the 400 Bad Request error back to Claude to retry.

> "Draft a new invoice in Fortnox for customer number 1045. Set the invoice date to today. Add one row for article 'A-100' with a quantity of 5, and a second row for article 'B-200' with a quantity of 1."

### list_all_fortnox_suppliers

This tool provides read-access to the supplier directory. It returns the `SupplierNumber`, `Name`, `Active` status, and `VATNumber`. This is heavily used by agents auditing supply chains or preparing AP (Accounts Payable) reports.

**Usage Note:** Useful for verifying vendor details before approving external purchase orders.

> "List all active suppliers in Fortnox located in Stockholm. Extract their names and VAT numbers into a markdown table."

To view the complete inventory of available endpoints and schema details, visit the [Fortnox integration page](https://truto.one/integrations/detail/fortnox).

## Workflows in Action

By chaining these tools together, Claude can execute multi-step workflows that would normally require manual data entry across multiple Fortnox screens.

### Scenario 1: Generating an Invoice for a New B2B Client

An Account Manager wants to onboard a new client and bill them immediately for consulting services.

> "Please create a new customer in Fortnox named 'Stark Industries'. Once created, generate an invoice for them for today's date, billing them for 10 units of article 'CONSULT-01'."

**Tool Execution Sequence:**
1. `create_a_fortnox_customer`: Claude builds the payload with the name 'Stark Industries' and submits it. Fortnox returns the new customer object, including the generated `CustomerNumber` (e.g., 8892).
2. `get_single_fortnox_article_by_id`: Claude verifies that 'CONSULT-01' exists and checks its current pricing configuration.
3. `create_a_fortnox_invoice`: Claude constructs the nested payload, inserting `customer_number: 8892` and building the `invoice_rows` array. 

**Result:** The user gets a confirmation message with the newly created InvoiceNumber, fully registered in Fortnox without leaving the chat interface.

```mermaid
sequenceDiagram
    participant User as User Prompt
    participant Claude as Claude Agent
    participant Fortnox as Fortnox API

    User->>Claude: "Create customer 'Stark Industries' and invoice them..."
    Claude->>Fortnox: call: create_a_fortnox_customer
    Fortnox-->>Claude: Returns CustomerNumber: 8892
    Claude->>Fortnox: call: get_single_fortnox_article_by_id<br>("CONSULT-01")
    Fortnox-->>Claude: Returns Article Data
    Claude->>Fortnox: call: create_a_fortnox_invoice<br>(customer: 8892, rows: [...])
    Fortnox-->>Claude: Returns InvoiceNumber: INV-1002
    Claude-->>User: "Invoice INV-1002 created successfully."
```

### Scenario 2: Auditing Active Suppliers and Rate Limit Handling

A Supply Chain Manager asks Claude to audit all suppliers and check their active statuses. If the list is large, the agent might hit Fortnox rate limits.

> "Pull a list of all our Fortnox suppliers and cross-reference their VAT numbers. If any are missing VAT numbers, let me know."

**Tool Execution Sequence:**
1. `list_all_fortnox_suppliers`: Claude requests the supplier list.
2. **Rate Limit Hit:** If the agent makes too many concurrent pagination requests, Fortnox responds with a 429. Truto passes this HTTP 429 error directly to Claude, along with the `ratelimit-reset` header.
3. **Agent Backoff:** Claude reads the error, waits the required seconds dictated by the reset header, and retries the specific `list_all_fortnox_suppliers` call with the next cursor.

**Result:** The user receives an accurate audit report of suppliers missing VAT details. The AI agent handles the API throttling autonomously based on the strict headers passed through by Truto.

## Security and Access Control

Giving an LLM write access to an ERP requires strict governance. Truto's MCP servers provide granular access controls at the server configuration level:

*   **Method Filtering:** You can restrict a Fortnox MCP server to specific operation types. For example, setting `methods: ["read"]` prevents the LLM from ever seeing or calling `create` or `delete` tools, safeguarding financial data.
*   **Tag Filtering:** You can scope tools by functional area using tags. Configuring a server with `tags: ["invoicing"]` will expose only invoice-related tools, hiding unrelated resources like payroll or HR records.
*   **Require API Token Auth:** By setting `require_api_token_auth: true`, the MCP client must provide a valid Truto API token in addition to the server URL. This prevents unauthorized execution even if the MCP URL is leaked in internal logs.
*   **Time-to-Live (TTL):** The `expires_at` field allows you to generate short-lived MCP servers (e.g., expiring in 24 hours). This is ideal for granting contractors temporary automated access to specific Fortnox tools, automatically cleaning up the access token and storage when the time expires.

## Orchestrating Financial Operations with AI

Connecting Fortnox to Claude shifts ERP management from manual data entry to conversational execution. By leveraging an MCP server that automatically maps complex financial schemas and enforces strict API boundaries, engineering teams can safely deploy AI agents into mission-critical financial workflows.

Because Truto handles the OAuth infrastructure, standardizes the rate limit headers, and derives schemas directly from documentation, your agents are protected against hallucinated payloads and silent API failures. The LLM simply reads the schema, builds the request, and executes the business logic - leaving the connectivity to the platform.

> Ready to automate your Fortnox workflows with Claude? Book a demo to see how Truto's managed MCP servers can connect your AI agents to real-time financial data.
>
> [Talk to us](https://truto.one/book-a-demo/)
