MY

mattweg/ynab-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

15 stars 7 forks 质量 51 趋势 29

YNAB 用于 Claude 代码集成的模型背景协议服务器

概览

YNAB 用于 Claude Code 与 You Need A Convention (YNAB) 的模型背景协议(MCP)服务器. 此寄存器包含一个基于多克的MCP服务器,它使克洛德代码能够与YNAB(You Need A Convention)账户交互. 它执行OAuth流程,并为预算管理、交易跟踪和财务见解提供全面的API。 已识别出以下几个问题: 1. - 列表 交易端点在使用自Date参数2. - 源代码所定义的几个端点在MCP集成 3. - 一些工具在测试-mcp时发生"无效日期"错误.

概述(AI 翻译)

YNAB 用于 Claude Code 与 You Need A Convention (YNAB) 的模型背景协议(MCP)服务器.

□ 概览

此寄存器包含一个基于多克的MCP服务器,它使克洛德代码能够与YNAB(You Need A Convention)账户交互. 它执行OAuth流程,并为预算管理、交易跟踪和财务见解提供全面的API。

□ 已知问题

MCP 工具可用性 确定了以下问题:

  1. ** 交易 API** - list_transactions 端点在使用 [[T1] 参数时没有“无效日期”错误
  2. ** 缺少 API 工具** - 源代码定义的几个端点在 MCP 集成中不可用
  3. ** 行为不一致** – – 一些工具在测试-mcp.js方面起作用,但在实际的MCP整合中失败

问题跟踪 我们正积极进行以下的修补工作:

  • [[T2]分支:处理交易中的日期格式
  • [[T3]分支:确保所有API工具都得到适当登记和提供

□ 特性

  • 使用YNAB API进行基于OAuth的认证
  • 完整的预算和账户管理

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

YNAB MCP

YNAB Model Context Protocol (MCP) server for Claude Code integration with You Need A Budget (YNAB).

Overview

This repository contains a Docker-based MCP server that enables Claude Code to interact with YNAB (You Need A Budget) accounts. It implements the OAuth flow and provides a comprehensive API for budget management, transaction tracking, and financial insights.

Known Issues

MCP Tool Availability

The following issues have been identified:

  1. Transactions API - The list_transactions endpoint fails with “invalid date” errors when using the sinceDate parameter
  2. Missing API Tools - Several endpoints that are defined in the source code are not available in the MCP integration
  3. Inconsistent Behavior - Some tools work in testing with test-mcp.js but fail in the actual MCP integration

Issue Tracking

We’re actively working on the following fixes:

  • fix-transactions-api branch: Addressing the date format handling in the transactions API
  • fix-mcp-registration branch: Ensuring all API tools are properly registered and available

Features

  • OAuth-based authentication with YNAB API
  • Complete budget and account management
  • Transaction creation and categorization
  • Advanced category management with bulk allocation and recommendations
  • Support for multiple budgets (personal and family)
  • Rate limit handling (YNAB API limit: 200 requests/hour)
  • Caching for improved performance

New Category Management Features

This MCP includes advanced category management capabilities:

  • Assign to Categories: Allocate funds from Ready to Assign to multiple categories in one operation
  • Recommended Allocations: Get AI-powered suggestions for budget distribution based on goals and spending patterns

See Category Management Documentation for details.

Getting Started

Prerequisites

  • Docker
  • Node.js v18+ (for development)
  • Claude Code CLI
  • YNAB account

Installation

  1. Clone this repository
  2. Copy config/config.example.js to config/config.js and add your YNAB API credentials
  3. Build the Docker image: docker build -t ynab-mcp:latest .
  4. Create a JSON configuration for Claude:
    {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/path/to/data:/app/data",
        "-v",
        "/path/to/config:/app/config",
        "-e",
        "NODE_ENV=production",
        "ynab-mcp:latest"
      ]
    }
    
  5. Register the MCP with Claude Code CLI:
    claude mcp add-json ynab '{"command": "docker", "args": ["run", "--rm", "-i", "-v", "/path/to/data:/app/data", "-v", "/path/to/config:/app/config", "-e", "NODE_ENV=production", "ynab-mcp:latest"]}'
    
    You can also save the JSON to a file and use:
    claude mcp add-json ynab "$(cat config.json)"
    
  6. Authenticate with your YNAB account when prompted by Claude

Integration with Claude

在 GitHub 查看完整 README

安装

docker run --rm -i -v /path/to/data:/app/data -v /path/to/config:/app/config -e NODE_ENV=production ynab-mcp:latest
新手?先看 mcpskill.org 教程 →