Skip to content

Add MCP server for budget and cash-flow analysis - #1

Merged
jdelles merged 1 commit into
mainfrom
add-mcp-server
Jul 13, 2026
Merged

jdelles merged 1 commit into
mainfrom
add-mcp-server

Conversation

@jdelles

@jdelles jdelles commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a new stdio MCP server (cmd/mcp) that exposes FinanceService as tools an agent can call directly: get_balance, get_cash_flow_forecast, get_sweepable_cash, set_safety_buffer, list_upcoming_transactions, list_recurring_transactions, add_income, add_expense, set_starting_balance.
  • Adds a safety_buffer setting and CalculateSweepableCash: sweepable amount = lowest forecasted balance over a horizon minus the safety buffer. Answers "how much free cash flow do I have" / "how much can I move to savings, investing, or debt paydown" without the agent re-deriving it from raw transactions.
  • Generalizes Calculate90DayForecast into CalculateForecast(ctx, balance, days) so forecasts aren't limited to 90 days (ripples through the HTTP API's ?days= param and the CLI).
  • Adds make build-mcp / make run-mcp targets.

Test plan

  • go build ./..., go vet ./..., go test ./... all pass
  • Built bin/currentz-mcp and drove it end-to-end via a real MCP client (stdio JSON-RPC): all 9 tools list correctly with auto-inferred schemas, calls round-trip, errors propagate cleanly
  • Run against a real seeded local DB (blocked locally on goose/createdb not being installed) and sanity-check get_sweepable_cash math against a known scenario before relying on it for real decisions
  • Register with claude mcp add currentz --scope user -e DB_URL=... -- ./bin/currentz-mcp and try it from a live Claude Code session

🤖 Generated with Claude Code

Exposes FinanceService over stdio MCP so agents can query balance,
forecasts, and a new sweepable-cash calculation (lowest forecasted
balance minus a configurable safety buffer) instead of pulling raw
transactions and doing the math in-context. Also generalizes the
forecast from a hardcoded 90 days to an arbitrary horizon.
@jdelles
jdelles merged commit 3f95ff2 into main Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant