Skip to main content
Glama
Gregarrific

ynab-mcp-server

by Gregarrific
README.md
# ynab-mcp-server

A personal MCP server that gives Claude native access to YNAB budget data.

## Architecture

**Layer 1:** FastMCP reads YNAB's official OpenAPI spec at startup and auto-generates one MCP tool per endpoint.

**Layer 2:** Custom tools for higher-level workflows: spending summaries by category, payee consolidation/renaming.

## Setup

### Prerequisites

- [uv](https://docs.astral.sh/uv/) — Python package manager
- A YNAB Personal Access Token from [app.ynab.com/settings/developer](https://app.ynab.com/settings/developer)

### Install

```bash
uv sync
```

### Configure

Create a `.env` file (never committed):

```
YNAB_API_TOKEN=your_token_here
YNAB_READ_ONLY=false
```

### Run

```bash
YNAB_API_TOKEN=your_token uv run ynab-mcp-server
```

## Connecting to Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "ynab": {
      "command": "/absolute/path/to/.venv/bin/ynab-mcp-server",
      "env": {
        "YNAB_API_TOKEN": "your_token_here",
        "YNAB_READ_ONLY": "false"
      }
    }
  }
}
```

Use the absolute path from `which ynab-mcp-server` after `uv sync`.

## Environment Variables

| Variable | Required | Description |
|---|---|---|
| `YNAB_API_TOKEN` | Yes | YNAB personal access token |
| `YNAB_READ_ONLY` | No | Set `true` to block all write operations |

## Testing

```bash
npx @modelcontextprotocol/inspector
```

TDQS

B3/5.0

Scored across 46 tools

Disambiguation5/5

Each tool targets a specific resource and action (get, create, update, delete, import, consolidate, spend). Even similar getters are differentiated by filters (by account, category, month, payee), and the two custom ynab_ functions have unique purposes.

Naming Consistency5/5

All tools follow a consistent camelCase verb_noun pattern (e.g., getAccounts, createTransaction, updateCategory). The two ynab_ prefixed tools are the only exceptions but are clearly labeled as custom utilities.

Tool Count4/5

46 tools is high but justified by the complexity of YNAB's data model (accounts, categories, payees, transactions, plans, etc.). Each tool addresses a distinct endpoint, though some consolidation could reduce count slightly.

Completeness3/5

Core transaction and scheduled transaction CRUD is complete, but accounts lack update/delete endpoints, and categories lack delete. Plans only have read operations. The ynab_consolidate_payee workaround addresses missing payee deletion, but gaps remain.

Maintenance

ActivityInactive
ResponsivenessNo issues