Expense Mcp

io.github.justfsl50由 GitHub 帳號 justfsl50 發布v1.0.1更新於 Oct 24, 2026

Personal Expense Tracker MCP Server — expenses, income, budgets & savings goals

已驗證STDIO僅桌面效率與工作流金融

概覽

AI 產生的概覽

本機個人記帳 MCP 伺服器:記錄支出與收入、查看消費彙總,並管理分類預算與儲蓄目標。

可以做什麼
  • 新增與搜尋支出或收入,可依文字、日期、分類或金額篩選
  • 彙總今日、本週、本月或本年的消費,並提供熱門分類、每日平均等洞察
  • 設定每月分類預算,檢視使用百分比,並在達到 80% 與 100% 時提醒
  • 建立儲蓄目標、向目標存入金額並檢視進度條
  • 經確認提示後刪除紀錄,並以資源形式提供月度彙總、預算與目標
適用情境
適合以對話方式記帳,並隨時詢問這週花了多少、是否超出預算、儲蓄目標進度如何,資料保存在自己的資料庫中。
執行需求
以 Python 套件形式在本機執行(pip 或 uv)。需透過 DATABASE_URL 指定資料庫位址(預設 SQLite,也支援 PostgreSQL);可選 CURRENCY 與 DEFAULT_USER 變數。PostgreSQL 位址中可能包含帳號密碼。
安裝前請注意
它會寫入、修改與刪除所設定資料庫中的財務紀錄,請將 DATABASE_URL 指向你打算使用的資料庫並做好備份。PostgreSQL 位址可能含密碼,勿放入共用設定。刪除雖有確認提示,但無法復原。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Expense Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

💰 expense-mcp

Personal Expense Tracker as an MCP Server — works with Claude Desktop, Cursor, nanobot, Windsurf, and any MCP-compatible client.

[Python] [MCP SDK] [License]


Features

  • 📝 Track expenses & income with categories and descriptions
  • 📊 Spending summaries — today, week, month, year
  • 💳 Budget management — set limits per category, get alerts at 80%/100%
  • 🎯 Savings goals — create goals, track progress with visual bars
  • 📈 Spending insights — top categories, daily averages, biggest days
  • 🗑️ Safe deletion — Pydantic-based elicitation for confirmation
  • 🔄 Dual transport — stdio (local) + streamable HTTP (remote)

Install

bash
# with uv (recommended)uv pip install git+https://github.com/justfsl50/expense-mcp.git
# with pippip install git+https://github.com/justfsl50/expense-mcp.git
# from sourcegit clone https://github.com/justfsl50/expense-mcp.gitcd expense-mcppip install -e .

Quick Start

Claude Desktop

Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (Mac):

json
{  "mcpServers": {    "expense-mcp": {      "command": "uv",      "args": ["run", "expense-mcp"],      "env": {        "DATABASE_URL": "sqlite:///expenses.db",        "CURRENCY": "₹",        "DEFAULT_USER": "me"      }    }  }}

Cursor / Windsurf

Same config — paste into MCP settings under the respective app.

nanobot

json
{  "mcp": {    "servers": [{      "name": "expense-mcp",      "command": "uv run expense-mcp"    }]  }}

HTTP mode (remote / multi-client)

bash
python server.py http# Server runs at http://127.0.0.1:8000/mcp

Environment Variables

VariableDefaultDescription
DATABASE_URLsqlite:///expenses.dbSQLite or PostgreSQL URL
CURRENCY₹Currency symbol
DEFAULT_USERdefaultUser ID for multi-user setups

PostgreSQL example:

DATABASE_URL=postgresql://user:pass@localhost:5432/expenses

Tools

ToolDescriptionRead-only
expense_addSave expense or income❌
expense_searchFilter by text, date, category, amount✅
expense_summarytoday / week / month / year totals✅
expense_deleteDelete with Pydantic confirmation prompt❌
expense_insightsSpending patterns and top categories✅
budget_setSet monthly category budget❌
budget_listView budgets with usage %✅
goal_createCreate savings goal❌
goal_updateAdd money toward goal❌
goal_listView goals with progress bars✅

Resources

URIDescription
expense://summary/monthCurrent month summary
expense://budgets/currentThis month's budgets
expense://goals/allAll savings goals

Prompts

PromptTitleDescription
monthly_reviewMonthly ReviewStart a full month spending review
budget_setupBudget SetupAuto-suggest budgets from history
savings_planSavings PlanCreate a plan for a savings goal

Usage Examples

Just talk naturally in any MCP client:

"spent 500 on groceries""show food expenses this week""how much did I spend last month?""set food budget to 5000""am I within budget?""save 1000 toward my iPhone goal""give me spending insights""delete expense #12"

Architecture

  • MCP SDK v1.26.0 with FastMCP + json_response=True
  • Typed lifespan — DB engine managed via AppContext dataclass
  • SQLAlchemy 2.0 — DeclarativeBase, sessionmaker
  • Pydantic v2 — input validation, elicitation schemas
  • Tool annotations — readOnlyHint, destructiveHint, idempotentHint
  • Context logging — ctx.info(), ctx.warning() in tools

Database Schema

expenses  — id, user_id, amount, category, description, type, date, source, created_atbudgets   — id, user_id, category, amount, monthgoals     — id, user_id, name, target, saved, deadline

License

MIT — free to use, modify, and distribute.

來源:README.md,提交 6538644

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分