Fortnox MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HOST | No | HTTP mode only: host to bind. | 127.0.0.1 |
| PORT | No | HTTP mode only: port to bind. | 8000 |
| MCP_TRANSPORT | No | Transport mode: stdio or http. | stdio |
| FORTNOX_CLIENT_ID | Yes | The service-account client ID for the Fortnox integration. | |
| FORTNOX_ROLE_FILE | No | Path to a role file that narrows what this server offers. See Restricting access. | |
| FORTNOX_TENANT_ID | Yes | The Fortnox tenant ID, i.e. the company's Fortnox database number. | |
| MCP_ALLOWED_HOSTS | No | HTTP mode only: comma-separated host names the server answers to (* turns the check off). | localhost,127.0.0.1 |
| FORTNOX_PRICE_LIST | No | The sales price list the tools read and write; offers, orders and invoices use the customer's own price list when it has one. | A |
| FORTNOX_STOCK_POINT | No | Stock point code (e.g. LAGER). Needed only if you have several stock points; defaults to the only active one. | |
| FORTNOX_CLIENT_SECRET | Yes | The service-account client secret for the Fortnox integration. | |
| FORTNOX_ARTICLE_DEFAULTS | No | JSON fields every new article gets on top of Type: STOCK and StockGoods: true, e.g. {"VAT": 25, "SalesAccount": 3001}. Without it Fortnox uses the company defaults. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Fortnox is the company's register for articles (ArticleNumber = SKU), stock, purchasing and sales documents. Every write tool has dry_run=true to preview the exact request. Stock only changes through warehouse documents (goods receipt, stock correction, manual in/outbound, invoices with delivered quantity), never by editing an article. Nothing in Fortnox is truly deleted: offers/orders cancel, articles deactivate, sent invoices are credited, never cancelled.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_articleB | Everything about one article (SKU): register data, stock (in stock / available / reserved), sales price, order point + max stock, and supplier entries (supplier, supplier part number, purchase price). |
| search_articlesB | Search the article register. |
| get_priceB | Sales price of an article on a price list (default: the server's price list, FORTNOX_PRICE_LIST). |
| create_articleB | Create a stock article. Applies the server's article defaults (FORTNOX_ARTICLE_DEFAULTS; Type STOCK, StockGoods). The description is cleaned of characters Fortnox would silently delete, and an EAN is checked (GS1 check digit, not already used). If sales_price is given it is set on the price list BEFORE the webshop flag, so a webshop never shows the product at 0. Articles can't be deleted once used on any document. |
| update_articleB | Change article fields. Description is cleaned of characters Fortnox would silently delete; EAN is checked (valid + unique). Never changes stock quantities (use goods receipt / stock correction). Price: use set_price. Webshop flag: use set_webshop_article. |
| set_priceA | Set the sales price (company currency, ex VAT) on a price list (default: the server's price list, FORTNOX_PRICE_LIST). Creates the price row if the article has none on that list. |
| set_webshop_articleB | Tick/untick 'Webbshopsartikel'. Webshop integrations use this flag to publish the article, so ticking it is refused while the article has no price on the server's price list (it would go live at 0). |
| set_order_pointB | Set 'Beställningspunkt' (order point) and max stock on the server's stock point. -1 = not stocked, order when sold. (This is not the article's StockWarning/'Lagervarning' field.) |
| set_article_supplierA | Add/update/remove one supplier entry on an article ('Leverantörsinformation': supplier part number, purchase price in the supplier's currency, lead time, MOQ). Reads the full list first and writes it back with only this supplier changed. Fortnox answers a random 404 now and then; if the list can't be read at all, the write is refused unless article_has_no_supplier_entries=true (otherwise other suppliers would be wiped). |
| deactivate_articleA | Retire an article (articles that were ever used can't be deleted): webshop off, inactive, EAN cleared so it can move to a new article, description prefixed 'UTGÅTT' (plus 'ersatt av X' with replaced_by). Move any stock first (manual outbound/inbound). |
| get_stockA | Current stock per article on the server's stock point: inStock and availableStock (= in stock minus reservations, what a webshop should show). Articles missing from the answer have 0. Omit article_numbers for every non-zero balance. |
| stock_warningsC | The 'Lågt saldo' stock warning list (Lager → Lagerlista): supplier, article, in stock, on order, reserved, available, order shortage, order point, stock warning. |
| article_movementsA | Stock history for one article, rebuilt from its documents (Fortnox has no movement log): goods receipts, manual in/outbound deliveries, stock corrections and purchase orders. Sales are on invoices (list_invoices). |
| start_stock_correctionA | Step 1 of correcting a stock balance (= a stocktaking with one counted row). Creates and starts it and returns the current balance next to the counted one. Nothing changes until release_stock_correction. Use when the count is wrong; for a real physical event (scrap, found goods) use a manual delivery. |
| release_stock_correctionA | Apply a started stock correction: stock is set to the counted quantity and bookkept. Completed corrections cannot be voided (a wrong count needs a new correction). |
| cancel_stock_correctionB | Throw away a stock correction that has not been released (no effect on stock). |
| list_stock_correctionsC | Stocktakings / stock corrections, optionally for one article. |
| get_stock_correctionB | One stocktaking / stock correction with its rows (counted vs current balance). |
| create_manual_inboundA | Goods in WITHOUT a purchase order (found stock, sample, warranty return, SKU swap). rows: [{article_number, quantity, unit_cost (in currency, default 0), freight_cost, other_cost}]. Created as a draft; stock changes on release_manual_delivery. Real purchases belong on a purchase order + goods receipt. |
| create_manual_outboundA | Goods out WITHOUT a sale (scrap, damage, loss, SKU swap). rows: [{article_number, quantity}]. Draft until release_manual_delivery. |
| release_manual_deliveryC | Apply a manual inbound/outbound delivery: stock and value change and are bookkept. |
| void_manual_deliveryC | Void a manual inbound/outbound delivery. |
| list_manual_deliveriesC | Manual inbound/outbound deliveries (and transfers). |
| get_manual_deliveryC | One manual inbound/outbound delivery with rows. |
| search_customersA | Find customers. vat_number / organisation_number scan ALL customers (registers often hold the same company under several customer numbers), so you find every existing account before creating a new one. |
| get_customerC | One customer. Email is the customer's main e-mail; Fortnox also has EmailInvoice / EmailOffer / EmailOrder for where each document type is sent. |
| create_customerB | Create a customer. Checks VAT / org number against every existing customer first and returns the existing account(s) instead, unless allow_duplicate=true. email = the customer's main e-mail address. EU companies: give the VAT number (drives reverse-charge VAT). |
| update_customerA | Change customer fields (Fortnox field names, e.g. {"Address1": "...", "VATNumber": "...", "Email": "..."}). Existing documents keep the e-mail address they were created with. |
| search_suppliersC | Find suppliers by name, organisation number, e-mail or supplier number. |
| get_supplierC | One supplier. |
| create_supplierC | Create a supplier (checks name / org number for an existing one first). |
| update_supplierC | Change supplier fields (Fortnox field names). |
| list_offersC | List offers (quotes). |
| get_offerC | One offer with rows. |
| list_ordersD | List orders. |
| get_orderC | One order with rows and delivery/warehouse state. |
| list_invoicesC | List invoices. your_order_number = the customer's or webshop's order number (YourOrderNumber) — how the invoice for a webshop order is usually found. |
| get_invoiceC | One invoice with rows, payment and booking state. |
| get_document_pdfB | The PDF of an offer, order or invoice (as Fortnox prints it). |
| create_offerA | Create an offer (quote). rows: [{article_number, quantity, price (per unit, ex VAT, in the offer currency),
description?, discount?}] — use the final prices you were given, never a formula. Defaults: valid 1 month,
Swedish for Swedish customers else English, the customer's price list (else the server's), customer's currency.
Freight goes in |
| update_offerC | Change an offer: fields = Fortnox header fields (e.g. {"ExpireDate": "2026-11-30"}); rows replaces ALL rows. |
| cancel_offerB | Cancel an offer (it stays in the list, marked cancelled, total zeroed). |
| offer_to_orderC | Confirm an offer: creates an order from it. |
| send_offer_emailC | E-mail the offer PDF to the customer from Fortnox (customer-facing). |
| create_orderC | Create an order. rows: [{article_number, quantity, price, description?}]. delivery_state: registration (no stock effect), reservation (reserves stock), delivery (takes stock out). |
| update_orderB | Change an order (Fortnox header fields; rows replaces ALL rows). DeliveryState changes move stock. |
| cancel_orderD | Cancel an order. |
| order_to_invoiceC | Create the invoice from an order (gets the next invoice number in the books). |
| send_order_emailB | E-mail the order confirmation PDF to the customer from Fortnox (customer-facing). |
| create_invoiceC | Create an invoice (unbooked). rows: [{article_number, quantity, price, description?}]. Invoice quantities are delivered quantities and take the goods out of stock. |
| update_invoiceA | Change an UNBOOKED invoice (Fortnox header fields; rows replaces ALL rows — include RowId in |
| bookkeep_invoiceB | Book an invoice in the ledger (Fortnox only credits booked invoices). A booked invoice can no longer be edited. |
| cancel_invoiceA | Cancel (makulera) an invoice that was NEVER sent and is not booked. A sent invoice is in the customer's hands, so it is credited instead (credit_invoice); this tool refuses it. |
| credit_invoiceA | Create a FULL credit note for an invoice (refund/return). Fortnox only credits BOOKED invoices; set bookkeep_first=true to book it first. Booking a full credit note puts the goods back in stock — don't add a manual inbound as well. Partial refund: credit, then update_invoice on the credit note to trim its rows. |
| send_invoice_emailB | E-mail the invoice from Fortnox to the address on the invoice (customer-facing). |
| mark_invoice_sentA | Mark an invoice as sent without e-mailing it (external print), e.g. when the PDF is sent another way. |
| set_invoice_warehouse_readyC | Mark an invoice as delivered/done in the warehouse. |
| register_invoice_paymentB | Register an incoming customer payment on an invoice (amount in SEK; amount_currency for foreign-currency invoices). bookkeep=true books the payment as well. |
| list_purchase_ordersB | Purchase orders (rows not included — use get_purchase_order). DELAYED = past delivery date, not fully received. |
| get_purchase_orderB | One purchase order with rows (ordered / received / remaining) and its matched goods receipts / supplier invoices. |
| create_purchase_orderA | Create a purchase order (not sent). rows: [{article_number, quantity, price (in the PO currency), description?}]; every article must exist (create_article first). Currency defaults to the supplier's, the rate comes from Fortnox. internal_reference = your own reference (e.g. the supplier's order number). language = Fortnox language code for the PO document (GB = English). Delivery address = the stock point's address, else the company address from Fortnox. |
| update_purchase_orderB | Change purchase-order head fields (partial update, e.g. {"deliveryDate": "2026-10-20", "internalReference": "..."}). |
| send_purchase_orderC | E-mail the purchase order to the supplier (supplier-facing). |
| set_purchase_order_responseC | Record the supplier's answer (e.g. when the order was placed by e-mail, phone or a web shop rather than sent from Fortnox). |
| complete_purchase_orderC | Close a purchase order manually (nothing more will arrive). |
| void_purchase_orderC | Void a purchase order. |
| list_goods_receiptsC | Goods receipts (incoming goods). unmatchedValue = received value not yet matched to a supplier invoice. |
| get_goods_receiptC | One goods receipt with rows. |
| create_goods_receiptA | Book a delivery against a purchase order (draft; stock goes up on release_goods_receipt). received: [{article_number, quantity}] — what physically arrived. rest_still_expected=false closes the remaining quantity (supplier short-shipped for good). delivery_note = the supplier's delivery-note/invoice number. |
| release_goods_receiptB | Put a goods receipt in stock: stock and value are booked, the PO's received quantities update. |
| complete_goods_receiptA | Finalise a goods receipt's bookkeeping. Do this only after the supplier invoice is matched — afterwards it can't be matched or voided. |
| void_goods_receiptA | Void a goods receipt (only while not completed and not matched to a supplier invoice). |
| list_supplier_invoicesD | Supplier invoices (bills we have to pay). |
| get_supplier_invoiceD | One supplier invoice. |
| get_currency_rateB | Fortnox's current exchange rate for a currency (SEK per |
| company_infoB | Company settings in Fortnox (name, org number, address). |
| api_requestA | Any Fortnox API call the other tools don't cover. path starts with /3/ (classic API: bodies wrapped in the resource key, e.g. {"Article": {...}}) or /api/warehouse/ (bare JSON). Non-GET calls change live data, and so do some GETs (e.g. /3/invoices/{n}/email sends the invoice). With dry_run=true nothing is sent, GETs included. |
| get_invoice_payment_evidenceA | Payments and the vouchers linked to ONE invoice: payment method, amounts, and the VAT / receivable / bank / revenue rows of each voucher. No ledger browsing beyond this invoice. Accounting entries are not bank receipts. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 78 tools
Most tools target distinct Fortnox resources/actions, and descriptions actively clarify boundaries such as manual deliveries vs. goods receipts vs. stock corrections. However, the huge surface includes overlapping paths (create_invoice vs. order_to_invoice, release_manual_delivery vs. release_goods_receipt vs. release_stock_correction) and the catch-all api_request can duplicate any other tool, increasing misselection risk.
The dominant convention is clear verb_noun naming (search_customers, create_order, release_goods_receipt, send_invoice_email), which is predictable across most domains. Minor deviations such as company_info, stock_warnings, article_movements, and api_request keep it from being fully consistent.
With 78 tools, the surface is far too large for an agent to navigate efficiently, even for an ERP domain. Many tools are useful individually, but the count creates a heavy selection burden and invites use of the generic api_request fallback.
Coverage is broad across customers, suppliers, articles, stock, offers, orders, invoices, purchase orders, and goods receipts, and api_request provides an escape hatch. Notable first-class gaps remain around supplier invoice creation/update/payment and broader accounting/ledger operations, so it is not a fully complete ERP surface.