Skip to main content
Glama
juansebashr

Money Lover MCP Server

by juansebashr

Money Lover MCP サーバー

非公式の Money Lover REST API をラップする、Model Context Protocol (MCP) サーバーの Node.js 実装です。このサーバーは、認証、ウォレット、カテゴリ、取引、イベント、負債、および静的設定をカバーする 27 個の MCP ツールを公開しており、AI アシスタントや MCP 対応クライアントが個人財務データを照会および管理できるようにします。

機能

  • EMAIL/PASSWORD 環境変数による自動認証 — ほとんどのツールでトークンの受け渡しは不要です。

  • ユーザー情報、ウォレット、カテゴリ、取引、イベント、負債、アイコン、プロバイダー、静的設定をカバーする 23 個の読み取りツール。

  • 4 個の書き込みツール: 取引、ウォレット、カテゴリの作成、更新、削除。

  • LLM のコンテキストを管理しやすくするために、大きな応答は自動的に切り詰められます(limit パラメータで設定可能)。

  • Claude Code、Claude Desktop、Cursor、およびあらゆる MCP ホストと互換性のある Stdio ベースのサーバー。

  • ~/.moneylover-mcp/ 配下でのメールごとのトークンキャッシュと、認証エラー時の自動更新。

Related MCP server: YNAB Assistant

前提条件

  • Node.js 22 以降。

  • Money Lover アカウントの資格情報。

インストール

npm install

使用方法

Stdio 経由で MCP サーバーを起動します:

npm start

プロジェクトスコープの設定 (Claude Code)

プロジェクトのルートに .mcp.json を追加します:

{
  "mcpServers": {
    "mcp-moneylover": {
      "command": "node",
      "args": ["/absolute/path/to/moneylover-mcp/src/server.js"],
      "env": {
        "EMAIL": "your@email.com",
        "PASSWORD": "your-password"
      }
    }
  }
}

そして .claude/settings.json で有効にします:

{ "enabledMcpjsonServers": ["mcp-moneylover"] }

グローバル設定 (Claude Desktop / Cursor)

{
  "mcpServers": {
    "mcp-moneylover": {
      "command": "npx",
      "args": ["@ferdhika31/moneylover-mcp@latest"],
      "env": {
        "EMAIL": "your@email.com",
        "PASSWORD": "your-password"
      }
    }
  }
}

利用可能なツール

認証

ツール

説明

引数

login

JWT トークンを取得します。

email, password

ユーザー

ツール

説明

引数

get_user_info

セッションに関連付けられたプロファイル。

get_user_account

デバイスとアクティブなセッション。

get_user_profile

拡張プロファイルデータ。

ウォレット

ツール

説明

引数

get_wallets

すべてのウォレットを一覧表示します。

get_wallet_balance

ウォレットの残高概要。

walletId

get_shared_wallets

他のユーザーと共有されているウォレット。

get_awaiting_shared_wallets

保留中の共有招待。

add_wallet

新しいウォレットを作成します。

name, currencyId; オプション icon

edit_wallet

ウォレット名、アイコン、または通貨を更新します。

walletId, currencyId (API で必須); オプション name, icon

delete_wallet

ウォレットを完全に削除します。

walletId

カテゴリ

ツール

説明

引数

get_categories

特定のウォレットのカテゴリ。

walletId

get_all_categories

すべてのウォレットにわたる全カテゴリ。

オプション limit (デフォルト 50)

add_category

ウォレット内にカテゴリを作成します。

walletId, name, icon (有効な名前を取得するには get_icons を使用、例: icon_3), type (1=収入, 2=支出)

edit_category

カテゴリ名の変更またはアイコンの変更。

categoryId, icon (名前変更のみの場合でも API で必須); オプション name

delete_category

カテゴリを削除します。

categoryId

取引

ツール

説明

引数

get_transactions

指定期間内の取引。

walletId, startDate, endDate (YYYY-MM-DD)

add_transaction

取引を作成します。get_categories からのカテゴリ ID は自動的にグローバル ID に解決されます。

