# Find the right accounting tool for your AI agent.

Five tools. Seven workflow criteria. Start with where your books live and what your agent needs to do.

[Compare the workflows](https://beancount.io/compare/best-accounting-tools-for-ai-agents#comparison) [Install bea](https://beancount.io/for-ai-agents)

Published by Beancount.io, one of the tools compared. We ran the Beancount workflow; competitor capabilities come from their documentation.

Sources checked September 10, 2026 · MCP details rechecked November 1, 2026

## Five tools. Five different fits.

This order prioritizes agents that draft ledger changes: observed preview and repeat-safe imports, then documented workflows, then cloud access and read-only-by-default tools. Choose the fit for your books.

1. ### Beancount.io

   Free core · local files, no account needed

   Observed run

   Local plain-text double-entry books with a CLI built for agents: preview before apply, repeat-safe imports, and the only observed end-to-end run on this page.

   **Best for:**

   Agent-builders who want every ledger change previewed as text and verified before it lands.

   #### Strengths

   - Observed preview-first run: 3 ready, 0 written, ledger bytes preserved
   - Repeat apply writes 0 with 3 exact duplicates; an unbalanced write is rejected
   - No account, local files, and machine-readable JSON output

   #### Trade-offs

   - You own the setup: chart of accounts and hosting are yours to arrange
   - Your accountant may need exported reports rather than direct access

   [Install bea](https://beancount.io/for-ai-agents) [Read the recorded run](https://beancount.io/bean-labs/research-logs/2026/09/10/can-your-agent-balance-these-books)

2. ### hledger

   Free, open source

   Documentation reviewed

   Local plain-text accounting with a documented dry-run and idempotent import workflow, maintained since 2007.

   **Best for:**

   Plain-text scripting veterans who want local double-entry without a new platform.

   #### Strengths

   - Documented import with a dry run plus idempotent re-import
   - Local journal files — no accounts, no cloud
   - Reports to terminal, HTML, CSV, JSON or SQL

   #### Trade-offs

   - The agent path is the documented CLI, not an observed agent run
   - Plain-text setup suits technical users most

   [Official sources](https://hledger.org/hledger.html)

3. ### Xero

   Cloud ledger · developer account and OAuth required

   Documentation reviewed

   A hosted Remote MCP server, generally available, plus an open-source local server, CLI and agentic SDK — read and write tools scoped by OAuth grants against your Xero org.

   **Best for:**

   Agents operating inside an existing Xero organisation.

   #### Strengths

   - Official read and write tools: invoices, contacts, payments, journals and more
   - LLM-oriented TOON output alongside JSON and CSV
   - Hosted Remote MCP: nothing to install, OAuth with PKCE

   #### Trade-offs

   - Needs a Xero account, a developer app and granted scopes; Remote MCP on a live organisation needs the Core plan or above
   - Remote MCP V1 writes ask for no confirmation; Xero advises building your own step

   [Official sources](https://developer.xero.com/ai)

4. ### QuickBooks Online

   Cloud ledger · Intuit sign-in or developer app

   Documentation reviewed

   Intuit's hosted QuickBooks connector for Claude (US) and ChatGPT, plus an official open-source MCP server with full entity CRUD and financial reports.

   **Best for:**

   Agents operating inside an existing QuickBooks Online company.

   #### Strengths

   - Full create, read, update, delete and search over 29 entity types plus 11 reports
   - Flags to run read-only by disabling write, update or delete categories
   - Hosted Claude connector: Intuit sign-in, no developer app, destructive actions confirmed

   #### Trade-offs

   - The hosted connector is US-only; the local server needs an Intuit developer app and a browser OAuth handshake
   - A general preview-before-write is unverified in the sources checked

   [Official sources](https://github.com/intuit/quickbooks-online-mcp-server)

5. ### Puzzle

   Cloud ledger · MCP connector, read-only by default

   Documentation reviewed

   Read-only MCP access to a Puzzle company by default, with confirmed writes as an opt-in Beta — a Q\&A window first, not a bookkeeping backend.

   **Best for:**

   Conversational questions over a Puzzle company in Claude, ChatGPT, Cursor or Codex.

   #### Strengths

   - Lightest setup of the cloud options: a connector URL, no install
   - Works from Claude.ai on any plan, ChatGPT, Cursor and Codex
   - When writes are on, each change is confirmed with you before it is made

   #### Trade-offs

   - Read-only by default; writes are a Beta you turn on per connection
   - Rate limited, with no dry run or repeat-import behavior documented

   [Official sources](https://help.puzzle.io/en/articles/15331316-how-to-setup-your-puzzle-mcp)

## The same seven criteria, all five tools

Every tool is assessed against the same criteria. “Unverified” means the sources did not cover it; it does not mean the feature is missing.

| What matters                 | Beancount.io                                                                  | hledger                                                                   | Xero                                                                                                               | QuickBooks Online                                                                                                         | Puzzle                                                                                                   |
| ---------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Installation / prerequisites | Supported, observed: install bea 0.1.0; no account for local commands         | Supported: single binary via package manager or Docker (1.52.3)           | Hosted Remote MCP: nothing to install, Core-plan developer app; local server and CLI: Node 18+ and API credentials | Hosted connector: no install, US QuickBooks Online subscription; local server: clone, build, Intuit developer app         | No install: Puzzle account, MCP client and connector URL                                                 |
| Authentication               | None needed locally; hosted credentials only for bea ask                      | None needed: local files, no accounts                                     | Xero OAuth 2.0: PKCE for Remote MCP and CLI, or a Custom Connection for the local server                           | Hosted: Intuit sign-in and permission grant; local: OAuth2 app handshake, production needs public HTTPS                   | Puzzle OAuth for chosen companies; stays signed in if used once every 30 days                            |
| Read / write scope           | Reads and writes, observed: query, report, preview-then-apply import          | Reads via reports; writes by appending and via import                     | Remote MCP: 18 read tools and 21 create, update, authorise and void tools, scoped by OAuth grants                  | Hosted: reports, invoices, estimates, customers, transaction imports; local: full CRUD and search, writes can be disabled | Read-only by default; write Beta per connection: categorize, bills, invoices, journal entries, reconcile |
| Local vs cloud data          | Local: plain-text ledger files                                                | Local: plain-text journal                                                 | Cloud: hosted by Xero or run locally; ledger lives in the Xero org                                                 | Cloud: hosted connector or local stdio subprocess; ledger lives in the QBO company                                        | Cloud: hosted MCP endpoint over Puzzle company data                                                      |
| Preview / validation         | Observed: preview 3 ready / 0 written; check valid; unbalanced write rejected | Documented: import dry run; entries balanced and validated; check command | Remote MCP V1 asks no confirmation (Xero advises adding one); CLI validates file input; dry run unverified         | Hosted: destructive actions need confirmation; local: schema validation; dry run unverified                               | With writes on, each change is confirmed before it is made; dry run unverified                           |
| Structured output            | Observed: JSON envelopes with rows and columns, exit codes, BQL               | Reports to terminal, HTML, CSV, JSON or SQL                               | JSON, CSV and TOON output modes                                                                                    | MCP tool results plus invoice PDF download                                                                                | Unverified: conversational answers in the MCP client; result envelope not covered                        |
| Repeated imports             | Observed repeat-safe: reimport writes 0, bytes preserved                      | Documented idempotent re-import via hidden state files                    | Unverified in the sources checked                                                                                  | Unverified in the sources checked                                                                                         | Unverified: no import path documented                                                                    |

## Connecting an assistant over MCP instead?

### [Accounting MCP servers compared: QuickBooks, Xero, Beancount](https://beancount.io/compare/accounting-mcp-servers)

QuickBooks, Xero, Expensify, Puzzle and Beancount.io MCP servers, compared on write scope, authentication, previews and audit trail.

## Frequently Asked Questions

**Which accounting tool is best for an AI agent that drafts ledger changes?**

Beancount.io is the only tool on this page with an observed preview-first agent run behind it: the agent previews 3 ready rows, applies 3 entries, and a repeat apply writes 0 while the ledger bytes are preserved. hledger documents the same shape of workflow — dry-run import plus idempotent re-import — from its official manual. Xero and QuickBooks Online give agents official read and write tools behind their cloud OAuth setups, which fits agents operating inside an existing cloud org.

**Which accounting tool lets an AI agent re-run the same import safely?**

Beancount.io and hledger. On Beancount.io the behavior was observed: an identical repeat apply reports 0 ready with 3 exact duplicates, writes 0 entries and leaves the ledger bytes unchanged. hledger documents idempotent import in its manual, keeping state in a hidden .latest file so a re-run appends only new transactions. For Xero, QuickBooks Online and Puzzle, what a repeated import does is unverified in the sources checked. Agents retry, so test this before you let one import unattended.

**Does an AI agent need an account to work with a local ledger?**

No. Beancount.io's local import, query, report and check commands run on plain-text files with no account; only bea ask needs hosted credentials. hledger needs no account at all. Xero, QuickBooks Online and Puzzle keep the ledger in the cloud, so an agent first needs that service's account and an OAuth grant, whether it connects through a hosted MCP server or a local tool.

**Who publishes this comparison?**

Beancount.io publishes this page and is one of the five tools compared. Beancount.io cells link to an observed, reproducible run; competitor cells cite official documentation checked on 2026-09-10, with the Xero, QuickBooks Online and Puzzle details rechecked on 2026-11-01. No competitor was runtime-tested here, no paid account was used, and unknowns are labeled unverified rather than treated as failings.

![A green clay laptop beside an open ledger, neatly sorted receipts, and a small espresso cup.](https://beancount.io/img/for-ai-agents/ledger-workbench.webp)

## See what an agent can do with a ledger.

Install bea, hand your agent one task, and check the result yourself. Local books need no account.

[Install bea](https://beancount.io/for-ai-agents) [Read the recorded run](https://beancount.io/bean-labs/research-logs/2026/09/10/can-your-agent-balance-these-books)

## Where to look next

- [Sitemap](https://beancount.io/sitemap.xml) - all pages with hreflang alternates
- [LLMs index](https://beancount.io/llms.txt) - curated links for AI agents (also /llms-full.txt for full docs)
- [Documentation](https://beancount.io/docs) - every doc is also available as text/markdown via .md suffix or Accept negotiation
- [REST API reference](https://beancount.io/docs/api-reference) - interactive endpoints, schemas, authentication, and code samples
- [OpenAPI spec](https://beancount.io/openapi.json) - OpenAPI 3.1 spec for this website's public content endpoints; the product contract for ledger operations is at https://beancount.io/api-gateway/v1/openapi.json
- [GraphQL](https://beancount.io/graphql) - public, read-only content API over the blog and research logs (no credentials, no ledger data): 12 query fields over 23 types
- [MCP server](https://beancount.io/mcp) - Model Context Protocol at https://beancount.io/api-gateway/mcp
