Beancount Query

v1.0.0Finance & Fintechstable

Beancount MCP Server is an experimental implementation that utilizes the Model Context Protocol (MCP) to enable AI assistants to query and analyze Beancount ledger files using Beancount Query Language (BQL) and the beanquery tool.

beancountmcpmcp-servermodel-context-protocolpersonal-finance
Share:
46
Stars
0
Downloads
0
Weekly
0/5

What is Beancount Query?

Beancount Query is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to beancount mcp server is an experimental implementation that utilizes the model context protocol (mcp) to enable ai assistants to query and analyze beancount ledger files using beancount query language...

Beancount MCP Server is an experimental implementation that utilizes the Model Context Protocol (MCP) to enable AI assistants to query and analyze Beancount ledger files using Beancount Query Language (BQL) and the beanquery tool.

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Beancount MCP Server is an experimental implementation that

Use Cases

Query Beancount financial ledgers with BQL language
Enable AI-assisted plaintext accounting analysis
vanto

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx beanquery

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Beancount Query

The Beanquery MCP server connects AI assistants directly to Beancount plaintext accounting ledger files, enabling natural language queries against financial data using Beancount Query Language (BQL). It exposes tools for executing BQL queries and browsing account structures, so you can ask an AI to analyze spending, summarize balances, or audit transactions without leaving your chat interface. This is especially valuable for developers and accountants who maintain ledgers in Beancount and want AI-assisted financial analysis without exporting data.

Prerequisites

  • Python 3.10+ installed
  • uv package manager installed (https://github.com/astral-sh/uv)
  • Beancount ledger file (.bean) available on disk
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Clone the repository

Clone the beanquery-mcp repository to your local machine so you have the server.py and dependencies available.

git clone https://github.com/vanto/beanquery-mcp.git
cd beanquery-mcp
2

Install dependencies with uv

Use uv to install the required beancount and beanquery Python packages that the server depends on.

uv pip install beancount beanquery
3

Set the BEANCOUNT_LEDGER environment variable

The server requires a BEANCOUNT_LEDGER environment variable pointing to your .bean ledger file. You can set it inline or via a .env file.

export BEANCOUNT_LEDGER=/path/to/your/ledger.bean
4

Install the server into Claude Desktop

Use uv run mcp install to register the server with Claude Desktop, supplying the ledger path and required packages.

uv run mcp install server.py -v BEANCOUNT_LEDGER=/path/to/your/ledger.bean \
  --with beancount --with beanquery
5

Verify server startup

Test the server in development mode to confirm it loads the ledger and exposes the BQL tools correctly.

mcp dev server.py

Beancount Query Examples

Client configuration

Add to your claude_desktop_config.json to register the beanquery MCP server with the path to your ledger file.

{
  "mcpServers": {
    "beanquery": {
      "command": "uv",
      "args": ["run", "server.py"],
      "env": {
        "BEANCOUNT_LEDGER": "/path/to/your/ledger.bean"
      }
    }
  }
}

Prompts to try

Example queries you can send to your AI assistant once the beanquery server is connected.

- "Run a BQL query to show my total expenses by category for 2024"
- "List all accounts in my Beancount ledger"
- "What tables are available to query in my ledger?"
- "Show me all transactions in the Expenses:Food account from last month"

Troubleshooting Beancount Query

Server fails to start with 'BEANCOUNT_LEDGER not set' error

Ensure the BEANCOUNT_LEDGER environment variable is set to the absolute path of your .bean file, either in the env block of the MCP config or exported in your shell before running the install command.

BQL queries return parse errors

Beancount Query Language has specific syntax — ensure field names and table names match your ledger structure. Use the beanquery://tables resource to see available tables and beanquery://accounts to see account names before writing queries.

beancount or beanquery packages not found

Pass --with beancount --with beanquery to the uv run mcp install command, or install them manually with uv pip install beancount beanquery in the project directory.

Frequently Asked Questions about Beancount Query

What is Beancount Query?

Beancount Query is a Model Context Protocol (MCP) server that beancount mcp server is an experimental implementation that utilizes the model context protocol (mcp) to enable ai assistants to query and analyze beancount ledger files using beancount query language (bql) and the beanquery tool. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Beancount Query?

Follow the installation instructions on the Beancount Query GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Beancount Query?

Beancount Query works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Beancount Query free to use?

Yes, Beancount Query is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "beanquery": { "command": "npx", "args": ["-y", "beanquery"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Beancount Query?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides