YNAB MCP Server is a Model Context Protocol server that integrates with You Need A Budget (YNAB). It enables AI assistants to interact with your YNAB budgets, providing powerful automation and analysis capabilities for managing your finances.
No installation is needed when using uvx. You can run the server directly with:
# Run directly (recommended)
uvx ynab-mcp-server
# Or with specific version
uvx [email protected]
Locate your configuration file:
Add the YNAB MCP server configuration:
{
"mcpServers": {
"ynab-mcp": {
"command": "uvx",
"args": ["ynab-mcp-server"],
"env": {
"YNAB_PAT": "your_token_here"
}
}
}
}
Optional environment variables:
"env": {
"YNAB_DEFAULT_BUDGET_ID": "your_budget_id",
"YNAB_READ_ONLY": "true"
}
For other MCP-compatible platforms, configure using these parameters:
Your server can be configured using environment variables. You can place these in a .env file in the project root or set them in your shell.
Variable | Required | Description |
---|---|---|
YNAB_PAT | Yes | Your YNAB Personal Access Token |
YNAB_DEFAULT_BUDGET_ID | No | If set, the server operates in single-budget mode, always using this budget ID |
YNAB_READ_ONLY | No | Set to true to disable all tools that make changes to your YNAB data |
Get Your YNAB Token
Set Up Environment
Create a .env file in your working directory:
YNAB_PAT="your_token_here"
YNAB_DEFAULT_BUDGET_ID="your_budget_id"
YNAB_READ_ONLY="true"
Or set the environment variable directly:
export YNAB_PAT="your_token_here"
The server provides a suite of tools for interacting with your YNAB data:
Tool | Description |
---|---|
manage-financial-overview | Get, update, or refresh a high-level financial overview. This is the best starting point for any analysis. |
list-accounts | List all accounts for a given budget. Useful for getting account IDs for other tools. |
get-month-info | Get detailed budget information for a single month, including age of money and total amounts. |
list-categories | List all categories, groups, and their budgeting details. Call this before managing budgeted amounts. |
list-transactions | List transactions for a specific account or an entire month. Use this to investigate spending patterns. |
list-scheduled-transactions | List all upcoming scheduled transactions. Useful for forecasting upcoming bills. |
manage-budgeted-amount | Assign a budgeted amount to a category or move money between categories. |
bulk-manage-transactions | Create, update, or delete multiple transactions at once. More efficient than making single changes. |
manage-scheduled-transaction | Create, update, or delete a single scheduled (recurring) transaction. |
list-payees | List all payees for a given budget. Good for finding payee IDs or identifying messy payee data. |
manage-payees | Merge multiple payee names into a single name. Use this to clean up payee data. |
lookup-entity-by-id | Look up the name and details of a specific account, category, or payee by its ID. |
lookup-payee-locations | Look up geographic locations associated with a payee. |
list-budgets | List all available YNAB budgets (Not available in single-budget mode). |
Complete Budget Management
Transaction Control
Financial Analysis
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "ynab-mcp" '{"command":"uvx","args":["ynab-mcp-server"],"env":{"YNAB_PAT":"your_token_here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"ynab-mcp": {
"command": "uvx",
"args": [
"ynab-mcp-server"
],
"env": {
"YNAB_PAT": "your_token_here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"ynab-mcp": {
"command": "uvx",
"args": [
"ynab-mcp-server"
],
"env": {
"YNAB_PAT": "your_token_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect