YNAB MCP integration for managing budgets and transactions
Project description
ynab-mcp MCP server
MCP server for connecting to You Need a Budget.
Features
This MCP server provides tools for interacting with your YNAB budget:
- List budgets and accounts
- View and manage transactions
- Track categories and spending
- Monitor monthly budgets
- Manage payees
- View financial overviews
Configuration
To run this server, you need to provide your YNAB Personal Access Token.
-
Create a
.envfile: In the root of the project, create a file named.env. -
Add your token: Add the following line to the
.envfile, replacing"your_token_here"with your actual YNAB token:YNAB_PAT="your_token_here"You can generate a new token in your YNAB Developer Settings.
Available Tools
Budget Management
list-budgets- List all available YNAB budgetslist-accounts- List all accounts for a given budgetlist-categories- List all categories with their budgeted amounts and activity
Transaction Management
list-transactions- List transactions for a given accountlist-monthly-transactions- List all transactions for a given monthupdate-transactions- Update transaction details like categories or payees
Financial Overview
get-financial-overview- Get current financial overview including balances and goalsrefresh-financial-overview- Refresh the overview with latest YNAB data
Payee Management
list-payees- List all payeesrename-payees- Update multiple payees to a single new name
Budget Planning
move-budget-amount- Move money between categoriesassign-budget-amount- Assign a specific amount to a category
Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
```json "mcpServers": { "ynab-mcp": { "command": "uv", "args": [ "run", "ynab-mcp" ], "cwd": "/path/to/your/ynab-mcp" } } ``` **Note:** Replace `/path/to/your/ynab-mcp` with the actual absolute path to this project directory.Development
Running the Server
Once you have your .env file set up, you can run the server directly:
uv run ynab-mcp
Syncing Dependencies
To install or update dependencies:
uv sync
Building and Publishing
To prepare the package for distribution:
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials.
Debugging
For the best debugging experience, we recommend using the MCP Inspector.
You can launch the MCP Inspector with this command, ensuring your .env file is present:
npx @modelcontextprotocol/inspector uv run ynab-mcp
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Example Usage
Here are some common workflows using the MCP tools:
View Budget Overview
# List available budgets
result = await handle_call_tool("list-budgets", {})
# Get accounts for the default budget
result = await handle_call_tool("list-accounts", {"budget_id": "default"})
# View current month's transactions
result = await handle_call_tool("list-monthly-transactions", {
"month": "2024-03-01"
})
Manage Categories
# Move money between categories
result = await handle_call_tool("move-budget-amount", {
"month": "2024-03-01",
"from_category_id": "dining-out",
"to_category_id": "groceries",
"amount": 5000 # $50.00
})
# Assign budget amount
result = await handle_call_tool("assign-budget-amount", {
"month": "2024-03-01",
"category_id": "groceries",
"amount": 20000 # $200.00
})
Clean Up Payees
# List all payees
result = await handle_call_tool("list-payees", {})
# Merge similar payee names
result = await handle_call_tool("rename-payees", {
"payee_ids": ["starbucks-1", "starbucks-2"],
"name": "Starbucks"
})
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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_server-0.1.1.tar.gz.
File metadata
- Download URL: ynab_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84177be9f57da61e90726163cb08fbb2412a72b96e8182b2640a82d27c383db8
|
|
| MD5 |
afd9f4b6127116a5d33ab7dc311f10c8
|
|
| BLAKE2b-256 |
ebc2f9ebd4090dda17ef4b89fa4b2dd82c874983514f5a3707b1ec668237a82c
|
File details
Details for the file ynab_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ynab_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55c3a1e397339721d08474d8c2b0e7f2956fea9c9ecc98c520eed29a3e3c2b28
|
|
| MD5 |
b8326a187790a9aa9feb832b782da528
|
|
| BLAKE2b-256 |
c6754892e34f3d6b4a187b4e0be3009b82ea62f8f3b2e787b29c7a5b2952a4a0
|