walletId, categoryId, amount, date; オプション note, with

edit_transaction

取引を更新します。API は編集のたびに完全なペイロードを要求します。現在の値が必要な場合は、まず取引を取得してください。categoryId は自動的にグローバルに解決されます。

transactionId, walletId, categoryId, amount, date; オプション note, with

delete_transaction

取引を削除します。

transactionId

search_transactions

オプションのフィルターを使用した自由形式の検索。

オプション filters, limit (デフォルト 20)

get_debt_transactions

負債/ローンとしてフラグが立てられた取引。

get_related_transactions

ID リストによる関連取引。

ids (配列)

get_related_transactions_by_category

カテゴリに関連する取引。

categoryId

get_related_transactions_by_wallet

ウォレットに関連する取引。

walletId

get_transaction_search_config

利用可能な検索フィルターオプション。

オプション limit (デフォルト 20)

静的設定 & 設定

ツール

説明

引数

get_events

ウォレットの貯蓄目標/イベント。

walletId; オプション limit (デフォルト 50)

get_debts

ウォレット内の未払い負債。

walletId

get_icons

アイコンパックのメタデータ。

オプション pack (デフォルト "default")

get_linked_providers

サポートされている銀行プロバイダー。

get_currencies

通貨カタログ。

オプション limit (デフォルト 100)

get_exchange_rates

米ドルベースの為替レートのスナップショット。

get_other_config

その他のランタイム設定。

ツールの使用例

プロンプトの例、必須フィールドとオプションフィールド、注意点、およびすべてのツールに共通するマルチステップパターンの詳細: docs/examples.md

ライブラリの使用

import { MoneyloverClient } from './src/moneyloverClient.js';

const token = await MoneyloverClient.getToken(email, password);
const client = new MoneyloverClient(token);

const wallets = await client.getWallets();
const txns = await client.getTransactions(walletId, '2026-01-01', '2026-04-30');
await client.addTransaction({ walletId, categoryId, amount: '50000', date: '2026-04-18' });
await client.editTransaction('txn-id', { amount: '60000', note: 'updated' });
await client.deleteTransaction('txn-id');

テスト

ユニットテスト

モック化されたユニットテスト — ライブ API 呼び出しは不要です:

npm test

統合テスト (mcp-tester)

mcp-tester は、ReAct エージェントベースの MCP テストフレームワークです。サーバーを起動し、自然言語プロンプトに応答してツールを呼び出すように LLM を駆動し、正しい引数で正しいツールが呼び出されたことをアサートします。

インストール

pipx install --index-url https://pypi.artifacts.furycloud.io/simple/ mcp-tester

設定

tests/mcp-tester/mcps.json — 資格情報を使用してローカルサーバーを指すようにします:

{
  "mcp-moneylover": {
    "command": "node",
    "args": ["/absolute/path/to/src/server.js"],
    "transport": "stdio",
    "env": {
      "EMAIL": "your@email.com",
      "PASSWORD": "your-password"
    }
  }
}

実行

mcp-tester run-tests \
  --mcps tests/mcp-tester/mcps.json \
  --model gpt-4o-mini \
  --concurrent-runs 3 \
  tests/mcp-tester/read-tools.yaml

結果

tests/mcp-tester/read-tools.yaml には、すべての読み取りツールをカバーする 25 個の統合テストが含まれています:

total 25, success 25, failures 0

テストを安定させるための重要な決定事項:

  • 読み取りツールにトークンパラメータを含めない — オプションの token フィールドを公開すると、LLM がそこにウォレット ID を注入してしまうためです。サーバーは環境変数を介して自動的に認証を行います。

  • 応答の切り詰め — 一部のエンドポイントは、共有 MoneyLover データベースから数十万件のレコードを返します。ツールは LLM のコンテキストを制御するために limit パラメータ (デフォルト: 20–100) を受け入れます。

  • 辞書によるラップ — すべてのツール応答は JSON オブジェクトを返します(配列単体は返しません)。これにより、MCP フレームワークの検証を通過します。

書き込みツールのテスト (mcp-tester)

