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 工具可用性 确定了以下问题:
- ** 交易 API** -
list_transactions端点在使用 [[T1] 参数时没有“无效日期”错误 - ** 缺少 API 工具** - 源代码定义的几个端点在 MCP 集成中不可用
- ** 行为不一致** – – 一些工具在测试-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:
- Transactions API - The
list_transactionsendpoint fails with “invalid date” errors when using thesinceDateparameter - Missing API Tools - Several endpoints that are defined in the source code are not available in the MCP integration
- 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-apibranch: Addressing the date format handling in the transactions APIfix-mcp-registrationbranch: 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
- Clone this repository
- Copy
config/config.example.jstoconfig/config.jsand add your YNAB API credentials - Build the Docker image:
docker build -t ynab-mcp:latest . - 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" ] } - Register the MCP with Claude Code CLI:
You can also save the JSON to a file and use: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"]}'claude mcp add-json ynab "$(cat config.json)" - Authenticate with your YNAB account when prompted by Claude
Integration with Claude
安装
docker run --rm -i -v /path/to/data:/app/data -v /path/to/config:/app/config -e NODE_ENV=production ynab-mcp:latest