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.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add beanquery -- uv run mcp install server.py -v 'BEANCOUNT_LEDGER=$(pwd)/sample.bean' --with beancount --with beanquery~/.codex/config.toml
[mcp_servers.beanquery]
command = "uv"
args = ["run", "mcp", "install", "server.py", "-v", "BEANCOUNT_LEDGER=$(pwd)/sample.bean", "--with", "beancount", "--with", "beanquery"]
# codex mcp add beanquery -- uv run mcp install server.py -v 'BEANCOUNT_LEDGER=$(pwd)/sample.bean' --with beancount --with beanquery~/.cursor/mcp.json
{
"mcpServers": {
"beanquery": {
"command": "uv",
"args": [
"run",
"mcp",
"install",
"server.py",
"-v",
"BEANCOUNT_LEDGER=$(pwd)/sample.bean",
"--with",
"beancount",
"--with",
"beanquery"
]
}
}
}.vscode/mcp.json
{
"servers": {
"beanquery": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"mcp",
"install",
"server.py",
"-v",
"BEANCOUNT_LEDGER=$(pwd)/sample.bean",
"--with",
"beancount",
"--with",
"beanquery"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"beanquery": {
"command": "uv",
"args": [
"run",
"mcp",
"install",
"server.py",
"-v",
"BEANCOUNT_LEDGER=$(pwd)/sample.bean",
"--with",
"beancount",
"--with",
"beanquery"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"beanquery": {
"command": "uv",
"args": [
"run",
"mcp",
"install",
"server.py",
"-v",
"BEANCOUNT_LEDGER=$(pwd)/sample.bean",
"--with",
"beancount",
"--with",
"beanquery"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"beanquery": {
"command": "uv",
"args": [
"run",
"mcp",
"install",
"server.py",
"-v",
"BEANCOUNT_LEDGER=$(pwd)/sample.bean",
"--with",
"beancount",
"--with",
"beanquery"
]
}
}
}