runBqlQuery
Run BQL (Beancount Query Language) queries against balances, transactions, and accounts.
Model Context Protocol
Connect Beancount to the AI tools you already use. Ask about your finances, work with your ledger files, and keep changes traceable in Git.
Start with a question. Follow the answer back to your ledger.
runBqlQuerySELECT sum(position) WHERE account ~ 'Assets|Liabilities'Works with your MCP-compatible client
Choose your client, add the server, and authorize one ledger.
Run this one command in your terminal.
Open Claude Code and run /mcp to authenticate. Sign in to Web Beancount and choose your ledger.
Approve once. Credentials refresh automatically from here.
claude mcp add --transport http beancount https://beancount.io/api-gateway/mcpHave more than one ledger? Add the server again under a different name and authorize the other ledger in its own prompt:
claude mcp add --transport http beancount-business https://beancount.io/api-gateway/mcpUse your Web Beancount account to authorize access to a single ledger.
Don't have a Web Beancount account? Sign up at beancount.io — your ledger is one git push away.
The server exposes focused tools for your ledger, your API keys, and your bank connections — the ledger verbs are shown below. The AI composes them: discover your file structure, read for context, query for answers, propose an edit.
Ledger, API-key, and bank tools. Your client decides how to use them.
Run BQL (Beancount Query Language) queries against balances, transactions, and accounts.
Browse the directory structure of your ledger repository.
Read the contents of your .beancount files and other ledger documents.
Create, update, replace, or delete files in an atomic git commit.
An AI with write access to your books earns trust through design, not promises.
One session is authorized for exactly one ledger. A session for your personal ledger cannot touch your business ledger — blast radius, limited.
editLedgerFiles supports a dry_run mode that validates and previews the exact changes without writing anything, so your client can show you a diff first.
Changes land as real commits ("AI edit: …") in your ledger's repository — a full audit trail you can review and revert with standard git tools.
The MCP server keeps no session state between tool calls. Your chosen AI client and model receive the results you request; check their data policies before connecting.
Your whole ledger is a git repository already.
See how Git for Beancount worksWhat to know before you connect.
Curious how it's built?
Read the engineering FAQ on the blogMCP (Model Context Protocol) is an open standard that lets AI assistants call external tools and data sources in a structured, safe way. Instead of guessing or asking you to paste data, your AI client connects directly to your ledger — it queries your real data, reads your actual files, and makes precise edits.
Any MCP-compatible client that supports OAuth 2.1 works out of the box, including Claude Code, Claude Desktop, Cursor, Windsurf, and Zed. Clients without OAuth 2.1 support can connect with a static token generated in your beancount.io account settings.
Add the server URL to your client's MCP configuration. On first use the client opens a browser window — log in with your Web Beancount account and pick the ledger you want to grant access to. The client stores and refreshes credentials automatically from there.
The server exposes focused tool families — the machine-readable discovery manifest under beancount.io/.well-known/ lists the current set. Ledger tools run Beancount Query Language queries (runBqlQuery), browse the repository (listLedgerFiles), read ledger documents (readLedgerFiles), and create, update, or delete files in an atomic git commit (editLedgerFiles, with a dry_run preview mode). Further tools manage API keys (list, mint, revoke — minting needs a paid plan and an OAuth grant, not an API key) and bank connections and imports (stage, submit, or discard transactions; a brand-new bank is linked in the browser, not over MCP). The AI combines them to answer questions and propose edits.
Edits go through the editLedgerFiles tool. A dry_run mode previews the planned file operations without committing anything, and whether your client asks before a real commit depends on the client. Every committed change lands as a real git commit — a full audit trail you can revert with standard git tools. The commit path can report validation errors after the write, so preview first and verify the ledger afterwards.
Your ledger data passes through the Web Beancount backend and returns as tool results to your AI client. The AI model you choose receives those results, so its provider’s data policies also apply. Each authorized session is scoped to one ledger.
The Beancount MCP server is available today to all Web Beancount users. Your ledger is one git push away.