wallet-watch-mcp
MCP server that exposes the wallet-watch subscription-tracking REST API as tools for AI assistants, enabling natural language management of subscriptions including listing, renewal forecasts, spend summaries, and actions like snoozing or downgrading.
README
wallet-watch-mcp
An MCP server that exposes the wallet-watch subscription-tracking REST API (a Spring Boot service) as tools an AI model can call.
Ask an assistant "what's renewing this week?", "where am I wasting money?", or "did anything get more expensive lately?" and it calls these tools against your wallet-watch backend — reading, reasoning over, and acting on your subscriptions.
What it does
Exposes the wallet-watch subscription API as tools an AI assistant can call, so you can manage subscriptions in plain language. Through it, an assistant can:
- List your subscriptions and filter them by category.
- Tell you what's renewing soon and forecast spend for the months ahead.
- Summarize monthly spend by category.
- Surface unused subscriptions and overlapping (duplicate) services.
- Report subscriptions whose price recently went up.
- Snooze, resume, or downgrade a subscription on your behalf.
It talks to the wallet-watch backend over HTTP, so that service (or your own API at the same routes) needs to be running.
Files
Three files of code — everything configurable lives in config.py.
wallet-watch-mcp/
├── config.py ← ALL config: connection settings + endpoint paths
├── client.py ← HTTP helpers (get_json / patch_json): auth, timeout, errors
├── server.py ← the MCP server + the tools
├── requirements.txt
├── .env.example
├── Dockerfile
├── docker-compose.yml
└── .gitignore
Tools
Read
| Tool | What it does |
|---|---|
list_subscriptions(category?) |
All subscriptions, optionally filtered by category. |
get_upcoming_renewals(days=30) |
Renewing within N days, soonest first. |
get_spend_summary() |
Total monthly spend + per-category breakdown. |
find_unused_subscriptions(days=30) |
Unused subscriptions + potential savings. |
find_duplicate_services() |
Overlapping subscriptions in the same category. |
forecast_spend(months=6) |
Month-by-month spend forecast (annual bills as lumps). |
get_recent_price_increases(since_days=90) |
Subscriptions whose price went up. |
Act
| Tool | What it does |
|---|---|
snooze_or_downgrade(id, action, tier?) |
Pause, resume, or downgrade a subscription. |
Every tool returns clean JSON and degrades gracefully: if the backend is down, it
returns {"error": true, "message": "..."} instead of crashing.
Run it (local)
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # then set WALLET_WATCH_BASE_URL
python server.py
Serves at http://localhost:8000/mcp (streamable HTTP transport). Make sure the
wallet-watch backend is running (default http://localhost:8080).
Test it with the MCP Inspector
The MCP Inspector lists the tools and lets you call them by hand — no AI client needed.
npx @modelcontextprotocol/inspector
It opens a UI at http://localhost:6274 (if the terminal prints a URL with a session
token, open that one — you don't need to copy the token manually). Then:
- Transport Type:
Streamable HTTP - URL:
http://localhost:8000/mcp - Connect → open Tools → List Tools → all eight should appear.
- Run
get_spend_summary(no args) → expect real JSON from your backend. - Try
snooze_or_downgradewithid=1, action="snooze", thenlist_subscriptionsto confirm the status changed. - Stop the backend and re-run any tool → you get a graceful
{"error": true, ...}.
Troubleshooting: a 404 on connect usually means the URL needs
/mcp(try a trailing slash too). A"...returned HTTP 404"inside a tool result means the connection is fine but an endpoint path inconfig.pydoesn't match your backend. AnAttributeErrorfor a missing config attribute means a path constant is missing fromconfig.py— add it there.
Connect a real AI client
Point an HTTP MCP client at the URL. In Claude Desktop's config:
{
"mcpServers": {
"wallet-watch": { "url": "http://localhost:8000/mcp" }
}
}
Restart the client, then ask: "What am I paying for?", "What renews this week?", "Where am I wasting money?", "Snooze my gym membership."
Run both services together
docker compose up
Set the api service in docker-compose.yml to your wallet-watch image or build:
path first. The MCP container reaches the API at http://api:8080.
Config reference
| Variable | Default | Purpose |
|---|---|---|
WALLET_WATCH_BASE_URL |
http://localhost:8080 |
Base URL of the wallet-watch API. |
WALLET_WATCH_API_KEY |
(none) | Optional bearer token. |
WALLET_WATCH_TIMEOUT |
10 |
Per-request timeout (seconds). |
MCP_SERVER_NAME |
wallet-watch-mcp |
Server identity. |
MCP_TRANSPORT |
streamable-http |
Use stdio for local desktop clients. |
Backend endpoints used
All defined in config.py — remap there if your backend differs.
GET /subscriptions?category=GET /subscriptions/upcoming?days=GET /subscriptions/spend-summaryGET /subscriptions/unused?days=GET /subscriptions/price-changes?sinceDays=GET /subscriptions/forecast?months=PATCH /subscriptions/{id}/statusPATCH /subscriptions/{id}/plan
find_duplicate_services needs no dedicated endpoint — it reasons over
GET /subscriptions.
Requirements
Functional
- Expose subscription reads as MCP tools: list/filter, upcoming renewals, spend summary, unused, duplicates, forecast, recent price increases.
- Expose a write/action tool to snooze, resume, or downgrade a subscription.
- Each tool returns clean, structured JSON — not raw passthrough or verbose text.
- Each tool carries a clear docstring describing when to use it (this is what the model reads to decide).
- Validate arguments (e.g. positive
days/months, requiredtieron downgrade) before calling the backend. find_duplicate_servicesreasons over existing subscription data without a dedicated backend endpoint.
Non-functional
- Graceful degradation: if the backend is unreachable, times out, errors, or returns non-JSON, tools return
{"error": true, "message": "..."}— never crash the server. - Single configuration point: all connection settings and endpoint paths live in
config.py. - Small and readable: three code files; logic easy to follow top-to-bottom.
- Transport-flexible: streamable HTTP by default;
stdiovia config for local desktop clients. - Portable: points at any wallet-watch deployment (local, Docker, remote) via one env var.
Design decisions
All configuration in one place. Connection settings and endpoint paths live in
config.py and nowhere else, so pointing at a different backend or remapping a route is
a single-file change.
One HTTP helper, centralized error handling. Every request goes through get_json /
patch_json in client.py, which own auth headers, timeout, and translating any failure
into a readable BackendError. Tools never touch transport concerns and never crash on a
dead backend — they return a structured error object instead.
Docstrings are the interface. Each tool leads with what it's for in plain language, because that text is what the model reads to decide when to call it. Clear descriptions matter more here than in ordinary code.
Structured JSON, shaped for a model. Tools return tidy dicts and do light work the model shouldn't — sorting renewals by urgency, summing potential savings, grouping duplicates — rather than passing raw backend output straight through.
Reads and actions, not just reads. The server includes a write tool
(snooze_or_downgrade) so an assistant can act, not only report — with argument
validation and a returned updated state to confirm the change.
Scheduling/notifying is out of scope — by design. MCP is request/response; it has no
background loop. Proactive notifications (e.g. price-increase alerts) belong in the
backend as a scheduled job that shares the same detection logic. The MCP server exposes
the reactive view (get_recent_price_increases) only.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。