io.github.jakobwennberg/fortnox

MCP server for Fortnox Swedish accounting API integration

13MITdevtools

Install

Config snippet generator goes here (5 client tabs)

README

# Fortnox MCP Server

An MCP (Model Context Protocol) server for integrating with the Fortnox Swedish accounting system. This server enables LLMs to interact with Fortnox for managing invoices, customers, suppliers, orders, accounts, vouchers, and provides business intelligence analytics.

## Two Ways to Use

| Mode | Best For | Setup |
|------|----------|-------|
| **Remote Mode** | End users | Just add URL, authorize in browser |
| **Local Mode** | Developers, self-hosted | Configure environment variables |

---

## Quick Start: Remote Mode (Recommended)

The easiest way to use Fortnox MCP - no credentials needed, just authorize in your browser.

### Option A: Add to Claude.ai (Web)

1. Go to [claude.ai](https://claude.ai)
2. Navigate to **Settings** → **Integrations** → **Add Integration**
3. Enter the URL: `https://fortnox-mcp.vercel.app/mcp`
4. Wait for it to load, then authorize access by clicking connect

### Option B: Add to Claude Desktop

Open your Claude Desktop config file:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

Add this configuration:

```json
{
  "mcpServers": {
    "fortnox": {
      "url": "https://fortnox-mcp.vercel.app/mcp"
    }
  }
}
```

Restart Claude Desktop. When you first ask Claude to do something with Fortnox, a browser window will open for you to authorize access to your Fortnox account. Once authorized, you're all set!

---

## Quick Start: Local Mode (Self-Hosted)

For developers who want to run the server locally or use their own Fortnox app credentials.

### 1. Get your Fortnox credentials

1. Register at [Fortnox Developer Portal](https://developer.fortnox.se)
2. Create an application to get your **Client ID** and **Client Secret**
3. Complete the OAuth2 flow to get a **Refresh Token**

### 2. Add to Claude Desktop

Open your Claude Desktop config file:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

Add this configuration:

```json
{
  "mcpServers": {
    "fortnox": {
      "command": "npx",
      "args": ["-y", "fortnox-mcp-server"],
      "env": {
        "FORTNOX_CLIENT_ID": "your-client-id",
        "FORTNOX_CLIENT_SECRET": "your-client-secret",
        "FORTNOX_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}
```

### 3. Restart Claude Desktop

That's it! You can now ask Claude to manage your Fortnox invoices, customers, and more.

---

## Features

### Customer Management
- `fortnox_list_customers` - List and search customers
- `fortnox_get_customer` - Get customer details
- `fortnox_create_customer` - Create new customer
- `fortnox_update_customer` - Update customer
- `fortnox_delete_customer` - Delete customer

### Invoice Management
- `fortnox_list_invoices` - List invoices with filtering
- `fortnox_get_invoice` - Get invoice details with line items
- `fortnox_create_invoice` - Create new invoice
- `fortnox_update_invoice` - Update draft invoice
- `fortnox_bookkeep_invoice` - Bookkeep invoice
- `fortnox_cancel_invoice` - Cancel invoice
- `fortnox_credit_invoice` - Create credit note
- `fortnox_send_invoice_email` - Send invoice by email

### Supplier Management
- `fortnox_list_suppliers` - List and search suppliers
- `fortnox_get_supplier` - Get supplier details
- `fortnox_create_supplier` - Create new supplier
- `fortnox_update_supplier` - Update supplier
- `fortnox_delete_supplier` - Delete supplier

### Supplier Invoice Management
- `fortnox_list_supplier_invoices` - List supplier invoices with filtering
- `fortnox_get_supplier_invoice` - Get supplier invoice details
- `fortnox_approve_supplier_invoice` - Approve supplier invoice for payment
- `fortnox_payables_report` - Get accounts payable aging report

### Order Management
- `fortnox_list_orders` - List sales orders with filtering
- `fortnox_list_offers` - List offers/quotes with filtering

### Account Management
- `fortnox_list_accounts` - List chart of accounts
- `fortnox_get_account` - Get account details
- `fortnox_create_account` - Create new account
- `fortnox_update_account` - Update account
- `fortnox_delete_account` - Delete account

### Voucher Management
- `fortnox_list_vouchers` - List vouchers (journal entries)
- `fortnox_get_voucher` - Get voucher details with rows
- `fortnox_create_voucher` - Create manual voucher
- `fortnox_list_voucher_series` - List available voucher series
- `fortnox_account_activity` - Get activity for a specific account
- `fortnox_search_vouchers` - Search vouchers by description, account, or amount

### Company Information
- `fortnox_get_company_info` - Get company details
- `fortnox_list_financial_years` - List company financial years

### Analytics
- `fortnox_invoice_summary` - Get invoice statistics by period
- `fortnox_top_customers` - Get top customers by revenue
- `fortnox_unpaid_report` - Get detailed unpaid invoice report

### Business Intelligence
- `fortnox_cash