https://github.com/klauern/mcp-ynab
https://github.com/klauern/mcp-ynab
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/klauern/mcp-ynab
- Owner: klauern
- Created: 2025-02-17T18:25:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-25T01:36:10.000Z (4 months ago)
- Last Synced: 2026-04-11T03:47:37.867Z (2 months ago)
- Language: Python
- Size: 164 KB
- Stars: 6
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- toolsdk-mcp-registry - ❌ ynab
- metorial-index - YNAB Integration Server - Access YNAB functionality through a standardized protocol to manage budgets by creating transactions and viewing account balances. (Financial Data and Stock Market)
README
# MCP YNAB Server
An MCP server implementation that provides access to YNAB (You Need A Budget) functionality through the Model Context Protocol.
## Features
- View account balances and transactions
- Create new transactions
- Access YNAB data through standardized MCP resources
## Installation
```bash
uv pip install -e .
```
## Configuration
The server requires a YNAB API key to function. You can obtain one from your [YNAB Developer Settings](https://app.ynab.com/settings/developer).
The API key can be provided through:
1. Environment variable: `YNAB_API_KEY=your_api_key`
2. MCP secret management system
3. `.env` file in project root
## Usage
### Running the Server
```bash
# Development mode with hot reload and browser launch
task dev
# Production install for Claude Desktop, Goose, or any other MCP-supported environment
task install
```
### Available Resources
- `ynab://accounts` - List all YNAB accounts
- `ynab://transactions/{account_id}` - Get recent transactions for a specific account
### Available Tools
- `create_transaction` - Create a new transaction
- `get_account_balance` - Get the current balance of an account
## Example Usage
```python
# Create a new transaction
result = await create_transaction(
account_id="your_account_id",
amount=42.50, # in dollars
payee_name="Coffee Shop",
category_name="Dining Out",
memo="Morning coffee"
)
# Get account balance
balance = await get_account_balance("your_account_id")
# List accounts
accounts = await ctx.read_resource("ynab://accounts")
# Get recent transactions
transactions = await ctx.read_resource(f"ynab://transactions/{account_id}")
```
## Development
```bash
# Install dependencies (uses uv)
task deps
# Run all tests including integration tests (you will need a YNAB API key for this)
task test:all
# Generate coverage report
task coverage
# Format and lint code
task fmt # Should add this to Taskfile
```
## Project Tasks
This project uses a Taskfile for common operations. Key commands:
```bash
task dev # Start dev server with auto-reload
task test # Run unit tests
task coverage # Generate test coverage report
task install # Install production build
task deps # Synchronize dependencies
```
See [Taskfile.yml](Taskfile.yml) for all available tasks.