Skip to main content
Glama
ynab-mcp

ynab-mcp

by koonn

ynab-mcp

YNAB(You Need A Budget)の家計データをRead-onlyで読み取る個人用MCPサーバー。Claude Desktop / Claude CodeからDaily/Weekly/Monthlyの支出振り返り・計画支援に使う。

書き込み機能は一切なし。詳細な要件・設計は docs/requirements.ja.md / docs/design.ja.md を参照(日本語版が正)。

セットアップ

uv sync

YNABのPersonal Access Token(YNAB設定画面で発行)をシェルの環境変数にexportする。リポジトリには一切書き込まない。

# ~/.zshrc 等に追記
export YNAB_API_TOKEN="your-personal-access-token"

任意の追加設定(省略可):

環境変数

用途

既定値

YNAB_DEFAULT_BUDGET_ID

Budgetが複数ある場合の既定budget_id

なし(単一Budgetなら自動解決)

YNAB_MCP_CACHE_TTL

プロセス内キャッシュのTTL(秒)

300

YNAB_MCP_WEEK_START

週の開始曜日(0=月曜)

0

Related MCP server: you-need-an-advisor-mcp

動作確認

uv run ruff check .
uv run pytest
uv run python -c "from ynab_mcp.server import mcp"   # importスモークテスト

Claude Codeへの登録

このリポジトリの .mcp.json にプロジェクトスコープで登録済み。ynab_mcp ディレクトリで作業する際、Claude Codeが自動的にサーバーを認識する(初回は承認プロンプトが出る)。

Claude Desktopへの登録

Claude Desktopの設定ファイル(~/Library/Application Support/Claude/claude_desktop_config.json)の mcpServers に以下を追加する。

{
  "mcpServers": {
    "ynab": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/ynab_mcp", "ynab-mcp"],
      "env": { "YNAB_API_TOKEN": "${YNAB_API_TOKEN}" }
    }
  }
}

提供するTool

  • list_budgets — Budget一覧

  • get_categories(budget_id?) — カテゴリと当月のbudgeted/activity/balance

  • list_transactions(budget_id?, since_date?, until_date?, category_id?, type?) — 取引明細

  • get_period_summary(period, budget_id?, date?) — 期間別の支出実績+月次予算からの按分ペース(参考値)

提供するPrompt

  • daily_review / weekly_review / monthly_review — 定型の振り返りプロンプト

License

Apache License 2.0. 詳細は LICENSE を参照。

Available Tools

4 tools
get_categoriesC

カテゴリグループとカテゴリ、当月のbudgeted/activity/balanceを返す。

Inputs: budget_id. Returns: result

get_period_summaryB

期間(daily/weekly/monthly)の支出実績と、月次予算からの按分ペース指標を返す。

ペース指標はYNABに存在しない週次/日次予算の代わりの参考値。

Inputs: period (required), date, budget_id.

list_budgetsA

YNABのBudget一覧を返す。

Inputs: no named parameters. Returns: result

list_transactionsC

取引明細を返す(深掘り用の生データ)。日付は YYYY-MM-DD 形式。

Inputs: type, budget_id, since_date, until_date, +1 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct aspect: categories, period summaries, budgets list, and transactions. There is no overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a clear verb_noun pattern: get_categories, get_period_summary, list_budgets, list_transactions. The verbs 'get' and 'list' are semantically appropriate and consistent with each other.

    Tool Count3/5

    With only 4 tools, the server feels thin for the domain of personal budgeting, which typically requires CRUD operations and more read views (accounts, payees, etc.). However, it's not critically underpowered, just minimal.

    Completeness2/5

    The server is entirely read-only, missing essential mutation tools (create/update/delete for budgets, categories, transactions). Even among reads, there are no tools for accounts, payees, or detailed budget month data beyond categories. This will leave agents unable to perform many common YNAB tasks.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server for interacting with YNAB (You Need A Budget). Provides tools for accessing budget data through MCP-enabled clients like Claude Desktop.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects AI assistants to YNAB budgets, enabling natural language queries about finances backed by full API coverage and built-in YNAB methodology knowledge.
      1
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      A personal MCP server that gives Claude native access to YNAB budget data.
      46
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables Claude to interact with YNAB budgets, including listing budgets, accounts, transactions, and category spending.
      433 npm
      4
      MIT