Skip to main content
Glama
personal-finance-mcp

personal-finance-mcp

by JosueM1109

personal-finance-mcp

License: MIT Python 3.11+ MCP

非公式。 本プロジェクトはPlaid Inc.と提携、推奨、または後援を受けていません。「Plaid」はPlaid Inc.の商標です。これは、ユーザーが提供した認証情報を使用してPlaidのAPIと通信するセルフホスト型のクライアントです。

銀行、クレジットカード、ローン、証券口座(Plaid経由)をClaude CodeのようなMCPクライアントに接続する、セルフホスト型の読み取り専用MCPサーバーです。サードパーティのアグリゲーター(Monarch、Mintなど)を介さず、自分の財務状況について平易な英語で質問できます。

質問できること

  • 「全口座の合計残高はいくら?」

  • 「過去30日間で100ドル以上の取引を表示して。」

  • 「まだ支払っているサブスクリプションは何?」

  • 「先月、食費にいくら使った?」

  • 「再認証が必要な銀行はある?」

セッション例(イメージ):

you    : What did I spend on groceries last month?
claude : [calls get_transactions]
         $487.23 across 14 transactions. Top merchants:
         Whole Foods ($198), Trader Joe's ($156), Safeway ($89).

you    : Any subscriptions I'm still paying for?
claude : [calls get_recurring_transactions]
         7 active recurring outflows totaling $142/mo:
         Netflix ($15.99), Spotify ($11.99), NYT ($4), ...

Related MCP server: FinLynq

ツール

9つのツールはすべて読み取り専用です。各ツールは {<data>: [...], "warnings": [...]} を返すため、1つの銀行でエラーが発生してもクエリ全体が停止することはありません。

ツール

機能

list_accounts

リンクされたすべての銀行の全口座と残高

get_balances

現在の残高と利用可能残高(口座によるフィルタリング可能)

get_transactions

指定期間内の取引(最大2年前まで)

search_transactions

加盟店名 / 名前 / 取引相手によるキーワード検索

get_recurring_transactions

検出された定期的な入出金ストリーム

get_liabilities

クレジットカード、学生ローン、住宅ローンのAPRおよび支払い詳細

get_investment_holdings

シンボルと証券メタデータを含む現在の保有状況

get_investment_transactions

指定期間内の売買 / 配当履歴

get_institutions_status

各リンク済み銀行の健全性(再認証が必要な場合に表示)

クイックスタート

Python 3.11+、Plaidアカウント(無料のTrialプラン)、およびMCPクライアントが必要です。

1. Plaidのセットアップ

  1. https://dashboard.plaid.com/signup に登録し、Trialプラン(無料、10アイテムまで)を選択します。

  2. Team Settings → Products で、Transactions、Liabilities、Investments を有効にします。

  3. Team Settings → API で、client_id と本番環境の secret をコピーします。

2. インストール

git clone https://github.com/JosueM1109/personal-finance-mcp.git
cd personal-finance-mcp
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # then fill in PLAID_CLIENT_ID and PLAID_SECRET
pytest -v              # sanity check

3. 各銀行のリンク

接続したい銀行ごとに1回実行します:

uvicorn link_helper:app --port 8765

http://localhost:8765 を開き、Link a bank をクリックしてPlaid Linkを完了します。ターミナルに PLAID_TOKEN_CHASE=access-prod-xxx... のような行が表示されるので、それを .env に貼り付け、銀行ごとに繰り返します。

4. 実行

python server.py   # serves on http://localhost:8000/mcp

5. Claude Codeへの追加

claude mcp add --transport http personal-finance http://localhost:8000/mcp

「list my accounts」と入力して確認してください。

デプロイ

どこからでも使用できるデプロイ方法:

  • Docker (同梱): docker build -t personal-finance-mcp . && docker run --rm -p 8000:8000 --env-file .env personal-finance-mcp

  • 任意のPythonホスト (Fly.io, Railway, Raspberry Pi + Tailscale, VPS): .env.example から環境変数を設定し、HTTPS経由で /mcp を公開し、認証で保護します。

  • Prefect Horizon (作者が使用 — 定期コスト0ドル): 完全な手順については docs/DEPLOYMENT.md を参照してください。

