All posts

The Accounting API for the AI Era

Accounted treats the ledger as an API: Swedish double-entry, open source under AGPL, REST plus MCP. The developer entry point.

Accounting software was built for accountants. We're building accounting infrastructure for the systems that sit on top of them, like agents that close the month, dunning automations that chase invoices and runway dashboards that read straight from the books.

None of this needs a new kind of accounting. Double-entry has worked since 1494. What's new is that the ledger can be a first-class API instead of a UI with an API stapled to the side.

What Accounted is

A Swedish double-entry ledger with three properties that matter.

  1. API-first. Every write goes through the same validation layer, whether it comes from a click, a scheduled job, a REST call or an MCP tool. The few UI-only actions left, such as inviting a member, are the exception.
  2. Deterministic core. Debits equal credits, accounts exist, periods lock and Swedish VAT rules hold, with no LLM in the loop. Agents propose and the core decides.
  3. Append-only audit. Every state change is an event in an immutable log, so agent activity is always traceable. You can see which session proposed what, who approved it and when.

What you get:

  • REST API at app.accounted.se/api/v1, with 280+ endpoints, OpenAPI 3.1 and 900+ structured error codes.
  • MCP server with 130+ tools, as a hosted OAuth 2.1 connector or through the accounted-mcp stdio bridge.
  • Webhooks with 28 event types, and the event log to poll as a fallback.
  • SIE4 import and export for moving in from other Swedish systems.
  • Open source core under AGPL-3.0 on GitHub.

Why MCP changes integration

You can call any REST API from an LLM app by writing wrapper code. With MCP, the client discovers the tools at runtime, reads their schemas and chains them itself.

Type "close April 2026" into Claude and the agent will:

  1. Call gnubok_year_end_readiness to find blockers.
  2. Go through uncategorised transactions with gnubok_list_uncategorized_transactions and gnubok_suggest_categories.
  3. Stage gnubok_categorize_transaction for each one.
  4. Run gnubok_vat_review_widget for the VAT period.
  5. Call gnubok_lock_period.

You wrote no integration code. The ledger validated every step, you approved at the checkpoints, and the audit log has the whole session. More in MCP-server för bokföring and ChatGPT, Claude och din ledger.

What people build on it

All of it with ordinary tools like TypeScript, Python, Make, n8n, Claude and Cursor.

How to integrate

REST

Create a scoped key at /settings/api and start by asking which companies it can reach.

curl https://app.accounted.se/api/v1/companies \
  -H "Authorization: Bearer gnubok_sk_live_..."

Everything else hangs under a company ID, like /api/v1/companies/{companyId}/transactions, /reports/general-ledger and /invoices. Writes take an Idempotency-Key, most support dry-run, and errors come back structured with a docs link and, where there's a known fix, a recovery hint.

Use gnubok_sk_test_* keys while you build. They force every write into dry-run, but reads return your real company data. There is no separate sandbox.

MCP

For claude.ai or Claude Desktop, add a custom connector pointing at https://app.accounted.se/api/extensions/ext/mcp-server/mcp and authorise over OAuth 2.1. The consent screen pre-selects every scope your role allows, and you can untick any of them.

For a local stdio bridge with a key:

{
  "mcpServers": {
    "accounted": {
      "command": "npx",
      "args": ["-y", "accounted-mcp"],
      "env": {
        "ACCOUNTED_API_KEY": "gnubok_sk_test_...",
        "ACCOUNTED_CLIENT": "claude-desktop"
      }
    }
  }
}

This bridge names the tools accounted_*. The connector and the legacy gnubok-mcp package use the gnubok_* names in this article. They're the same tools. Every write that touches the books stages a pending operation that you approve before anything is booked.

Embedded

For SaaS platforms and agencies putting accounting inside their own product. POST /api/v1/companies creates a company with its BAS chart, first fiscal period and tax deadlines in one call, and agencies get white label on top (see /byraer). Read Embedded accounting for SaaS first. To build your own UI on the open ledger, see Building on an open source Swedish ledger.

How it differs

PropertyTypical bookkeeping softwareAccounted
API surfacePartial, added laterFirst-class, close to complete
MCP serverRare130+ tools, accounted-mcp bridge
Audit logOften partialComplete append-only event log
Source licenceProprietaryAGPL-3.0 core, extension exception
Self-hostingNot possibleSupported

Roadmap

Already shipped are webhooks (28 event types with delivery inspection and retry), company provisioning over the API, and Peppol e-invoicing in both directions. Still open:

  1. Long-running MCP operations for year-end and bulk reconciliation. The MCP Tasks extension is in place, and the audit package already returns a handle to poll, but year-end still runs as one long call.
  2. K10 is still a compliance gap.

Pull requests are welcome on GitHub. Open an issue first for anything non-trivial.

Where to start

Read the API docs or the overview at /utvecklare. Create an account at app.accounted.se/register, where a new company starts with a 30-day trial. Then connect Claude read-only for twenty minutes and see what agent access to a ledger is like. The next article in this series is Building on an open source Swedish ledger.

Frequently asked

Is this just another accounting API wrapper?
No. Accounted is a Swedish double-entry ledger written from scratch. The web app, the REST API and the MCP tools all write through the same validation layer, and the API reaches almost everything the UI does. It was built for agents from the start.
Why Swedish-only?
Swedish bookkeeping has its own requirements, like Bokföringslagen, the BAS chart of accounts, Skatteverket filings and BankID, and they don't generalise cleanly to other countries. We'd rather do one country properly. International support is on the roadmap, not in 2026.
What's the license?
AGPL-3.0-or-later for the core, with an exception for extensions that only use the documented Extension API, which may carry any licence. The stdio MCP bridges (accounted-mcp, and the legacy gnubok-mcp) are MIT. Details are in LICENSE on GitHub.
Is there an SDK?
Not an official one. The REST API is plain HTTP with an OpenAPI 3.1 spec, and llms.txt and llms-full.txt let a coding agent generate a typed client in minutes. The accounted-mcp bridge covers the agent path.
Next

Start building.

REST + MCP. Open source under AGPL. SIE4 in, SIE4 out. Self-host or use the managed version.