Expense MCP
Expense MCP
开源支出追踪器,包含两个部分:
一个 FastMCP 服务器,将支出存储在 Postgres(Supabase)中。
一个作为 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 start你仍然需要一台运行 Metro 的电脑。如需仅手机安装,请使用 APK。
应用设置
打开 连接。
确认 FastMCP Cloud URL(已为托管服务器预填)。
粘贴一个 Anthropic API 密钥。
点击 登录并连接 并完成 Horizon 登录(或粘贴一个
fmcp_API 密钥)。使用 语音输入 或 添加。
应用会存储会话,并在下次启动时重新连接。
构建 APK
GitHub Actions 会生成发布版 APK(包含 JS bundle,无需 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。
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.
This server cannot be installed
Maintenance
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
Log expenses, receipts and mileage from chat: auto-categorise, split VAT, summarise, export, rebill.
Personal finance by conversation: expenses, receipts, statement import, budgets, net worth.
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
- ManiloOAuthapp.manilo
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
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 gradedqualityCmaintenancePersistent expense tracker backed by Neon Postgres with SQL tools for adding, editing, deleting, and analyzing expenses via natural language.-
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/sahaniaditya/expense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server