エンドポイントを保護してください。 トークンを含むMCPエンドポイントを公開すると、リンクされたすべての口座情報が漏洩します。OAuth 2.1、Cloudflare Accessを使用するか、プライベートネットワークのみにバインドしてください。

セキュリティ

  • シングルテナント。 1人につき1デプロイ。共有しないでください。

  • 読み取り専用。 どの機関の状態も変更しません。変更するツールは追加しないでください。

  • トークンは環境変数に保存され、ディスクには保存されません。.env はgitignoredされています。

  • Plaidのコンプライアンスは自己責任です。 あなた自身のアカウントでPlaidの顧客となります。

デプロイ前のチェックリスト:

  • [ ] .env がコミットされていないこと: git log --all -- .env が何も返さないこと

  • [ ] 履歴に本物のトークンが含まれていないこと: git log -S'access-prod-' --all がプレースホルダーのみを返すこと

  • [ ] MCPエンドポイントの前に認証ゲートがあること(またはlocalhostのみ)

  • [ ] デプロイ環境で HORIZON=1 (または同様の設定) が設定され、link_helper.py がブロックされていること

  • [ ] 数週間ごとに get_institutions_status() を確認し、再認証が必要かチェックすること

トラブルシューティング

データがあるのにツールが空を返す。 銀行をリンクした際にPlaidの製品が有効になっていませんでした。Transactions + Liabilities + Investments を有効にして再リンクしてください。この場合、ツールは warnings に PRODUCTS_NOT_SUPPORTED を表示します。

get_institutions_status() が re_auth_required を表示する。 銀行のPlaidセッションが期限切れです。更新モードで link_helper.py を実行してください。既存のアクセストークンはそのまま維持されます。docs/DEPLOYMENT.md を参照してください。

Plaid Linkで銀行が「サポート対象外」と表示される(Amexでよくある)。 通常は INSTITUTION_REGISTRATION_REQUIRED の問題です。OAuth対応の銀行は、まずPlaidダッシュボードで機関ごとの登録が必要です。docs/TROUBLESHOOTING.md を参照してください。

その他の問題: docs/TROUBLESHOOTING.md

アーキテクチャ

  • server.py — FastMCPサーバー、9つの読み取り専用ツール。

  • plaid_client.py — Plaid SDKラッパー: SecretStr トークンのマスキング、アイテムごとの5分間のヘルスキャッシュ、レスポンスの整形、構造化されたエラーマッピング。

  • link_helper.py — Plaid Link用のローカル専用FastAPIアプリ。HORIZON=1 が設定されている場合は実行を拒否します。

詳細(/transactions/sync ではなく /transactions/get を使用する理由など): docs/ARCHITECTURE.md

コントリビューション

CONTRIBUTING.md を参照してください。スコープは意図的に「読み取り専用、シングルテナント、Plaidベース」に限定しています。

Available Tools

9 tools
get_balancesGet BalancesA
Read-only

Get live current + available balances for accounts.

Inputs: account_ids. Returns: object

get_institutions_statusGet Institutions StatusA
Read-only

Return health status for every linked Item/institution.

No additional network calls beyond what all_items already makes (it uses the 5-minute health cache). Enumerates linked Items and reports their current health status.

Returns: {"items": [{"env_key", "institution", "institution_id", "status", "reason"}, ...]}

Inputs: no named parameters. Returns: object

get_investment_holdingsGet Investment HoldingsA
Read-only

Return investment holdings with security metadata across all linked Items.

Joins holdings with the securities list returned in the same response to provide symbol, name, and security type. Adds institution to each holding.

Returns: {"holdings": [...], "warnings": [...]}

Inputs: no named parameters. Returns: object

get_investment_transactionsGet Investment TransactionsA
Read-only

Fetch investment transactions in [start_date, end_date] across all healthy Items.

Dates are ISO YYYY-MM-DD. Uses offset pagination (count=500 per page). If start_date is older than ~2 years before end_date, the window is clipped and a warning is emitted. Each transaction is joined with security metadata (ticker symbol, name) from the same response.

