YNAB MCP Server
Exposes YNAB API endpoints as MCP tools, allowing AI assistants to manage budgets, accounts, transactions, and more through natural language.
README
YNAB MCP Server
An MCP (Model Context Protocol) server for the YNAB (You Need A Budget) API, built with FastMCP.
This server automatically exposes all YNAB API endpoints as MCP tools, allowing AI assistants like Claude to interact with your YNAB budgets, accounts, transactions, and more.
Prerequisites
- Python 3.11 or higher
- uv package manager
- A YNAB account with API access
Setup
1. Clone the Repository
git clone https://github.com/rgarcia/ynab-mcp-server.git
cd ynab-mcp-server
2. Get Your YNAB API Token
- Log in to your YNAB account at app.ynab.com
- Go to Account Settings → Developer Settings
- Click New Token under "Personal Access Tokens"
- Give your token a name and click Generate
- Copy the token (you won't be able to see it again!)
3. Install Dependencies
uv sync
Running the Server
With Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ynab": {
"command": "/absolute/path/to/this/project/.venv/bin/ynab-mcp-server",
"args": [],
"env": {
"YNAB_API_TOKEN": "your-token-here"
}
}
}
}
With Claude Code
Use Claude Code's MCP CLI (claude mcp add). Replace /absolute/path/to/this/project with where you cloned this repo. The -- before the server executable is required so the CLI parses the command path correctly.
For all projects (user scope):
claude mcp add ynab --scope user \
-e "YNAB_API_TOKEN=your-token-here" \
-- /absolute/path/to/this/project/.venv/bin/ynab-mcp-server
For the current directory only, omit --scope user or use --scope local. Use claude mcp list to verify and claude mcp remove ynab --scope user (or local) to uninstall.
With Cursor
Add the following to your Cursor MCP settings (~/.cursor/mcp.json for global or .cursor/mcp.json in your project):
{
"mcpServers": {
"ynab": {
"command": "/absolute/path/to/this/project/.venv/bin/ynab-mcp-server",
"args": [],
"env": {
"YNAB_API_TOKEN": "your-token-here"
}
}
}
}
With OpenCode
Add the following to your OpenCode configuration file (~/.config/opencode/opencode.json):
{
"mcp": {
"ynab": {
"type": "local",
"command": ["/absolute/path/to/this/project/.venv/bin/ynab-mcp-server"],
"enabled": true,
"environment": {
"YNAB_API_TOKEN": "your-token-here"
}
}
}
}
Available Tools
The server automatically exposes all YNAB API endpoints as MCP tools. Here are some of the available operations:
User
getUser- Get authenticated user information
Budgets
getBudgets- List all budgetsgetBudgetById- Get a single budget with all related entitiesgetBudgetSettingsById- Get budget settings
Accounts
getAccounts- List all accounts for a budgetgetAccountById- Get a single accountcreateAccount- Create a new account
Categories
getCategories- List all categories for a budgetgetCategoryById- Get a single categoryupdateCategory- Update a categorygetMonthCategoryById- Get a category for a specific monthupdateMonthCategory- Update a category for a specific month
Transactions
getTransactions- List transactionsgetTransactionById- Get a single transactioncreateTransaction- Create a new transactionupdateTransaction- Update a transactiondeleteTransaction- Delete a transactionimportTransactions- Import transactionsgetTransactionsByAccount- List transactions for an accountgetTransactionsByCategory- List transactions for a categorygetTransactionsByPayee- List transactions for a payee
Payees
getPayees- List all payeesgetPayeeById- Get a single payeeupdatePayee- Update a payee
Scheduled Transactions
getScheduledTransactions- List scheduled transactionsgetScheduledTransactionById- Get a single scheduled transactioncreateScheduledTransaction- Create a new scheduled transactionupdateScheduledTransaction- Update a scheduled transaction
Months
getBudgetMonths- List budget monthsgetBudgetMonth- Get a single budget month
Example Usage
Once connected, you can ask Claude things like:
- "Show me my YNAB budgets"
- "What's my current balance in my checking account?"
- "List my transactions from last week"
- "Create a transaction for $50 at the grocery store"
- "How much have I spent on dining out this month?"
Creating Custom Skills for Your YNAB Workflow
YNAB workflows are personal. Everyone has their own conventions for handling transactions, categorizing expenses, and managing duplicates. This repo includes a skill system that lets you encode your personal conventions so Claude can learn and apply them consistently.
Step 1: Explore Your Budget
Start by asking Claude to do something useful with your YNAB data:
"Show me all my unapproved transactions"
"Help me categorize my uncategorized transactions"
"Find duplicate transactions in my budget"
Work through the task interactively. As you do, you'll naturally develop conventions. For example:
- "Venmo transactions always have a matching withdrawal in my checking account - I delete the Venmo one and keep the bank record"
- "Transactions from 'AMZN' should be categorized as 'Shopping' unless the memo mentions 'Kindle'"
- "Any transaction over $500 should be flagged for review"
Step 2: Create a Skill to Encode Your Conventions
Once you've established patterns you want to reuse, create a skill to encode them. This repo includes the skill-creator skill in .skills/skill-creator/ to help you build custom skills.
Ask Claude:
"Load the skill-creator skill and help me create a ynab skill that encodes
the conventions we just used for processing transactions"
The skill-creator will guide you through:
- Identifying the reusable patterns from your workflow
- Creating a SKILL.md file with your conventions
- Structuring the skill for future use
Step 3: Use Your Skills
Once created, your skills live in .skills/ and Claude will automatically apply them when relevant. You can:
- Add more conventions as you discover them
- Share skills with others who have similar YNAB setups
- Build on the included examples
Included Skills
.skills/skill-creator/- Claude's official guide for creating new skills, included for convenience
Development
Project Structure
.
├── pyproject.toml
├── README.md
├── uv.lock
└── src/
└── ynab_mcp_server/
├── __init__.py
└── server.py
How It Works
This server uses FastMCP's from_openapi() method to automatically generate MCP tools from YNAB's OpenAPI specification. When the server starts, it:
- Fetches the YNAB OpenAPI spec from
https://api.ynab.com/papi/open_api_spec.yaml - Parses the specification
- Creates an authenticated HTTP client with your API token
- Generates MCP tools for each API endpoint
Resources
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。