Skip to main content
Glama
simran-mehta

Expense Tracker MCP Server

by simran-mehta

Expense Tracker MCP Server

ClaudeのようなAIアシスタントが、ローカルのSQLiteデータベースを使用して個人経費(追加、分類、集計、予算管理)を管理できるようにするMCP(Model Context Protocol)サーバーです。


概要

このサーバーは、Claude(またはMCP互換クライアント)が支出を追跡するために呼び出せる一連のMCPツールを提供します。すべてのデータはローカルのSQLiteファイルに保存されるため、クラウドやアカウントは不要です。


機能

  • カテゴリ、金額、日付、説明を含む経費の追加と管理

  • 日付範囲やカテゴリによる経費のフィルタリングと一覧表示

  • カテゴリ別または月別の支出集計

  • カテゴリごとの予算設定と残高確認

  • CSVへの経費エクスポート

  • 完全ローカル — データはマシン内に留まります


MCPツール

ツール

説明

主要パラメータ

add_expense

新しい経費を記録する

amount, category, description, date, currency

list_expenses

オプションのフィルタ付きで経費を一覧表示する

category?, start_date?, end_date?, limit?

get_expense_summary

カテゴリまたは月別にグループ化された合計を集計する

group_by (category または month), start_date?, end_date?

update_expense

IDを指定して既存の経費を編集する

id, amount?, category?, description?, date?

delete_expense

IDを指定して経費を削除する

id

set_budget

カテゴリの月次予算上限を設定する

category, monthly_limit, currency?

get_budget_status

予算上限と実際の支出を比較する

month? (デフォルトは当月)

export_expenses

経費をCSV文字列としてエクスポートする

start_date?, end_date?, category?


プロジェクト構造

expense-tracker-mcp-server/
├── main.py             # MCP server entry point (all tools)
├── expenses.db         # SQLite database (auto-created on first run)
├── pyproject.toml      # Project metadata and dependencies
├── .venv/              # Virtual environment (created by uv)
└── readme.md

前提条件

  • Python 3.11以上

  • uv (推奨) または pip

  • Claude Desktop (MCPサーバー接続用)


インストール

# Clone the repo
git clone https://github.com/your-username/expense-tracker-mcp-server.git
cd expense-tracker-mcp-server

# Initialize the project and install dependencies
uv init
uv add fastmcp

これにより、プロジェクトディレクトリ内に .venv フォルダが自動的に作成されます。


サーバーの実行

fastmcp run main.py

サーバーが起動し、stdio経由でMCP接続を待機します。SQLiteデータベース (expenses.db) は初回実行時に自動的に作成されます。


Claude Desktopへの接続

Claude Desktopの設定ファイルに以下を追加してください:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "expense-tracker": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\Learning\\Expense-Tracker-MCP-Server",
        "run",
        "fastmcp",
        "run",
        "main.py"
      ]
    }
  }
}

Claude Desktopを完全に終了(システムトレイ → 終了)してから再起動してください。ツールパネルに経費トラッカーツールが表示されるはずです。


プロンプト例

Claudeに接続したら、以下のように話しかけることができます:

  • "今日Whole Foodsで食料品に45ドル使ったことを記録して"

  • "今月の食費をすべて見せて"

  • "先月一番使ったものは何?"

  • "外食の月次予算を300ドルに設定して"

  • "娯楽費の予算はあといくら残ってる?"

  • "3月の経費をすべてCSVでエクスポートして"


開発

# Run with MCP inspector for debugging
fastmcp dev inspector main.py

ライセンス

MIT

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - A tier

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/simran-mehta/Expense-Tracker-MCP-Server'

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