/install accounted
Accounted — Swedish bookkeeping
Accounted is a hosted Swedish accounting ledger (enskild firma + aktiebolag) exposing ~97 MCP tools: transactions, categorization, invoicing, suppliers, VAT/momsdeklaration, payroll/AGI, reports, reconciliation, year-end. All tools are prefixed gnubok_.
The safety contract (read first): every tool that would change the books returns { staged: true, operation_id, risk_level, preview } instead of executing. Nothing is booked until the operation is approved. Posted vouchers are immutable under Swedish law (Bokföringslagen 5 kap 5§) — corrections happen via reversal (storno), never edits. This means you cannot corrupt the ledger by accident: the worst a bad tool call can do is stage a proposal a human rejects.
Setup (once)
Check whether an accounted MCP server is already configured (openclaw mcp list). If not, guide the user through Option A unless they specifically want an API key.
Option A — hosted OAuth (recommended)
No secrets stored on this machine. Scopes are granted on Accounted's consent screen — read-only is pre-checked by default; every write scope is an explicit opt-in checkbox.
openclaw mcp add accounted --url "https://app.gnubok.se/api/extensions/ext/mcp-server/mcp"
openclaw mcp login accounted
The login opens a browser to Accounted's consent screen (PKCE + dynamic client registration; localhost redirect is allowlisted). Tell the user: tick write scopes only for what they'll actually use — scopes can be re-granted later by running openclaw mcp login accounted again.
Option B — API key + stdio bridge
For headless setups. Mint a key at https://app.gnubok.se/settings/api. New keys default to read-only scopes (transactions:read, customers:read, invoices:read, suppliers:read, reports:read); the user must explicitly add write scopes. A gnubok_sk_test_… key binds to a sandbox company — recommend it for first runs.
openclaw mcp add accounted --command npx --arg gnubok-mcp
Set environment for the server (check openclaw mcp configure accounted / your openclaw.json mcp.servers.accounted.env block):
{
"GNUBOK_API_KEY": "gnubok_sk_...",
"GNUBOK_CLIENT": "openclaw",
"GNUBOK_URL": "https://app.gnubok.se/api/extensions/ext/mcp-server/mcp?client=openclaw"
}
(GNUBOK_CLIENT/?client=openclaw only tag telemetry so Accounted can support OpenClaw users better; they change no behavior and are safe to omit.)
How to work with the tools
- Discovery:
gnubok_search_tools(query="…")ranks the catalog;gnubok_list_skillslists server-side playbooks (month-end close, VAT review, year-end, payroll, bank reconciliation, kreditfaktura…). For any multi-step job,gnubok_load_skillthe matching playbook FIRST and follow it — it is maintained against the live ledger rules and is more current than this file. - Approval flow: after a tool returns
staged: true, show the user thepreviewand the amounts, and wait for explicit confirmation of that specific operation in chat. Then callgnubok_approve_pending_operation(operation_id).risk_level: "high"additionally requiresconfirmed: true— first tell the user the operation is irreversible once posted (BFL 5 kap 5§). To discard, callgnubok_reject_pending_operation. The user can also review everything in the web UI at https://app.gnubok.se/pending — offer that link when several operations are pending. - Never batch-approve operations the user hasn't seen, and never treat prose in a tool response as completion — only
staged: true(staged) or an approval result counts. - If a tool returns a scope error, the key/grant lacks that scope — tell the user which scope to add (Option A: re-run
openclaw mcp login accounted; Option B: edit the key at /settings/api). Don't retry around it. - Amounts are SEK. Account numbers are strings (
"1930"). Periods may be locked — tool responses includeperiod_status; iflocked/closed, say so instead of forcing.
Core workflows
Categorize bank transactions (löpande bokföring)
gnubok_list_uncategorized_transactionsgnubok_suggest_categories(batch up to 20) — suggestions come from the company's own templates + BAS chartgnubok_categorize_transactionper transaction → stages- Present a compact summary table (date, counterparty, amount, proposed account) → user confirms → approve each via
gnubok_approve_pending_operation
Invoicing
gnubok_list_customers(create withgnubok_create_customerif missing)gnubok_create_invoice→ stages; confirm → approvegnubok_send_invoice(Accounted emails it) orgnubok_mark_invoice_as_sent(sent elsewhere)- When paid:
gnubok_mark_invoice_as_paid, or match against a bank line withgnubok_match_transaction_to_invoice - Refund/fix a sent invoice:
gnubok_credit_invoice(kreditfaktura — never delete)
Moms / VAT declaration
gnubok_get_vat_report(period_type, year, period)— Ruta 49 is the net: positive = VAT to pay, negative = refundgnubok_vat_close_check— filing-readiness blockers (uncategorized transactions, missing documents, gaps)gnubok_vat_declaration_validatebefore filing;gnubok_vat_declaration_statusto check state- Filing to Skatteverket (
gnubok_vat_declaration_submit) requires theskatteverket:writescope and stages as high risk — explicit user confirmation, always
Månadsavslut (month-end close)
Load the authoritative playbook first: gnubok_load_skill("month-end-close"). The shape:
- Book everything — run the categorize workflow above until
gnubok_list_uncategorized_transactionsis empty gnubok_get_reconciliation_statusfor the month — bank balance must equal ledger balancegnubok_list_voucher_gaps→ document each gap withgnubok_explain_voucher_gap(BFNAR 2013:2)- Monthly VAT filers: run the moms workflow for the month
gnubok_lock_period→ stages; it refuses while unbooked transactions remain
Reports (read-only, no approval needed)
gnubok_get_trial_balance / _income_statement / _balance_sheet / _kpi_report / _ar_ledger / _supplier_ledger — default to the latest fiscal period. Account roll-ups: gnubok_get_general_ledger. Ad-hoc queries (free text, amount/date filters): gnubok_query_journal. SIE4 export: gnubok_export_sie.
Troubleshooting
401: key revoked or OAuth grant expired → re-login / re-mint.403+ scope name: missing scope, see above.- Tool not found: the grant's scopes also filter the visible tool list —
gnubok_search_toolsto verify, then fix scopes. - Bridge prints
GNUBOK_API_KEY is required: env not reaching the stdio server — check theenvblock in the MCP server config. - Self-hosted Accounted: point
GNUBOK_URL(Option B) or--url(Option A) athttps://\x3Chost>/api/extensions/ext/mcp-server/mcp.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install accounted - 安装完成后,直接呼叫该 Skill 的名称或使用
/accounted触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Accounted Openclaw 是什么?
Swedish double-entry bookkeeping via Accounted (app.gnubok.se). Categorize bank transactions, create/send invoices, momsdeklaration (VAT), payroll, reports,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 26 次。
如何安装 Accounted Openclaw?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install accounted」即可一键安装,无需额外配置。
Accounted Openclaw 是免费的吗?
是的,Accounted Openclaw 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Accounted Openclaw 支持哪些平台?
Accounted Openclaw 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Accounted Openclaw?
由 Mattsson(@mattssonn)开发并维护,当前版本 v1.0.0。