Expense Tracker MCP Server
Expense Tracker MCP Server
Model Context Protocol (MCP) サーバーで、FastMCP (v3.x) と Python で構築され、Claude Desktop や MCP Inspector などの MCP 準拠クライアントに経費追跡のためのツールとリソースを提供するように設計されています。
📋 前提条件
Python: 3.10+ (Python 3.14 でテスト済み)
uv: 高速な Python パッケージインストーラー兼リゾルバー (astral.sh/uv)
Node.js:
v22.xまたはv24.x(LTS) — MCP Inspector UI に必要Claude Desktop (任意): Claude 内で直接ツールをテストするため
Related MCP server: Math Addition MCP Server
🚀 セットアップとインストール
1. プロジェクトと環境の初期化
# Initialize uv project (if starting fresh)
uv init .
# Install FastMCP
uv add fastmcp2. MCP Inspector UI 用に Node.js を準備する
MCP Inspector (@modelcontextprotocol/inspector) には Node.js v22.19.0+ または v24+ が必要です。nvm-windows を使用している場合:
nvm install lts
nvm use 24インスペクターをグローバルにインストールするか、npx にフェッチを許可してください:
npm install -g @modelcontextprotocol/inspector🛠️ 実行と開発
オプション A: インタラクティブ Web UI (MCP Inspector)
ホットリロード 付きで MCP Inspector Web UI を起動するには:
uv run fastmcp dev inspector main.pyこのターミナルウィンドウを開いたままにしてください。
コンソールは認証トークン付きのローカル URL を出力します:
MCP Inspector Web is up and running at: http://127.0.0.1:6274?MCP_INSPECTOR_API_TOKEN=<token>そのリンクをブラウザで開いて、ツールのテスト、スキーマの確認、リアルタイムのリクエスト/レスポンスログの表示を行ってください。
オプション B: サーバーを直接実行 (STDIO)
MCP サーバーを標準 I/O モードで実行するには:
uv run fastmcp run main.py(または uv run python main.py)
🤖 Claude Desktop への接続
1. 設定ファイルの場所
Windows では、Claude Desktop の設定は次の場所に保存されます:
%APPDATA%\Claude\claude_desktop_config.json(完全なパス: C:\Users\<YourUsername>\AppData\Roaming\Claude\claude_desktop_config.json)
2. 設定
mcpServers の下に expense-server 定義を追加します。
注: Windows では、Claude Desktop などの GUI アプリケーションはシェルの
PATHを継承しないことがよくあります。常にuv.exeへの絶対パスを指定してください。
{
"mcpServers": {
"expense-server": {
"command": "C:\\Users\\pyash\\AppData\\Local\\Python\\pythoncore-3.14-64\\Scripts\\uv.exe",
"args": [
"run",
"--directory",
"d:\\expense-tracker-mcp-server",
"fastmcp",
"run",
"main.py"
]
}
}
}3. Claude Desktop を再起動する
Claude Desktop を完全に閉じます (時計の近くの Windows システムトレイから終了していることを確認してください)。
Claude Desktop を再度開きます。
設定 > 開発者 を確認して、
expense-serverが接続されていることを確認します。
🧰 利用可能なツール (現在の main.py)
ツール | パラメータ | 説明 |
|
|
|
|
| 2つの数値を加算し、合計を返します。 |
🔧 トラブルシューティング
1. Unknown command "main.py". Available commands: inspector, apps.
FastMCP 3.x では、fastmcp dev はコマンドグループです。fastmcp dev main.py の代わりに fastmcp dev inspector main.py を使用してください。
2. node:util does not provide an export named 'styleText'
Node.js が v20.12 より古いです。nvm install lts && nvm use 24 で Node v22+ または v24+ に更新してください。
3. Cannot find native binding (npm optional dependencies bug)
Node バージョンの切り替えによる npx キャッシュの破損。次を実行してください:
npm cache clean --force
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache\_npx" -ErrorAction SilentlyContinue
npm install -g @modelcontextprotocol/inspectorMaintenance
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
- FlicenseBqualityDmaintenanceA simple demonstration MCP server that provides basic utility tools including dice rolling and number addition functionality. This server serves as a tutorial example for setting up both local and remote MCP servers using FastMCP.3
- FlicenseNot gradedqualityDmaintenanceA simple MCP server that provides a tool for adding two numbers, designed for testing MCP integration with Claude.
- FlicenseNot gradedqualityCmaintenanceProvides basic calculator operations (add, subtract, multiply, divide) as MCP tools for use with Claude Desktop and other MCP clients.
- AlicenseAqualityDmaintenanceA minimal FastMCP server providing demo tools for arithmetic operations and dice rolls, designed for learning MCP wiring with Claude Desktop or other MCP clients.3MIT
Related MCP Connectors
Math.js MCP — wraps the mathjs.org API (free, no auth)
NumbersAPI MCP — wraps numbersapi.com (free, no auth)
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ykp-narola/expense-tracker-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server