接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
A comprehensive Model Context Protocol (MCP) server for YNAB (You Need A Budget) that enables AI assistants like Claude Desktop to read your budget, analyze spending patterns, detect subscriptions, and provide personalized financial insights—all through natural conversation.
Traditional YNAB integrations require manual API calls or custom scripting. This MCP server lets you:
No installation required—run directly:
npx ynab-mcp
docker run -e YNAB_ACCESS_TOKEN=your_token ghcr.io/auzroz/ynab-mcp:latest
# Clone the repository
git clone https://github.com/auzroz/ynab-mcp.git
cd ynab-mcp
# Install dependencies and build
npm install
npm run build
# Run the server
npm start
The server is configured via environment variables:
By default the server speaks stdio (local). Set MCP_TRANSPORT=http to run it
as a remote server over the MCP Streamable HTTP transport at POST /mcp, with a
plain GET /health for load balancers. Each session gets an isolated
client/cache/rate-limiter/audit-log.
Multi-user (YNAB OAuth). Configure a YNAB OAuth app + ENCRYPTION_KEY +
PUBLIC_URL and the server becomes an OAuth 2.1 Authorization Server federated to
YNAB: many users connect their own YNAB accounts to one instance, each isolated,
choosing read-only or read-write at consent. See
docs/REMOTE_HOSTING.md for the full deployer guide
(registering the YNAB app, storage, TLS).
Single-user (header auth). If the OAuth variables aren't all set, HTTP mode takes the YNAB token per request via the
X-YNAB-Tokenheader (falling back toYNAB_ACCESS_TOKENfor one user). Serve behind TLS.
MCP_TRANSPORT=http PORT=3000 YNAB_ACCESS_TOKEN=… npm start
# connect an MCP client via the mcp-remote shim:
npx mcp-remote http://localhost:3000/mcp --header "X-YNAB-Token: <your-token>"
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ynab": {
"command": "npx",
"args": ["ynab-mcp"],
"env": {
"YNAB_ACCESS_TOKEN": "your_token_here"
}
}
}
}
{
"mcpServers": {
"ynab": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "YNAB_ACCESS_TOKEN",
"ghcr.io/auzroz/ynab-mcp:latest"
],
"env": {
"YNAB_ACCESS_TOKEN": "your_token_here"
}
}
}
}
{
"mcpServers": {
"ynab": {
"command": "node",
"args": ["/path/to/ynab-mcp/dist/index.js"],
"env": {
"YNAB_ACCESS_TOKEN": "your_token_here"
}
}
}
}
Once connected, try asking Claude:
These tools provide AI-powered financial insights beyond basic YNAB functionality:
Coverage of the YNAB API endpoints:
ynab_get_user — Get authenticated user informationynab_list_budgets — List all accessible budgetsynab_get_budget — Get detailed budget informationynab_get_budget_settings — Get budget settings (currency format, etc.)ynab_list_accounts — List all accounts with balancesynab_get_account — Get specific account detailsynab_create_account — Create a new account (write mode)ynab_list_categories — List all category groups and categoriesynab_get_category — Get category detailsynab_get_month_category — Get category budget for specific monthynab_update_category — Update category budgeted amount (write mode)ynab_create_category — Create a new category in a group (write mode)ynab_create_category_group — Create a new category group (write mode)ynab_update_category_group — Rename a category group (write mode)ynab_list_payees — List all payees (merchants/vendors)ynab_get_payee — Get specific payee detailsynab_create_payee — Create a new payee (write mode)ynab_update_payee — Rename a payee (write mode)ynab_list_payee_locations — List all payee locations for mappingynab_get_payee_location — Get specific payee locationynab_list_payee_locations_by_payee — List locations for a specific payeeynab_list_months — List all budget monthsynab_get_month — Get detailed month summary with categoriesynab_list_transactions — List transactions with filtersynab_get_transaction — Get transaction detailsynab_create_transaction — Create a new transaction (write mode)ynab_create_transactions — Bulk create transactions (write mode)ynab_update_transaction — Update a transaction (write mode)ynab_update_transactions — Bulk update transactions (write mode)ynab_delete_transaction — Delete a transaction (write mode)ynab_list_account_transactions — List transactions for a specific accountynab_list_category_transactions — List transactions for a specific categoryynab_list_payee_transactions — List transactions for a specific payeeynab_import_transactions — Trigger import from linked banks (write mode)ynab_list_scheduled_transactions — List scheduled/recurring transactionsynab_get_scheduled_transaction — Get scheduled transaction detailsynab_create_scheduled_transaction — Create a scheduled transaction (write mode)ynab_update_scheduled_transaction — Update a scheduled transaction (write mode)ynab_delete_scheduled_transaction — Delete a scheduled transaction (write mode)ynab_list_money_movements — List moves of funds between categoriesynab_rate_limit_status — Check API rate limit statusynab_audit_log — View write operation audit logynab_health_check — Test API connectivityBeyond raw tool access, the server exposes 7 MCP Prompts — guided workflows
grounded in YNAB's own budgeting methodology (the Four Rules, Age of Money,
True Expenses) that orchestrate several tools into a single review. Any MCP
client that supports the prompts capability can invoke them directly.
See docs/REMOTE_HOSTING.md for details.
Our MCP server gives Claude access to your YNAB budget. Our skills teach Claude YNAB's own best practices — some work standalone, some get sharper when connected. Together, they turn raw budget data into an actual coach.
The skills/ directory has 15 Claude Agent Skills:
7 that orchestrate this MCP server's tools into guided reviews, and 8
standalone coaching skills (getting started, debt payoff, irregular income,
windfalls, emergency funds, and more) that work with or without this server
connected. Every GitHub Release
attaches them as downloadable zips — see skills/README.md
for the full list and install instructions.
# Run with hot reload
npm run dev
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Lint code
npm run lint
# Fix lint issues
npm run lint:fix
# Type check only
npm run typecheck
npx @modelcontextprotocol/inspector node dist/index.js
src/
├── index.ts # Entry point (selects stdio or http transport)
├── server.ts # Per-user server + tool registration
├── http.ts # Express app for remote (Streamable HTTP) mode
├── crypto.ts # AES-256-GCM at-rest token encryption
├── config/ # Environment configuration
├── auth/ # Remote OAuth: MCP AS provider, YNAB client, sessions
├── storage/ # Pluggable storage (memory / sqlite / postgres)
├── services/ # Core services
│ ├── ynab-client.ts # YNAB API wrapper with rate limiting
│ ├── rate-limiter.ts # Token bucket rate limiter
│ ├── audit-log.ts # Per-user write audit log
│ └── cache.ts # In-memory TTL cache
├── tools/ # MCP tool implementations
│ ├── user/
│ ├── budgets/
│ ├── accounts/
│ ├── categories/
│ ├── payees/
│ ├── months/
│ ├── transactions/
│ ├── scheduled-transactions/
│ └── analytics/
└── utils/ # Helpers (currency, dates, errors)
git checkout -b feature/amazing-feature)npm test && npm run lintgit commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Self-hostable MCP server for YNAB: full YNAB API coverage plus 23 analytics tools (spending trends, recurring charges, budget health, goal progress). Read-only by default. Runs over stdio for Claude D
總覽
Self-hostable MCP server for YNAB: full YNAB API coverage plus 23 analytics tools (spending trends, recurring charges, budget health, goal progress). Read-only by default. Runs over stdio for Claude Desktop, or Streamable HTTP with OAuth for a household or team.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Ynab 透過 stdio 在本機執行。
上次檢查時間:2026-11-14。 Self-hostable MCP server for YNAB: full YNAB API coverage plus 23 analytics tools (spending trends, recurring charges, budget health, goal progress). Read-only by default. Runs over stdio for Claude Desktop, or Streamable HTTP with OAuth for a household or team.