ynab-mcp
ynab-mcp
一个公开完整 YNAB API 的 MCP (Model Context Protocol) 服务器,允许 LLM 通过自然语言读取和管理您的预算。提供用于 CRUD 操作的工具、用于环境预算上下文的资源,以及用于引导财务工作流的提示词。
要求
Node.js 20+
一个 YNAB 个人访问令牌
Related MCP server: YNAB MCP Server
安装
npm install -g ynab-mcp或从源码安装:
git clone https://github.com/justmytwospence/ynab-mcp.git
cd ynab-mcp
npm install
npm run build
npm install -g .配置
将您的 YNAB API 令牌设置为环境变量:
export YNAB_API_TOKEN="your-token-here"在 YNAB > 账户设置 > 开发者设置 中生成令牌。
Claude Code
claude mcp add ynab-mcp ynab-mcp -e YNAB_API_TOKEN=your-token-hereClaude Desktop
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"ynab-mcp": {
"command": "ynab-mcp",
"env": {
"YNAB_API_TOKEN": "your-token-here"
}
}
}
}工具
50 个涵盖完整 YNAB API 的工具。所有金额均使用 YNAB 的毫单位格式(例如 $12.34 = 12340)。
速率限制感知
YNAB API 对每个令牌的限制为 每小时 200 次请求(滑动窗口)。服务器会跟踪每次调用并公开:
get_api_usage工具 /ynab://api-usage资源 — 显式、按需检查(0 次 API 调用)。自动警告:一旦使用量变高,每个工具结果后都会附加警告:
[RATE LIMIT WARNING]:剩余 50 次或更少时[RATE LIMIT CRITICAL]:剩余 20 次或更少时[RATE LIMIT REACHED]:剩余 0 次时
每个工具的描述中都包含其 API 调用成本(例如 [1 API call])。请优先使用批量工具(create_transactions,update_transactions)而不是单次调用工具的循环。
用户
工具 | 描述 |
| 获取已认证用户信息 |
预算
工具 | 描述 |
| 列出所有预算及可选的账户信息 |
| 获取预算的完整详情,包括所有实体 |
| 获取日期和货币格式设置 |
账户
工具 | 描述 |
| 列出所有账户及其余额和类型 |
| 获取单个账户的详情 |
| 创建新账户 |
类别
工具 | 描述 |
| 列出所有按类别组分组的类别 |
| 获取单个类别的详情 |
| 创建新类别 |
| 更新类别的名称、备注或目标 |
| 获取特定月份的类别预算 |
| 更新某个月份中类别的预算金额 |
| 创建新的类别组 |
| 更新类别组名称 |
交易
工具 | 描述 |
| 列出交易(带可选过滤器) |
| 获取单个交易的详情 |
| 创建新交易 |
| 批量创建多个交易 |
| 更新现有交易 |
| 批量更新多个交易 |
| 删除交易 |
| 从关联的金融机构导入 |
| 列出特定账户的交易 |
| 列出特定类别的交易 |
| 列出特定收款人的交易 |
| 列出特定月份的交易 |
计划交易
工具 | 描述 |
| 列出所有计划/定期交易 |
| 获取计划交易的详情 |
| 创建新的计划交易 |
| 更新计划交易 |
| 删除计划交易 |
收款人
工具 | 描述 |
| 列出所有收款人 |
| 获取单个收款人的详情 |
| 更新收款人名称 |
收款人位置
工具 | 描述 |
| 列出所有收款人 GPS 位置 |
| 获取单个收款人位置 |
| 获取特定收款人的所有位置 |
月份
工具 | 描述 |
| 列出所有预算月份及摘要 |
| 获取包含类别余额的详细月份信息 |
资金变动
工具 | 描述 |
| 列出所有资金变动 |
| 获取特定月份的资金变动 |
| 列出所有资金变动组 |
| 获取特定月份的资金变动组 |
工作流
工具 | 描述 |
| 将源类别合并到目标类别,移动所有交易和预算金额 |
| 清理待删除类别:将所有历史记录重新分类到替代类别并将预算归零(最终删除需在 YNAB 应用中手动完成 — API 限制) |
| 审计信用卡付款类别余额与卡余额是否一致,支持可选的自动修复 |
资源
资源提供结构化的预算数据,客户端无需调用工具即可将其引入上下文。模板资源使用 URI 参数(例如 {budget_id})。
资源 | URI | 描述 | API 成本 |
API 使用情况 |
| 当前速率限制状态:已用调用次数、剩余次数、窗口重置时间 | 0 |
预算摘要 |
| 包含账户、余额和类别组的预算概览 | 1 |
账户列表 |
| 所有账户及其类型、余额、已清算/未清算余额 | 1 |
月度类别 |
| 某个月份的所有类别及其预算、活动和余额 | 1 |
提示词
提示词是引导式工作流模板,用户可以调用它们来完成常见的预算任务。它们会指示 LLM 调用哪些工具以及如何解读结果。
提示词 | 参数 | 描述 |
|
| 审查预算月份:超支类别、支出差异、未达标目标、信用卡不匹配 |
|
| 审计交易:查找未分类、未批准、重复及金额异常的交易 |
|
| 引导式演练:账户、类别、目标、计划交易、资金分配 |
|
| 类别细分、预算与实际对比、主要收款人、收入与支出对比 |
|
| 审计信用卡付款类别余额,采用先试运行、后确认应用的流程 |
开发
npm run dev # Watch mode with tsx
npm run build # Compile TypeScript
npm start # Run compiled server许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables interaction with You Need A Budget (YNAB) via their API, allowing users to manage budgets, accounts, categories, and transactions through natural language.2MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides Large Language Models with access to YNAB (You Need A Budget) budgets, allowing them to fetch budget data including accounts, categories, and category groups.6
- AlicenseAqualityDmaintenanceA minimal and auditable MCP server that enables local AI assistants to read and manage YNAB budget data. It supports operations like listing accounts, tracking transactions, and moving money between categories while maintaining user privacy.9MIT
- AlicenseBqualityCmaintenanceExposes YNAB API endpoints as MCP tools, allowing AI assistants to manage budgets, accounts, transactions, and more through natural language.4490MIT
Related MCP Connectors
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Hosted remote MCP server for YNAB on Cloudflare Workers with OAuth
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/justmytwospence/ynab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server