Returns: {"investment_transactions": [...], "warnings": [...]}

Inputs: start_date (required), end_date (required). Returns: object

get_liabilitiesGet LiabilitiesA
Read-only

Return credit, student-loan, and mortgage liability details across all linked Items.

For Items where the liabilities product is not enabled, a per-Item warning with code PRODUCTS_NOT_SUPPORTED is emitted instead of failing the call.

Returns: {"credit": [...], "student": [...], "mortgage": [...], "warnings": [...]}

Inputs: no named parameters. Returns: object

get_recurring_transactionsGet Recurring TransactionsA
Read-only

Return recurring inflow and outflow streams across all linked Items.

Calls /accounts/get first per Item to collect account IDs (required by /transactions/recurring/get), then fetches recurring streams and shapes them into unified inflows/outflows lists.

Returns: {"inflows": [...], "outflows": [...], "warnings": [...]}

Inputs: no named parameters. Returns: object

get_transactionsGet TransactionsA
Read-only

Fetch transactions in [start_date, end_date] across all healthy Items.

Dates are ISO YYYY-MM-DD. Uses Plaid /transactions/get with offset pagination (count=500 per page). If start_date is older than ~2 years before end_date, the window is clipped and a warning is emitted.

Inputs: start_date (required), end_date (required), account_ids. Returns: object

list_accountsList AccountsA
Read-only

List every account across all linked Items, with balances.

Returns: {"accounts": [...], "warnings": [...]}. Warnings describe Items that are unhealthy (re-auth required, etc.) or hit API errors on this call.

Inputs: no named parameters. Returns: object

search_transactionsSearch TransactionsA
Read-only

Search transactions by keyword across merchant, name, and counterparty names.

Fetches transactions in [start_date, end_date] and filters them with a case-insensitive substring match against:

  • merchant_name

  • name

  • counterparties[].name

The match is performed on the raw Plaid payload before shaping so that counterparty names (which are dropped by shape_transaction) are searchable. Dates are ISO YYYY-MM-DD. The window is clipped to ~2 years and a WINDOW_CLIPPED warning is emitted when applicable.

Returns: {"transactions": [...], "warnings": [...]}

Inputs: query (required), start_date (required), end_date (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of personal finance data (balances, transactions, investments, liabilities, etc.), with clear boundaries. There is no overlap in functionality; even transaction-related tools distinguish between regular, investment, recurring, and search operations.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case, primarily using 'get_' for retrieval and 'list_' for accounts, which is predictable and unambiguous.

    Tool Count5/5

    With 9 tools, the server is well-scoped for a personal finance data aggregator. Each tool serves a clear purpose without redundancy, covering core financial data retrieval needs.

    Completeness4/5

    The tool surface covers most essential read operations for personal finance: accounts, balances, transactions (multiple types), liabilities, and holdings. Minor gaps such as lack of categorization or income/expense summaries are acceptable for a focused data provider.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server that enables users to analyze their real bank, credit card, loan, and brokerage data through Plaid. It provides financial analysis tools for transactions, balances, investments, liabilities, and debt while keeping all access tokens and data locally stored.
      24
      MIT
    • A
      license
      C
      quality
      A
      maintenance
      open-source personal finance app with a first-party MCP server. 91 HTTP tools (OAuth 2.1 + DCR) and 87 stdio tools cover transactions, budgets, accounts, portfolio analytics, FX conversion, loans, subscriptions, goals, importers, and rules. Users self-host with Docker + PostgreSQL or use the managed cloud
      89
      39
      AGPL 3.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables self-hosted personal finance management for MCP clients by connecting read-only bank accounts via SimpleFIN, syncing transactions into a local SQLite database, and exposing tools to query balances, spending, budgets, cash flow, and net worth.
      -
    • A
      license
      B
      quality
      D
      maintenance
      A read-only MCP server that lets AI clients query real financial data (bank, credit card, loan, brokerage) via Plaid or Teller, offering tools for balances, transactions, investments, liabilities, identity, income, and debt analysis.
      24
      MIT