Skip to main content
Glama
sahaniaditya

Expense MCP

by sahaniaditya

Expense MCP

2つの部分からなるオープンソースの経費トラッカー:

  1. 経費をPostgres(Supabase)に保存するFastMCPサーバー。

  2. 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+

  • uv

  • 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.py

HTTP 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/mcp

Horizon認証はデフォルトで有効です。Horizon APIキー(fmcp_...)を使用するか、クライアントからOAuthサインインを完了してください。

Androidアプリ

ソースコードはmobile/にあります。

Expo Goで試す(開発)

Play StoreのExpo GoはSDK 54と一致している必要があります。

cd mobile
npm install
npx expo start

Metroを実行しているコンピューターがまだ必要です。スマホだけでインストールする場合は、APKを使用してください。

アプリのセットアップ

  1. Connectを開きます。

  2. FastMCP Cloud URLを確認します(ホスト型サーバー用にすでに入力済みです)。

  3. Anthropic APIキーを貼り付けます。

  4. Sign in and connectをタップし、Horizonのログインを完了します(またはfmcp_ APIキーを貼り付けます)。

  5. SpeakまたはAddを使用します。

アプリはセッションを保存し、次回起動時に再接続します。

APKをビルド

GitHub ActionsがリリースAPKを生成します(JSバンドルを含むため、Metroは不要です):

  1. mainまたはapk-github-actionsにプッシュするか、ActionsタブからAndroid APKワークフローを実行します。

  2. expense-mcp-apkアーティファクトをダウンロードします。

  3. 解凍してapp-release.apkをインストールします。

  4. まず以前のデバッグビルドをアンインストールします。

ローカル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を参照してください。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    Enables 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
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables management of expenses via SQLite database, including adding, listing, updating, deleting, filtering, and summing expenses through natural language.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Persistent expense tracker backed by Neon Postgres with SQL tools for adding, editing, deleting, and analyzing expenses via natural language.
    -

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/sahaniaditya/expense-mcp'

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