You Need A Budget (YNAB) MCP

You Need A Budget (YNAB) MCP

An MCP to give AI agents extensive knowledge of your personal finances and control of your budgeting.

Category
访问服务器

Tools

list-budgets

List all available YNAB budgets

list-accounts

List all accounts for a given budget

list-transactions

List transactions for a given account

list-monthly-transactions

List all transactions for a given month, across all accounts.

list-categories

List all categories for a given budget, including their budgeted amounts, activity, and goals.

list-payees

List all payees for a given budget

rename-payees

Update multiple payees to a single new name. This is useful for cleaning up and merging similar payees.

move-budget-amount

Move a specific amount from one category to another in a given month.

assign-budget-amount

Assign a specific amount to a category for a given month

update-transactions

Update one or more transactions with new categories, payees, memos, etc.

list-scheduled-transactions

List all scheduled transactions for a given budget.

get-financial-overview

Get the current financial overview including account balances, goals, and notes

update-financial-overview-section

Update a specific section of the financial overview

refresh-financial-overview

Automatically refresh the financial overview with latest data from YNAB

README

YNAB MCP Server

PyPI version License: MIT

A Model Context Protocol (MCP) server for seamless integration with You Need A Budget (YNAB). This server enables AI assistants to interact with your YNAB budgets, providing powerful automation and analysis capabilities.

📦 Quick Installation (Claude Desktop)

{
  "mcpServers": {
    "ynab-mcp": {
      "command": "uvx",
      "args": ["ynab-mcp-server"],
      "env": {
        "YNAB_PAT": "your_token_here"
      }
    }
  }
}

🌟 Features

  • 📊 Complete Budget Management

    • View and manage multiple budgets
    • Track account balances and transactions
    • Monitor category spending and goals
  • 💰 Transaction Control

    • List and search transactions
    • Update transaction details
    • Manage payees and categories
  • 📈 Financial Analysis

    • Get comprehensive financial overviews
    • Track spending patterns
    • Monitor budget progress

📋 Table of Contents

🚀 Installation & Usage

No installation needed when using uvx:

# Run directly (recommended)
uvx ynab-mcp-server

# Or with specific version
uvx ynab-mcp-server@0.1.1

For development:

# Clone and run from source
git clone https://github.com/yourusername/ynab-mcp-server.git
cd ynab-mcp-server
uv run ynab-mcp-server

🔧 Platform-Specific Setup

Claude Desktop

  1. Locate your configuration file:

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the YNAB MCP server configuration:

{
  "mcpServers": {
    "ynab-mcp": {
      "command": "uvx",
      "args": ["ynab-mcp-server"],
      "env": {
        "YNAB_PAT": "your_token_here"
      }
    }
  }
}

Goose

  1. Open Goose settings
  2. Navigate to the MCP Servers section
  3. Add a new server with:
    • Name: ynab-mcp
    • Command: uvx ynab-mcp-server
    • Environment Variables:
      • YNAB_PAT: your_token_here

Other Platforms

For other MCP-compatible platforms, configure using these parameters:

  • Server Name: ynab-mcp
  • Command: uvx
  • Arguments: ynab-mcp-server
  • Required Environment Variable: YNAB_PAT

⚙️ Configuration

  1. Get Your YNAB Token

  2. Set Up Environment

    Create a .env file in your working directory:

    YNAB_PAT="your_token_here"
    

    Or set the environment variable directly:

    export YNAB_PAT="your_token_here"
    

🛠️ Available Tools

Budget Management

Tool Description
list-budgets List all available YNAB budgets
list-accounts List all accounts for a given budget
list-categories List categories with budgeted amounts

Transaction Management

Tool Description
list-transactions List account transactions
list-monthly-transactions List transactions by month
update-transactions Update transaction details

Financial Overview

Tool Description
get-financial-overview Get current financial status
refresh-financial-overview Update overview with latest data

Budget Planning

Tool Description
move-budget-amount Transfer between categories
assign-budget-amount Set category budget

📝 Usage Examples

Basic Budget Overview

# List all budgets
result = await handle_call_tool("list-budgets", {})

# View current month's transactions
result = await handle_call_tool("list-monthly-transactions", {
    "month": "2024-03-01"
})

Category Management

# Move funds between categories
result = await handle_call_tool("move-budget-amount", {
    "month": "2024-03-01",
    "from_category_id": "11111111-2222-3333-4444-555555555555",  # Example: Dining Out
    "to_category_id": "66666666-7777-8888-9999-000000000000",    # Example: Groceries
    "amount": 5000  # $50.00 (amounts are in milliunits)
})

Transaction Updates

# Update transaction details
result = await handle_call_tool("update-transactions", {
    "transactions": [{
        "id": "12345678-90ab-cdef-ghij-klmnopqrstuv",  # Example UUID
        "category_id": "98765432-fedc-ba98-7654-321012345678",  # Example category UUID
        "memo": "Updated grocery shopping description"
    }]
})

🔨 Development

Local Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/ynab-mcp-server.git
    cd ynab-mcp-server
    
  2. Install dependencies:

    uv sync
    
  3. Run the server:

    uv run ynab-mcp-server
    

Debugging

Use the MCP Inspector for debugging:

npx @modelcontextprotocol/inspector uvx ynab-mcp-server

For local development debugging:

cd path/to/ynab-mcp-server
npx @modelcontextprotocol/inspector uv run ynab-mcp-server

You can also view logs with:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Building and Publishing

# Build package
uv build

# Publish to PyPI
uv publish

👥 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your PR:

  • Follows the existing code style
  • Includes appropriate tests
  • Updates documentation as needed

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选