Files
accounted/packages/gnubok-mcp
188816652d docs(api,mcp): tool counts, changelog backfill, version-header honesty, lazy auth, endpoint map (#1929)
Brings the developer-facing API and MCP docs back in line with origin/main
(audit 2026-08-26). Docs only; no runtime behaviour changes.

- Tool counts: the server registers 153 tools; docs said 90+/100+/120.
  All now say "150+" (connect-claude, gnubok-mcp README, plugin README,
  mcp-server rules, CLAUDE.md, registry entry with refreshed updatedAt).
  Not derived from the tools array: lib/ must not import @/extensions/.
- REST changelog: backfilled the additive 2026-08 changes (#1909 report
  date ranges + PDFs, #1864 POST /companies, #1773 vat-declarations,
  #1405 PATCH settings, #1724/#1788 customer personal_number, #1809
  cash_account_id filter). API version date unchanged.
- Version headers: Gnubok-Deprecation is planned, not emitted; the
  Gnubok-Version request header is not read today (version.ts comment,
  versioning page, conventions overlay, regenerated skills/accounted-api).
- connect-claude Path A documents lazy auth (connector works before an
  account exists; sign-in on the first company-scoped call).
- MCP server README: real Anthropic SDK call sites, real resource URIs,
  pending-operations widget, public-tools/tasks/origin-guard/pii-guard.
  Rules file gains Lazy auth + feedback/tasks paragraphs.
- api-routes endpoint map regenerated from the filesystem (560 routes,
  55 families incl. v1, agent, reconciliation account-keyed, dimensions,
  peppol, rot-rut, webshop-orders, mileage, billing, skatteverket,
  receipt-hunt).
- gnubok-mcp/accounted-mcp: /settings?tab=api is the pre-redesign URL;
  now /settings/api (README + help hints, no version bump).

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-26 13:35:54 +02:00
..

gnubok-mcp

Legacy compatibility package for existing MCP configurations. New installations should use accounted-mcp. This package, its environment variables, and all existing API keys remain supported.

Connect Claude Desktop (or any stdio MCP client) to your Accounted bookkeeping account. This is a thin stdio → HTTPS bridge: it forwards JSON-RPC over stdio to the hosted Accounted MCP server, which exposes 150+ bookkeeping tools (invoices, transactions, VAT/momsdeklaration, payroll, reports, year-end).

Write tools stage a pending operation that you confirm before anything is booked: the bridge never books on its own.

Quickstart

  1. Mint an API key in the Accounted dashboard at /settings/api. Use a gnubok_sk_test_* key against the sandbox while you evaluate; switch to gnubok_sk_live_* for real data. The key's scopes gate which tools are callable.

  2. Run the bridge with the key in the environment:

    GNUBOK_API_KEY=gnubok_sk_test_... npx gnubok-mcp
    

    It reads JSON-RPC from stdin and writes responses to stdout, so you normally point an MCP client at it rather than running it by hand.

Claude Desktop config

Add the bridge to your claude_desktop_config.json:

{
  "mcpServers": {
    "gnubok": {
      "command": "npx",
      "args": ["gnubok-mcp"],
      "env": {
        "GNUBOK_API_KEY": "gnubok_sk_test_..."
      }
    }
  }
}

Restart Claude Desktop. The Accounted tools appear in the client and you can start asking questions like "Show my uncategorized bank transactions and suggest categories."

Environment variables

Variable Required Default Purpose
GNUBOK_API_KEY yes - Your gnubok_sk_* API key.
GNUBOK_URL no https://app.gnubok.se/api/extensions/ext/mcp-server/mcp Override the MCP endpoint (e.g. for self-hosted Accounted).
GNUBOK_CLIENT no - Distribution-channel marker (e.g. openclaw), sent as X-Gnubok-Client. Telemetry only: never affects auth or behavior.

Alternative: claude.ai connector (no API key)

If you use claude.ai or Claude Desktop's custom-connector flow, you can skip this bridge entirely and add Accounted as an OAuth 2.1 custom connector instead: paste the connector URL https://app.gnubok.se/api/extensions/ext/mcp-server/mcp?client=claude-connector and authorise on the Accounted consent screen (read-only scopes by default; write scopes are ticked explicitly).

Docs

Full setup, sample prompts, and a 10-minute reviewer test: Connect with Claude.

License

MIT