A Model Context Protocol server for interacting with YNAB
Project description
YNAB MCP Server
A Model Context Protocol (MCP) server for interacting with YNAB (You Need A Budget) via their API.
Features
- Get budgets, accounts, and categories
- Get, create and update transactions
- Create new categories
- Update budgeted amounts for categories
- Get budget summaries
Prerequisites
- Python 3.13 or higher
- A YNAB account with an API token (Get your token here)
- UV package manager (optional but recommended)
Installation
-
Clone this repository
git clone https://github.com/ntdef/ynab-mcp.git cd ynab-mcp
-
Create a virtual environment
uv venv -
Activate the virtual environment
- Windows:
venv\Scripts\activate - Unix/MacOS:
source venv/bin/activate
- Windows:
-
Install dependencies using UV
# python -m pip install uv uv sync
-
Copy
.env.exampleto.envand add your YNAB API tokencp .env.example .env # Edit .env with your favorite editor
Usage
Running the server
uv run ynab-mcp
The server will start in stdio mode, so you won't see any output.
Available tools
The YNAB MCP Server provides the following tools:
Budget management
get_budgets: Retrieve all budgets for the authenticated userget_budget_summary: Get a summary of the budget, optionally for a specific month
Account management
get_accounts: Retrieve all accounts for a specific budget
Category management
get_categories: Retrieve all categories for a specific budgetcreate_category: Create a new category in the specified budget groupupdate_category_budgeted: Update the budgeted amount for a category in a specific month
Transaction management
get_transactions: Retrieve transactions for a specific budget, optionally filtered by date, account, or categorycreate_transaction: Create a new transaction in the specified budgetupdate_transaction: Update one or more fields of a specific transaction
Development
Running tests
uv run pytest
Code style
This project uses Black and isort for code formatting. To format your code:
uv run isort src tests
uv run black src tests
License
MIT License
Acknowledgements
- Some of the code was written with the assistance of aider
- YNAB API Documentation
- fastmcp by Anthropic
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ynab_mcp-0.1.2.tar.gz.
File metadata
- Download URL: ynab_mcp-0.1.2.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7040b4ddd53b2976d4055b37e7a5835800439955d290c94fda7895abd8e47dd4
|
|
| MD5 |
1b9fb843278ebaafeae310ae027a5bfb
|
|
| BLAKE2b-256 |
cff4218487debefc65fa08ea1f19112711aaa6379f7623a63acc754a23d535da
|
File details
Details for the file ynab_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ynab_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a06cbc83514c17cda9af0bcb244735467bffb4a81c25469b1be8bb1f00e0661a
|
|
| MD5 |
09d207652a71f35090222f1cc500dd36
|
|
| BLAKE2b-256 |
2315f37c4b84b6adb9b66407b42df43cd42748ea25cc6150f9b66bd9be8cd3a9
|