
Beanquery MCP Server
An experimental server implementing the Model Context Protocol to allow AI assistants to query and analyze financial data stored in Beancount ledger files using the Beancount Query Language.
README
Beanquery MCP
The Beancount MCP Server is an experimental implementation of the Model Context Protocol (MCP) designed to interface with Beancount ledger files. Leveraging the Beancount Query Language (BQL) and the beanquery tool, this server enables seamless querying and analysis of financial data stored in Beancount format. By integrating MCP, the server facilitates standardized communication between AI assistants and Beancount ledgers, enhancing the accessibility and utility of financial data.
Note: This server is experimental and may undergo significant changes. It is recommended to use it in a development environment and provide feedback for further improvements.
A generated sample ledger can be found in sample.bean
Available Resources and Tools
- Tools:
set_ledger_file
: Set the Beancount ledger file to use for queries (if not set via environment variable).run_query
: Run a BQL query against the loaded Beancount file.
- Resources:
beanquery://tables
: Get a list of tables that BQL can access.beanquery://accounts
: Get a list of accounts in the loaded Beancount file.
Example using Claude.ai
For a screenshot with expanded MCP interactions, see here.
⚠️ Privacy Warning
This tool interfaces with language model providers (LLMs) via the Model Context Protocol (MCP), and as such may transmit parts of your Beancount ledger—including potentially confidential or private financial information—to third-party services.
Please use this tool with caution, especially when:
- Your ledger contains sensitive data (e.g., client names, salary details, health-related expenses).
- You are using a cloud-hosted or non-self-hosted LLM backend.
Recommendations:
- Mask or redact sensitive data in test ledgers.
- Use self-hosted LLMs when possible.
- Review the data being sent via MCP to ensure compliance with your privacy and security requirements.
[!CAUTION] You are responsible for the protection of your financial data. Do not share ledgers you would not be comfortable exposing.
Setup
Prerequisites
- Python 3.10 or later
- uv for managing Python projects (recommended)
Usage
Running the Server
-
Development Mode: Use the MCP Inspector to test and debug your server:
mcp dev server.py
-
Claude Desktop Integration: Install the server into Claude Desktop:
mcp install server.py
-
Quick Start:
uv run mcp install server.py -v BEANCOUNT_LEDGER=$(pwd)/sample.bean --with beancount --with beanquery
-
Custom Name:
uv run mcp install server.py --name "Beanquery MCP Server" --with beancount --with beanquery
-
Environment Variables:
uv run mcp install server.py -v BEANCOUNT_LEDGER=/path/to/your/ledger.bean --with beancount --with beanquery uv run mcp install server.py -f .env --with beancount --with beanquery
-
Testing
Run the test suite using pytest
:
pytest server_test.py
Contributing
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature description"
- Push to your branch:
git push origin feature-name
- Open a pull request.
License
This project is licensed under the MIT License. See the LICENSE
file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.