Skip to main content

A Model Context Protocol server for interacting with YNAB

Project description

YNAB MCP Server

A Model Context Protocol (MCP) server for interacting with YNAB (You Need A Budget) via their API.

Features

  • Get budgets, accounts, and categories
  • Get, create and update transactions
  • Create new categories
  • Update budgeted amounts for categories
  • Get budget summaries

Prerequisites

  • Python 3.13 or higher
  • A YNAB account with an API token (Get your token here)
  • UV package manager (optional but recommended)

Installation

  1. Clone this repository

    git clone https://github.com/ntdef/ynab-mcp.git
    cd ynab-mcp
    
  2. Create a virtual environment

    uv venv
    
  3. Activate the virtual environment

    • Windows:
      venv\Scripts\activate
      
    • Unix/MacOS:
      source venv/bin/activate
      
  4. Install dependencies using UV

    # python -m pip install uv
    uv sync
    
  5. Copy .env.example to .env and add your YNAB API token

    cp .env.example .env
    # Edit .env with your favorite editor
    

Usage

Running the server

uv run ynab-mcp

The server will start in stdio mode, so you won't see any output.

Available tools

The YNAB MCP Server provides the following tools:

Budget management

  • get_budgets: Retrieve all budgets for the authenticated user
  • get_budget_summary: Get a summary of the budget, optionally for a specific month

Account management

  • get_accounts: Retrieve all accounts for a specific budget

Category management

  • get_categories: Retrieve all categories for a specific budget
  • create_category: Create a new category in the specified budget group
  • update_category_budgeted: Update the budgeted amount for a category in a specific month

Transaction management

  • get_transactions: Retrieve transactions for a specific budget, optionally filtered by date, account, or category
  • create_transaction: Create a new transaction in the specified budget
  • update_transaction: Update one or more fields of a specific transaction

Development

Running tests

uv run pytest

Code style

This project uses Black and isort for code formatting. To format your code:

uv run isort src tests
uv run black src tests

License

MIT License

Acknowledgements

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

ynab_mcp-0.1.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ynab_mcp-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file ynab_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: ynab_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ynab_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b22b561717f7796adc519396fe2b4881759693511e771123a2f10545186a41e
MD5 1aac1ccbb7f73d9764729041f67727d2
BLAKE2b-256 b444ada1bb9684d12a6b9cafb4cf839fb76c6be4ecb2e2698433a2f54dfff0dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ynab_mcp-0.1.0.tar.gz:

Publisher: release.yaml on ntdef/ynab-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ynab_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ynab_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ynab_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb51df3864331feb283517c217e89e5f56a2c2128360dd62b32503182d99a333
MD5 377b7f57ed1bba3907cfb99ac5e0af0a
BLAKE2b-256 1af25f6089cfe8a62ca18c18b428ceaa418b5cce1278ed2ac84fbf67d29bb20e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ynab_mcp-0.1.0-py3-none-any.whl:

Publisher: release.yaml on ntdef/ynab-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page