Expense MCP
Expense MCP
2つの部分からなるオープンソースの経費トラッカー:
経費をPostgres(Supabase)に保存するFastMCPサーバー。
MCPホストとして機能するExpo Androidアプリ。経費を話すか入力すると、Claudeが代わりにMCPツールを呼び出します。
ライブMCPエンドポイント:
https://indirect-olive-catshark.fastmcp.app/mcpリポジトリ:github.com/sahaniaditya/expense-mcp
機能
add_expense— 金額、カテゴリ、日付、任意の説明を保存get_expenses— 日付範囲で経費を一覧表示data://categories— 食料品、交通、教育、娯楽、健康、その他Androidでの音声入力(「食料品に250使った」)
リモートサーバー向けのHorizon / FastMCP Cloud OAuth
スタンドアロンAPKをビルドするGitHub Actionsワークフロー
Related MCP server: Expense Tracker MCP
アーキテクチャ
Android app (MCP host)
→ Claude (Anthropic API)
→ FastMCP Cloud / local MCP server
→ Supabase Postgresスマホアプリはデータベースと直接通信しません。Claudeがどのツールを呼び出すかを決定し、アプリがそのツールをMCPサーバーに対して実行します。
MCPサーバー
必要条件
Python 3.14+
Postgresデータベース(Supabaseで可)
データベース
expensesテーブルを作成:
create table if not exists expenses (
id uuid primary key,
price integer not null,
category text not null,
date timestamptz not null,
description text
);環境設定
.env.exampleを.envにコピーし、接続文字列を設定します:
SUPABASE_URL=postgresql://postgres:YOUR_PASSWORD@db.YOUR_PROJECT.supabase.co:5432/postgres.envを絶対にコミットしないでください。
ローカルで実行
uv sync
uv run python main.pyHTTP MCPエンドポイントはhttp://127.0.0.1:8000/mcpです。
インスペクタ:
uv run fastmcp dev inspector main.pyデプロイ
このリポジトリをGitHubにプッシュし、Prefect Horizon / FastMCP Cloudでエントリポイントmain.py:mcpのプロジェクトを作成します。デプロイ設定でSUPABASE_URLをシークレットとして追加してください。
クライアントは次に接続します:
https://YOUR-PROJECT.fastmcp.app/mcpHorizon認証はデフォルトで有効です。Horizon APIキー(fmcp_...)を使用するか、クライアントからOAuthサインインを完了してください。
Androidアプリ
ソースコードはmobile/にあります。
Expo Goで試す(開発)
Play StoreのExpo GoはSDK 54と一致している必要があります。
cd mobile
npm install
npx expo startMetroを実行しているコンピューターがまだ必要です。スマホだけでインストールする場合は、APKを使用してください。
アプリのセットアップ
Connectを開きます。
FastMCP Cloud URLを確認します(ホスト型サーバー用にすでに入力済みです)。
Anthropic APIキーを貼り付けます。
Sign in and connectをタップし、Horizonのログインを完了します(または
fmcp_APIキーを貼り付けます)。SpeakまたはAddを使用します。
アプリはセッションを保存し、次回起動時に再接続します。
APKをビルド
GitHub ActionsがリリースAPKを生成します(JSバンドルを含むため、Metroは不要です):
mainまたはapk-github-actionsにプッシュするか、ActionsタブからAndroid APKワークフローを実行します。expense-mcp-apkアーティファクトをダウンロードします。
解凍して
app-release.apkをインストールします。まず以前のデバッグビルドをアンインストールします。
ローカルEAS(オプション、Expoアカウントが必要):
cd mobile
npx eas-cli login
npx eas-cli build -p android --profile previewプロジェクト構成
main.py MCP tools and resource
connection.py Supabase / Postgres connection
mobile/ Expo SDK 54 Android client
.github/workflows/ APK buildライセンス
MIT。LICENSEを参照してください。
This server cannot be deployed
Maintenance
Related MCP Connectors
Expense ledger for AI assistants: record receipts line by line, ask what you spent, export anytime.
Track expenses from your AI chat: log, categorize, monthly CSV reports. All data is local.
Log expenses, receipts and mileage from chat: auto-categorise, split VAT, summarise, export, rebill.
Log expenses, receipts and mileage from chat: auto-categorise, split VAT, summarise, export, rebill.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables AI assistants to manage personal finances by storing, analyzing, and exporting expense data using a persistent PostgreSQL database. Supports adding/editing expenses, generating spending summaries, detecting top categories, and creating monthly reports.12-
- FlicenseNot gradedqualityDmaintenanceEnables management of expenses via SQLite database, including adding, listing, updating, deleting, filtering, and summing expenses through natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.-
- FlicenseNot gradedqualityDmaintenancePersistent expense tracker backed by Neon Postgres with SQL tools for adding, editing, deleting, and analyzing expenses via natural language.-