A FastMCP server that lets AI assistants interact with your YNAB budget through the Model Context Protocol.
Configuration
View docs{
"mcpServers": {
"franccesco-ynab-mcp": {
"url": "http://localhost:8000/mcp",
"headers": {
"YNAB_ACCESS_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}You have a FastMCP server that exposes YNAB budget actions as modular tools you can call from AI assistants. This lets you ask questions about your budget, create or modify transactions, adjust categories, or review month details using natural language, all through a dedicated MCP endpoint you control.
You interact with this MCP server through a client that speaks the Model Context Protocol. When you start the server, it exposes an HTTP endpoint at /mcp and can also run locally as a stdio service. Use an MCP client to connect, then invoke tools by name to perform budget actions. Most common workflows include listing accounts, viewing or updating category budgets, creating transactions, and retrieving budget month details. For convenience, the server defaults to your last-used budget when you perform actions that require a budget context.
To perform an action, authorize your client with your YNAB access token and then call the relevant tool by its name. For example, you might request a list of accounts, add a new transaction, or fetch details for a specific budget month. The tools are designed to be used in natural language workflows, so you can combine multiple steps into a single conversation with your AI assistant.
Prerequisites: you need Python for this server and the uv command for running the MCP interface.
uv syncSet your YNAB access token from your YNAB Developer Settings and export it to your environment.
export YNAB_ACCESS_TOKEN="your_token_here"Alternatively, you can store the token in a local environment configuration file and load it automatically.
echo 'export YNAB_ACCESS_TOKEN="your_token_here"' > .envrc
direnv allowStart the MCP server so it becomes available at the MCP endpoint.
uv run python main.pyImportant notes for running and using the server.
Retrieve a list of YNAB accounts available in the selected budget.
Get detailed information for a specific YNAB account by its ID.
View budgets and notes for categories within a budget.
Update budgets or notes for a specific category.
Create a new transaction in a chosen account or category.
Read details of a specific transaction by its ID.
Update fields of an existing transaction.
Delete a transaction from the budget.
View details for a budget month, including spending and balances.
Retrieve information about the authenticated user.