Lunch Money MCP Server
Lunch Money MCP サーバー
Lunch Money の個人財務データと AI エージェントが対話できるようにする Model Context Protocol (MCP) サーバーです。
機能
この MCP サーバーは、財務データを管理するための 15 個のツールを公開しています。
ユーザーとアカウント
get_user— プロフィールとアカウント情報を取得する
カテゴリ
get_categories— すべてのカテゴリを一覧表示する(フラットまたはネスト)create_category— 新しいカスタムカテゴリを作成するupdate_category— 既存のカテゴリを修正する
取引
get_transactions— フィルタ(日付範囲、カテゴリ、ステータスなど)を使用して取引をクエリするcreate_transaction— 新しい取引を追加する(単一または最大 500 件のバッチ)update_transaction— 取引を更新するか、複数のエントリに分割する
資産と口座
get_assets— 手動管理されている資産を一覧表示するcreate_asset— 新しい手動資産を追加するget_plaid_accounts— Plaid 連携済みの銀行口座を一覧表示するtrigger_plaid_fetch— Plaid 口座の同期をトリガーする
予算と計画
get_budgets— あらゆる日付範囲の予算と支出を表示するupsert_budget— 予算額を設定または更新するget_recurring_items— 定期的な支出と収入を表示する
タグ
get_tags— すべての取引タグを一覧表示する
Related MCP server: LunchMoney MCP Server
前提条件
インストール
オプション 1: クローンとビルド(ローカル stdio トランスポート)
Cursor、Claude Desktop、またはその他の stdio ベースの MCP クライアントでローカルに使用する場合:
# Clone the repository
git clone https://github.com/yourusername/lunchmoney-mcp.git
cd lunchmoney-mcp
# Install dependencies
npm install
# Build the TypeScript
npm run buildオプション 2: Cloudflare Workers(リモート HTTP トランスポート)
HTTP 経由でアクセス可能なリモート MCP サーバーとしてデプロイする場合:
# Clone the repository
git clone https://github.com/yourusername/lunchmoney-mcp.git
cd lunchmoney-mcp
# Install dependencies
npm install
# Set your API key as a secret
npx wrangler secret put LUNCH_MONEY_API_KEY
# Enter your Lunch Money API key when prompted
# Deploy to Cloudflare Workers
npm run deployオプション 3: npx を使用する(ローカルのみ)
クローンせずに MCP サーバーを直接実行できます:
npx -y lunchmoney-mcp注: LUNCH_MONEY_API_KEY 環境変数を設定する必要があります。
設定
API キーの取得
Lunch Money にログインする
設定 → 開発者 に移動する
新しい API キーを生成する
キーをコピーする(安全に保管してください!)
Cursor IDE
Cursor の MCP 設定 (~/.cursor/mcp.json) に追加します:
{
"mcpServers": {
"lunchmoney": {
"command": "node",
"args": ["/path/to/lunchmoney-mcp/dist/index.js"],
"env": {
"LUNCH_MONEY_API_KEY": "your_api_key_here"
}
}
}
}または npx を使用する場合:
{
"mcpServers": {
"lunchmoney": {
"command": "npx",
"args": ["-y", "lunchmoney-mcp"],
"env": {
"LUNCH_MONEY_API_KEY": "your_api_key_here"
}
}
}
}Claude Desktop
Claude Desktop の設定 (~/Library/Application Support/Claude/claude_desktop_config.json、macOS の場合) に追加します:
{
"mcpServers": {
"lunchmoney": {
"command": "node",
"args": ["/path/to/lunchmoney-mcp/dist/index.js"],
"env": {
"LUNCH_MONEY_API_KEY": "your_api_key_here"
}
}
}
}その他の MCP クライアント
stdio トランスポートをサポートするすべての MCP クライアントでこのサーバーを使用できます。LUNCH_MONEY_API_KEY 環境変数を設定して実行してください:
node /path/to/lunchmoney-mcp/dist/index.jsCloudflare Workers 経由のリモート MCP(API キー持ち込み)
Cloudflare Workers のデプロイメントは、各ユーザーが独自の API キーを持ち込む パブリック MCP サーバー として設計されています。サーバーが API キーを保存することはありません。
仕組み:
サーバーを Cloudflare Workers にデプロイする(または共有インスタンスを使用する)
各ユーザーが自身の Lunch Money API キーで接続する
API キーは各リクエストの
X-LunchMoney-API-Keyヘッダーで送信される
mcp-remote プロキシでの接続:
{
"mcpServers": {
"lunchmoney": {
"command": "npx",
"args": ["mcp-remote", "https://lunchmoney-mcp.your-subdomain.workers.dev/mcp"],
"env": {
"MCP_HEADERS": "X-LunchMoney-API-Key: your_api_key_here"
}
}
}
}注: mcp-remote プロキシはカスタムヘッダーをサポートしている必要があります。一部の MCP クライアントではまだサポートされていない場合があります。
⚠️
mcp.jsonファイルは認証情報ファイルのように扱ってください。 このファイルには Lunch Money API キーが含まれています。Git リポジトリ(ドットファイルリポジトリを含む)には絶対にコミットしないでください。リポジトリ内にある場合は.gitignoreに追加してください。このファイルへの読み取りアクセス権を持つ人は誰でも、あなたの Lunch Money データを読み取り、変更できます。
セキュリティ: このモデルが最も安全な理由は以下の通りです:
サーバーが API キーを保存しない
各ユーザーは自分のデータにのみアクセスできる
API キーはリクエストごとに渡され、サーバーには保存されない
パブリックワーカーは IP ごとのレート制限を強制し、リクエスト本文やヘッダーをログに記録しない
Cloudflare Workers デプロイメント(パブリックサーバー)
これにより、誰でも自分の API キーで使用できる パブリック MCP サーバー が作成されます。サーバーは認証情報を保存しません。
前提条件
Cloudflare アカウント(無料枠で動作します)
Wrangler CLI がインストールされていること
デプロイ
依存関係のインストール:
npm installCloudflare Workers へのデプロイ:
npm run deployパブリック MCP サーバーが稼働しました! URL が出力に表示されます:
https://lunchmoney-mcp.your-account.workers.dev/mcpオプション: テスト用にデフォルトの API キーを設定できます:
npx wrangler secret put LUNCH_MONEY_API_KEYユーザーの接続方法
ユーザーは 自分自身の Lunch Money API キーを使用してパブリックサーバーに接続します:
{
"mcpServers": {
"lunchmoney": {
"command": "npx",
"args": ["mcp-remote", "https://lunchmoney-mcp.your-account.workers.dev/mcp"],
"env": {
"MCP_HEADERS": "X-LunchMoney-API-Key: their_api_key_here"
}
}
}
}Wrangler を使用したローカル開発
# Run locally with hot reload
npm run dev:workerセキュリティモデル
サーバーは API キーを保存しない — キーはヘッダーを介してリクエストごとに渡される
ユーザーは自分のデータにのみアクセスできる — 各リクエストはユーザー自身のキーを使用する
公開アクセス可能 — 誰でもサーバーを使用できるが、各自の Lunch Money アカウントが必要
これはパブリック API ゲートウェイの仕組みと似ています。インフラストラクチャは共有されますが、認証情報はユーザーごとです。
使用例
設定が完了すると、AI アシスタントに次のような質問ができます:
「今月のカテゴリ別の支出を見せて」
「先週の最大の支出は何だった?」
「3 月の未分類の取引をすべて分類して」
「'フリーランス収入' という新しいカテゴリを作成して」
「第 1 四半期に食料品にいくら使った?」
「定期的なサブスクリプションをすべてリストアップして」
開発
ローカル stdio モード(Cursor、Claude Desktop 用)
# Install dependencies
npm install
# Run in development mode with hot reload
npm run dev
# Build for production
npm run build
# Type check without emitting
npm run typecheck
# Test with MCP Inspector
npm run inspectCloudflare Workers モード(リモート HTTP アクセス用)
# Build the Worker
npm run build
# Run locally with Wrangler
npm run dev:worker
# Deploy to production
npm run deployプロジェクト構造
src/
├── index.ts # MCP server entry point (stdio mode)
├── worker.ts # Cloudflare Workers entry point (HTTP mode)
├── client.ts # Lunch Money API client
├── types.ts # TypeScript type definitions
├── tool-utils.ts # Shared tool utilities
└── tools/ # Individual tool implementations
├── user.ts
├── categories.ts
├── transactions.ts
├── assets.ts
├── plaid.ts
├── budgets.ts
├── recurring.ts
└── tags.tsデプロイモード
モード | トランスポート | ユースケース | エントリポイント |
ローカル | stdio | Cursor, Claude Desktop |
|
Cloudflare Workers | ストリーミング HTTP | リモートアクセス, Web クライアント |
|
両方のモードで同じツール実装と API クライアントを共有します。
セキュリティ
API キーの保護
API キーをコミットしないでください。 そのため
.envファイルは.gitignoreに含まれています。キーは環境変数または安全な MCP 設定ファイルに保存してください。
キーが漏洩した場合は、直ちに Lunch Money 開発者ページ で取り消し、新しいキーを生成してください。
データプライバシー
このサーバーは、AI アシスタントと Lunch Money の間のプロキシとして機能します。
財務データは Lunch Money のプライバシーポリシー に従って処理されます。
エラーメッセージは、誤った情報開示を防ぐためにサニタイズされます。
権限
提供する API キーによって、MCP サーバーが実行できるアクションが決まります。Lunch Money API キーで可能なこと:
すべての財務データの読み取り
取引の作成、更新、削除
カテゴリと予算の変更
Plaid 同期のトリガー
API リファレンス
この MCP サーバーは Lunch Money API v1 を使用しています。
レート制限
Lunch Money API にはレート制限があります。MCP サーバーは API からのレート制限エラーをそのまま通過させます。レート制限に達した場合は、数分待ってから再試行してください。
エラーハンドリング
サーバーは Lunch Money API エラーを処理し、MCP ツールエラーとして返します。注意点:
Lunch Money は論理エラーを HTTP 200 レスポンスとして返すことがありますが、これらは適切なエラーに正規化されます
サーバーは潜在的な機密情報を削除するためにエラーメッセージをサニタイズします
デバッグのために、エラーの詳細は stderr に記録されます
トラブルシューティング
「Missing LUNCH_MONEY_API_KEY」エラー
LUNCH_MONEY_API_KEY 環境変数が設定されていません。MCP 設定を確認し、キーが正しく設定されていることを確認してください。
「Unauthorized」エラー
API キーが無効か、取り消されている可能性があります。https://my.lunchmoney.app/developers でキーを確認してください。
取引が表示されない
Plaid 連携口座を使用している場合、同期をトリガーする必要があるかもしれません:
trigger_plaid_fetchツールを使用してバックグラウンド同期をキューに入れますこれはジョブをキューに入れるだけであるため、取引が表示されるまでに数分かかる場合があります
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
リポジトリをフォークする
フィーチャーブランチを作成する (
git checkout -b feature/amazing-feature)変更をコミットする (
git commit -m 'feat: add amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
このプロジェクトは ISC ライセンスの下でライセンスされています。詳細は LICENSE ファイルを参照してください。
謝辞
Model Context Protocol SDK を使用して構築
Lunch Money を活用
サポート
この MCP サーバーに関する問題は、GitHub の issue を開いてください
Lunch Money API に関する質問は、Lunch Money API ドキュメント を参照してください
MCP プロトコルに関する質問は、MCP ドキュメント を参照してください
免責事項: これは非公式のコミュニティプロジェクトです。Lunch Money とは提携しておらず、推奨もされていません。
Available Tools
15 toolscreate_assetC
Create a manually managed asset in Lunch Money.
Inputs: type_name (required), name (required), balance (required), subtype_name, +6 more.
create_categoryC
Create a new Lunch Money category.
Inputs: name (required), description, is_income, exclude_from_budget, +3 more.
create_transactionC
Create one or more Lunch Money transactions.
Inputs: transactions (required), apply_rules, skip_duplicates, check_for_recurring, +2 more.
get_assetsARead-only
List manually managed Lunch Money assets.
Inputs: no named parameters.
get_budgetsARead-only
Get Lunch Money budgets and spending for a date range.
Inputs: start_date (required), end_date (required), currency.
get_categoriesARead-only
List Lunch Money categories in flattened or nested form.
Inputs: format.
get_plaid_accountsARead-only
List Lunch Money Plaid-connected accounts.
Inputs: no named parameters.
get_recurring_itemsARead-only
Get Lunch Money recurring items for the current or specified month range.
Inputs: start_date, end_date, debit_as_negative.
get_tagsARead-only
List all Lunch Money tags.
Inputs: no named parameters.
get_transactionsCRead-only
Get Lunch Money transactions with optional filters.
Inputs: tag_id, recurring_id, plaid_account_id, category_id, +9 more.
get_userARead-only
Get information about the Lunch Money user connected to the configured API key.
Inputs: no named parameters.
trigger_plaid_fetchC
Trigger a Lunch Money fetch for eligible Plaid accounts. This queues a background fetch job.
Inputs: start_date, end_date, plaid_account_id.
update_categoryC
Update an existing Lunch Money category.
Inputs: category_id (required), name, description, is_income, +4 more.
update_transactionC
Update a Lunch Money transaction or split it into multiple child transactions.
Inputs: transaction_id (required), transaction, split, debit_as_negative, +1 more.
upsert_budgetC
Create or update a Lunch Money budget entry for a category and month.
Inputs: start_date (required), category_id (required), amount (required), currency.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct resource or action, with clear separation between asset, category, transaction, budget, account, recurring item, tag, and user operations. No overlapping functionality.
All tools follow a consistent verb_noun pattern (e.g., create_asset, get_transactions, update_category), using the same set of verbs (create, get, update, upsert, trigger) throughout.
With 15 tools, the server covers the core aspects of personal finance management without being overloaded or underdeveloped. Each tool has a clear purpose.
The server provides create, read, and update operations for several resources, but lacks delete operations for all resources and missing update for assets and recurring items. Tags only have a get operation, leaving significant gaps in the lifecycle.
Maintenance
Related MCP Connectors
Read-only Lunch Money accounts, transactions, categories and budgets. Unofficial connector.
The budget app your AI agent can use. Check budgets and log spending, with no bank logins.
Connect AI agents to bank accounts, transactions, balances, and investments.
Personal finance, bank account, and shared memory connector for Claude, ChatGPT, Gemini Spark & more
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables managing personal finances through the Lunch Money API, including transactions, categories, budgets, and accounts via natural language commands.145MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants and MCP clients to access and manage LunchMoney personal finance data, including transactions, categories, tags, budgets, accounts, recurring items, and crypto through LunchMoney's API.41 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants and MCP clients to manage personal finance data through the LunchMoney API, including transactions, budgets, categories, tags, accounts, recurring items, and crypto balances.41 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants and other MCP clients to interact with LunchMoney data for automated financial insights, transaction management, budgeting, and more. Provides comprehensive tools for categories, tags, transactions, recurring items, budgets, accounts, cryptocurrency, and balance history via LunchMoney's API.41 npmMIT