3 つの追加 YAML ファイルが、ウォレット、カテゴリ、取引の完全な CRUD ライフサイクルを 3 つの連続したフェーズでテストします。各フェーズで 3 つのリソースタイプすべてを同時に実行します。

ファイル

フェーズ

テスト

write-create.yaml

作成

add_wallet, add_category, add_transaction

write-edit.yaml

編集

edit_wallet, edit_category, edit_transaction

write-delete.yaml

削除

delete_wallet, delete_category, delete_transaction

フェーズを順番に実行します。各フェーズは前のフェーズに依存します:

# Phase 1: Create
mcp-tester run-tests --mcps tests/mcp-tester/mcps.json --model gpt-4o-mini --concurrent-runs 3 tests/mcp-tester/write-create.yaml

# Phase 2: Edit (after Phase 1 passes)
mcp-tester run-tests --mcps tests/mcp-tester/mcps.json --model gpt-4o-mini --concurrent-runs 3 tests/mcp-tester/write-edit.yaml

# Phase 3: Delete (after Phase 2 passes)
mcp-tester run-tests --mcps tests/mcp-tester/mcps.json --model gpt-4o-mini --concurrent-runs 3 tests/mcp-tester/write-delete.yaml

3 つのフェーズすべての結果:

Phase 1 (Create): total 3, success 3, failures 0
Phase 2 (Edit):   total 3, success 3, failures 0
Phase 3 (Delete): total 3, success 3, failures 0

書き込みツールテストの重要な設計決定:

  • 変更前の探索 — 編集および削除テストでは、エージェントに対して、まず読み取りツール (get_wallets, get_categories, get_transactions) を呼び出して名前でターゲットを特定し、その後に変更ツールを呼び出すよう指示します。これは、ID が事前にわかっていない現実のエージェントの動作を反映しています。

  • 書き込みツールのアサーションに args: !any を使用 — フレームワークは正確な引数の一致を要求します。書き込みツールは、エージェントが任意に含める可能性のあるオプションフィールド (icon, with など) を受け入れます。!any は、無害な追加要素で失敗することなく、ツールが呼び出され成功したことを検証します。読み取りツールのアサーションは、スキーマに LLM が自発的に追加するようなオプションフィールドがないため、正確な引数の一致を使用できます。

  • 予測可能な識別子 — テストリソースは固定名 (MCP-Test-Wallet, MCP-Test-Category) と固定メモ (MCP test transaction) を使用するため、エージェントは編集および削除フェーズ中にテスト実行間で状態を共有することなく、名前でそれらを特定できます。

  • 完全ペイロード編集のアサーションedit_transaction は完全置換操作です。テストプロンプトは、エージェントに対して、まず既存の取引を取得 (get_transactions) し、現在のすべてのフィールド値を引き継ぎ、メモのみを変更するように指示します。これにより、ツールの説明で要求されるマルチステップの推論が検証されます。

セキュリティ上の注意

  • 実際の資格情報やトークンをコミットしないでください。

  • キャッシュされたトークンは ~/.moneylover-mcp/ に保存され、現在のユーザーのみに制限されます。

  • キャッシュされたすべてのセッションを取り消すには、そのディレクトリを削除してください。

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with the WYGIWYH expense tracking API through 75 dynamically generated MCP tools. Supports comprehensive financial operations including transaction management, account handling, recurring expenses, and investment tracking.
    7
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with YNAB budgets through natural language. Supports managing accounts, categories, transactions, and budget months with 21 tools for comprehensive budget operations.
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to interact with Money Lover personal finance app through unofficial REST API. Supports authentication, wallet management, transaction querying, and creating new transactions for expense tracking.
    6
    20
    4
    ISC
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage personal finances through the Realbyte Money Manager mobile app, providing transaction management, asset tracking, credit card monitoring, and financial analytics with 18 comprehensive tools.
    18
    17
    11
    MIT

View all related MCP servers

Related MCP Connectors

  • Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.

  • Connect AI agents to bank accounts, transactions, balances, and investments.

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/juansebashr/moneylover-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server