Design proposal for a thin MCP server adapter over the existing
service layer so Claude Code and other MCP clients can consume
Quartermaster state and execute mutations without opening the
browser.
Document only. Covers:
- Goal and non-goals (no staging queue, no auth, no bank-feed
ingestion).
- Architecture: in-process Python module (quartermaster-mcp
script) sharing QUARTERMASTER_DB_URL with the web app; stdio
transport; QUARTERMASTER_MCP_MODE env var gates read/write.
- Tool surface aligned with the current model: get_budget,
list_months, get_month, get_month_entry, list_postings,
get_zero_amount (read); add/update/remove entry, create /
activate / close / reopen month, add / update / delete
transaction, set debt target (write).
- Resources: quartermaster://budget, quartermaster://month/YYYY-MM.
- Prompts: monthly_review, quick_log, close_prep.
- Typed errors with stable codes.
- Three-phase rollout: read-only -> transaction writes -> entry
and lifecycle writes.
- Four open questions parked at the bottom.
Refs #23
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>