← Back to Projects
Countbean

Countbean

Hosted plain-text accounting — Beancount and Fava running as a cloud service on Fly.io, with a Claude Code plugin that reads and writes the ledger directly

PythonDockerFly.ioCaddyMCPClaude CodeTypeScript

Plain-text accounting is genuinely the best way to own your financial data — your books are a text file in Git, every change is a diff, and there is no proprietary format to be held hostage by. It has also, historically, been nerds-only: you self-host the stack, you secure it yourself, and you hand-write every double-entry posting.

Countbean removes both halves of that tax. It packages Beancount and its web UI Fava as a deployable multi-tenant service, and ships a Claude Code plugin that lets an AI agent maintain the ledger for you. It operates as part of the DevClusterAI software cluster.


Architecture

Architecture and request flow: browser through Caddy and Fava, Claude Code through the MCP server, both terminating at a git-backed ledger

Two paths reach the same file:

  1. Browser: Arrives over HTTPS at Caddy on port 8080, which enforces basic auth against a bcrypt hash held in Fly secrets, then proxies to Fava on port 5000.
  2. AI Agent: Claude Code connects via our open-source MCP plugin or cloud device authorization flow to append validated postings directly.

Learn more about the full technical stack in the Countbean how it works guide.

The auth layer is the reason this is safe to expose at all — Fava ships no authentication of its own, because it assumes you’re running it on localhost. The ledger itself lives at /data/ledger.beancount on a persistent Fly volume, so it survives redeploys.

The machine auto-stops when idle and auto-starts on request, so an active instance costs roughly a dollar or two a month. First request after a sleep takes a couple of seconds to wake.


The agent-facing half

The interesting part isn’t the hosting — it’s that a plain-text ledger is a format an AI agent can actually operate on. Rows behind someone else’s API can only be summarized; a text file can be maintained.

Countbean ships as a Claude Code plugin bundling:


Why plain text wins

Four panels: ownership through git history, portability as just a text file, agent-native MCP access, and validation through double entry

The safety model falls out of the substrate rather than being bolted on. Beancount rejects transactions that don’t balance, so the ledger validates every write with bean-check before it lands. Every AI change is a Git diff you can read and revert. Ingesting a bank export or a receipt becomes “propose postings, review the diff, commit” — which is a far better story than trusting a model’s output blind.


Technical details


Current Status & Next Steps

Countbean is live in production with self-serve onboarding. You can explore our pricing plans on countbean.com/pricing or create a free ledger at app.countbean.com/signup.