使用说明
YNAB MCP Server
A Model Context Protocol (MCP) server for the YNAB (You Need A Budget) API, enabling AI assistants like Claude to interact with your budget data.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
About The Project
YNAB MCP is a Model Context Protocol server that exposes your YNAB budget data to AI assistants. It runs as a Docker container and is made publicly accessible via a Cloudflare Tunnel, allowing tools like Claude to query budgets, transactions, accounts, categories, and more over a streamable HTTP connection.
Built With
Getting Started
Prerequisites
- Docker and Docker Compose
- A YNAB Personal Access Token
- A Cloudflare Tunnel token (for remote access)
Installation
-
Clone the repo
git clone https://github.com/Npab19/ynab-mcp.git cd ynab-mcp -
Copy the example environment file and fill in your credentials
cp .env.example .env -
Edit
.envwith your credentialsYNAB_API_KEY=your_ynab_personal_access_token_here Cloudflare_Token=your_cloudflare_tunnel_token_here MCP_BEARER_TOKEN=your_random_secret_token_hereGenerate a secure
MCP_BEARER_TOKENwith:python -c "import secrets; print(secrets.token_urlsafe(32))" -
Start the server
docker compose up -d
The MCP server will be available at http://localhost:8000 locally, or via your Cloudflare Tunnel URL remotely.
Tip: A pre-built Docker image is published to the GitHub Container Registry on every push to
master. You can use it instead of building locally by replacingbuild: .withimage: ghcr.io/npab19/ynab-mcp:latestindocker-compose.yml.
Usage
The server requires authentication on all requests. The MCP_BEARER_TOKEN you set in .env is used to authenticate MCP clients.
Claude.ai web connectors (recommended)
Add a custom connector in Claude.ai settings with the URL:
https://<your-tunnel-url>/mcp?api_key=<MCP_BEARER_TOKEN>
This syncs across all your devices automatically.
Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"ynab": {
"type": "http",
"url": "https://<your-tunnel-url>/mcp",
"headers": {
"Authorization": "Bearer <MCP_BEARER_TOKEN>"
}
}
}
}
Restart Claude Desktop after saving.
Available Tools
The server exposes tools across the following YNAB resource categories:
| Category | Description |
|---|---|
| Budgets | List and retrieve budgets |
| Accounts | View accounts within a budget |
| Transactions | Query and filter transactions |
| Categories | Browse category groups and categories |
| Months | Access monthly budget summaries |
| Payees | List payees |
| Scheduled Transactions | View upcoming scheduled transactions |
| User | Retrieve authenticated user info |
Roadmap
- [x] Streamable HTTP transport
- [x] Cloudflare Tunnel support
- [x] Core YNAB resource coverage (budgets, accounts, transactions, categories, months, payees, scheduled transactions)
- [x] Bearer token authentication (Authorization header + ?api_key query param)
- [x] Docker image published to GitHub Container Registry (GHCR)
- [ ] Write support (create/update transactions)
- [ ] Category budget assignment tools
See the open issues for a full list of proposed features and known issues.
Contributing
Contributions are welcome! If you have a suggestion, please fork the repo and create a pull request or open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Project Link: https://github.com/Npab19/ynab-mcp