
Fortnox
io.github.jakobwennberg由 GitHub 账号 jakobwennberg 发布v1.0.0更新于 Oct 24, 2026
MCP server for Fortnox Swedish accounting API integration
概览
将助手连接到瑞典 Fortnox 会计系统,可管理客户、发票、供应商、科目和凭证,并进行财务分析。
- 可以做什么
- 列出、查看、新建、更新和删除客户、供应商与会计科目
- 列出、查看、新建和更新发票,并可记账、作废、开具贷项通知单和邮件发送
- 列出供应商发票、审批付款并获取应付账款账龄报告
- 列出销售订单与报价,读取公司信息和财务年度
- 列出、查看、新建和搜索凭证及凭证系列,查看科目活动
- 执行分析与商业智能:发票统计、大客户、未付报告、现金流预测、销售漏斗、毛利率趋势和期间对比
- 适用场景
- 适合需要操作瑞典公司 Fortnox 账务的场景:起草和发送发票、维护客户与供应商资料,或基于实时会计数据生成收入、现金流和毛利分析。
- 运行要求
- 以 npm 包通过 npx 在本地运行,或自建 HTTP 服务器。本地模式需要来自 Fortnox 开发者应用及 OAuth2 流程的 FORTNOX_CLIENT_ID、FORTNOX_CLIENT_SECRET 和 FORTNOX_REFRESH_TOKEN。自建远程模式还需 AUTH_MODE、SERVER_URL、JWT_SECRET,可选 Upstash Redis 配置。需要访问 Fortnox API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Fortnox,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
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)
- Go to claude.ai
- Navigate to Settings → Integrations → Add Integration
- Enter the URL:
https://fortnox-mcp.vercel.app/mcp - 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:
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
- Register at Fortnox Developer Portal
- Create an application to get your Client ID and Client Secret
- 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:
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 customersfortnox_get_customer- Get customer detailsfortnox_create_customer- Create new customerfortnox_update_customer- Update customerfortnox_delete_customer- Delete customer
Invoice Management
fortnox_list_invoices- List invoices with filteringfortnox_get_invoice- Get invoice details with line itemsfortnox_create_invoice- Create new invoicefortnox_update_invoice- Update draft invoicefortnox_bookkeep_invoice- Bookkeep invoicefortnox_cancel_invoice- Cancel invoicefortnox_credit_invoice- Create credit notefortnox_send_invoice_email- Send invoice by email
Supplier Management
fortnox_list_suppliers- List and search suppliersfortnox_get_supplier- Get supplier detailsfortnox_create_supplier- Create new supplierfortnox_update_supplier- Update supplierfortnox_delete_supplier- Delete supplier
Supplier Invoice Management
fortnox_list_supplier_invoices- List supplier invoices with filteringfortnox_get_supplier_invoice- Get supplier invoice detailsfortnox_approve_supplier_invoice- Approve supplier invoice for paymentfortnox_payables_report- Get accounts payable aging report
Order Management
fortnox_list_orders- List sales orders with filteringfortnox_list_offers- List offers/quotes with filtering
Account Management
fortnox_list_accounts- List chart of accountsfortnox_get_account- Get account detailsfortnox_create_account- Create new accountfortnox_update_account- Update accountfortnox_delete_account- Delete account
Voucher Management
fortnox_list_vouchers- List vouchers (journal entries)fortnox_get_voucher- Get voucher details with rowsfortnox_create_voucher- Create manual voucherfortnox_list_voucher_series- List available voucher seriesfortnox_account_activity- Get activity for a specific accountfortnox_search_vouchers- Search vouchers by description, account, or amount
Company Information
fortnox_get_company_info- Get company detailsfortnox_list_financial_years- List company financial years
Analytics
fortnox_invoice_summary- Get invoice statistics by periodfortnox_top_customers- Get top customers by revenuefortnox_unpaid_report- Get detailed unpaid invoice report
Business Intelligence
fortnox_cash_flow_forecast- Forecast cash flow based on invoices and payablesfortnox_order_pipeline- Analyze sales order pipelinefortnox_sales_funnel- Analyze sales funnel from offers to invoicesfortnox_product_performance- Analyze product/article performancefortnox_period_comparison- Compare financial metrics across periodsfortnox_customer_growth- Analyze customer acquisition and growthfortnox_project_profitability- Analyze project profitability (if using projects)fortnox_cost_center_analysis- Analyze costs by cost centerfortnox_expense_analysis- Analyze expenses by categoryfortnox_yearly_comparison- Compare year-over-year performancefortnox_gross_margin_trend- Track gross margin trends over time
Installation
Via npx (Recommended)
No installation needed! Just add the config above to Claude Desktop.
Manual Installation
From Source
Configuration
Environment Variables
Local Mode (default)
Remote Mode (AUTH_MODE=remote)
*Falls back to in-memory storage if not provided (not recommended for production)
Getting OAuth Credentials
- Register as a developer at Fortnox Developer Portal
- Create a new application to get Client ID and Client Secret
- Complete the OAuth2 authorization flow to obtain a refresh token
- Set the environment variables
Usage
With Claude Desktop
See Quick Start above.
As HTTP Server
Then connect to http://localhost:3000/mcp
Tool Examples
List Unpaid Invoices
Create Invoice
Create Voucher
Rate Limiting
The Fortnox API allows 25 requests per 5 seconds. This server includes automatic rate limiting to prevent exceeding this limit.
Development
Publishing & Distribution
This server is published to multiple registries for easy installation:
How It Works
- User adds config to Claude Desktop with
npx fortnox-mcp-server - Claude Desktop starts the server via npx (downloads latest version from npm)
- Server authenticates with Fortnox using OAuth2 credentials from environment variables
- Claude can now use tools like
fortnox_list_invoices,fortnox_create_customer, etc. - Server handles API calls to Fortnox, including automatic token refresh and rate limiting
Token Persistence (Local Mode)
Fortnox refresh tokens are single-use — each token refresh returns a new one. The server automatically persists the latest refresh token to ~/.fortnox-mcp/tokens.json so it survives process restarts without requiring manual config updates.
- On first run, the server reads
FORTNOX_REFRESH_TOKENfrom your environment/config - After each token refresh, the new refresh token is saved to
~/.fortnox-mcp/tokens.json - On subsequent restarts, the server uses the persisted token (which is always the latest)
- If the persisted file is missing or corrupt, the server falls back to the environment variable
The token file is created with restricted permissions (0600) for security.
Releasing New Versions
To release a new version, use the release script:
The release script automatically:
- Bumps the version in
package.json - Updates
server.jsonfor the MCP Registry - Builds the project
- Commits and tags the release
- Publishes to npm
- Publishes to MCP Registry
- Pushes to GitHub
Prerequisites for releasing:
npm login- Logged into npmmcp-publisher login github- Logged into MCP Registry- Clean git working directory
Users Get Updates Automatically
When you publish a new version, users running npx -y fortnox-mcp-server will automatically get the latest version the next time they restart Claude Desktop.
Deploying Your Own Remote Server
Want to host your own instance of the Fortnox MCP server? Follow these instructions.
Deploy to Vercel
1. Prerequisites
- A Vercel account
- An Upstash Redis database (for token storage)
- A Fortnox Developer account with an app created
2. Set Environment Variables
In your Vercel project settings, add these environment variables:
3. Configure Fortnox OAuth Callback
In your Fortnox app settings, add this redirect URI:
4. Deploy
Server Endpoints
Architecture
License
MIT
来源:README.md,提交 501ee13
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分