# Swift Ynab Mcp

> MCP server for YNAB (You Need A Budget) - gives AI assistants read/write access to your budgets

- **Type:** MCP server
- **Install:** `agentstack add mcp-jonathanspiva-swift-ynab-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jonathanspiva](https://agentstack.voostack.com/s/jonathanspiva)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jonathanspiva](https://github.com/jonathanspiva)
- **Source:** https://github.com/jonathanspiva/swift-ynab-mcp

## Install

```sh
agentstack add mcp-jonathanspiva-swift-ynab-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# YNAB MCP Server

[](https://github.com/jonathanspiva/swift-ynab-mcp/actions/workflows/ci.yml)
[](https://swift.org)
[](https://developer.apple.com/macos/)
[](LICENSE)
[](https://claude.ai/code)

A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for [YNAB](https://www.ynab.com) (You Need A Budget).

Gives AI assistants like Claude read and write access to your YNAB budgets, transactions, categories, and payees.

## Tools

### Read Tools (11)

| Tool | Description |
|------|-------------|
| `list_budgets` | List all budgets with names, IDs, and currency |
| `list_accounts` | List accounts in a budget with balances |
| `list_categories` | List category groups and categories with balances |
| `get_budget_summary` | Budget overview with accounts and category groups |
| `list_recent_transactions` | Recent transactions (filterable by account, date range, approval status) |
| `get_month_summary` | Category breakdown for a specific month |
| `get_transaction` | Full transaction details by ID |
| `list_payees` | List all payees in a budget |
| `get_transactions_by_payee` | Transaction history for a specific payee |
| `get_transactions_by_category` | Transaction history for a specific category |
| `list_scheduled_transactions` | List upcoming scheduled transactions |

### Write Tools (5)

| Tool | Description |
|------|-------------|
| `create_transaction` | Create a new transaction (amount in dollars) |
| `update_transaction` | Update an existing transaction (amount, payee, category, flag, approval) |
| `bulk_update_transactions` | Update multiple transactions at once |
| `rename_payee` | Rename a payee across all transactions |
| `update_category_budget` | Set the budgeted amount for a category in a given month |

## Requirements

- macOS 26+
- Swift 6.2+
- A [YNAB Personal Access Token](https://app.ynab.com/settings/developer)

## Build

```bash
swift build -c release
```

The binary will be at `.build/release/ynab-mcp`.

## Configure

Add to your Claude Code MCP config (`~/.claude.json` or project `.claude/settings.json`):

```json
{
  "mcpServers": {
    "ynab": {
      "command": "/path/to/ynab-mcp",
      "env": {
        "YNAB_TOKEN": "your-token-here"
      }
    }
  }
}
```

### 1Password integration

If you use 1Password, you can avoid storing the token in plaintext by using `op run`:

```json
{
  "mcpServers": {
    "ynab": {
      "command": "op",
      "args": ["run", "--no-masking", "--", "/path/to/ynab-mcp"],
      "env": {
        "YNAB_TOKEN": "op://Your Vault/YNAB Token/credential"
      }
    }
  }
}
```

**Limitation:** `op` requires an active biometric session. Claude Code spawns MCP servers non-interactively, so `op` can't prompt for authentication. If your session has expired, the MCP server will silently fail to connect, and `/mcp` reconnect won't help either.

To fix this, run any `op` command in a terminal first to establish a session, then restart Claude Code:

```bash
op read "op://Your Vault/YNAB Token/credential" > /dev/null
```

This is a [known limitation](https://github.com/anthropics/claude-code/issues/23642) of how Claude Code launches subprocesses. Native `op://` resolution in MCP config would eliminate this problem.

## Rate Limiting

200 requests per hour (in-memory, resets on restart). This matches the YNAB API limit of 200 requests per hour per token.

## Dependencies

- [swift-sdk](https://github.com/modelcontextprotocol/swift-sdk) - MCP protocol implementation for Swift
- [SwiftyNAB](https://github.com/andrebocchini/swiftynab) - YNAB API client for Swift

## Important: Back up your budget

This server includes write tools that modify your live YNAB data. **[Export your budget](https://support.ynab.com/en_us/how-to-export-plan-data-Sy_CouWA9) before using write tools for the first time.** In the YNAB web app, click your budget name in the top-left corner and choose "Export Budget."

## Notes

- Only tested with [Claude Code](https://docs.anthropic.com/en/docs/claude-code). It should work with any MCP client, but your mileage may vary.
- Write tools modify your actual YNAB data. Use with care.
- Transaction amounts are in dollars (e.g., `25.50`), not YNAB's native milliunits.
- Budget and category IDs can be discovered using the read tools (`list_budgets`, `list_categories`, etc.).

## License

MIT

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jonathanspiva](https://github.com/jonathanspiva)
- **Source:** [jonathanspiva/swift-ynab-mcp](https://github.com/jonathanspiva/swift-ynab-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-jonathanspiva-swift-ynab-mcp
- Seller: https://agentstack.voostack.com/s/jonathanspiva
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
