An MCP server that lets the business query production data — and get the right number
Prosperas · May 2025 – Present · Technical Lead
Context
Executives, managers and analysts wanted answers from production data without waiting on engineering. The first version of the natural-language-to-SQL assistant returned plausible but wrong numbers.
What I did
- Built a remote, read-only MCP server inside the FastAPI backend with 8 tools (query, cursor pagination, fuzzy user search, schema discovery), API keys issued from the admin portal, and per-tenant scoping enforced by rewriting every SQL statement with sqlglot.
- Traced the wrong answers to root causes, not prompts: a missing business rule caused a 98.4% undercount of approvals, an INNER JOIN dropped records, and the model was offered views that didn't exist. Fixed them with a single source of business rules embedded in the server, guarded by a drift test.
- Ran an adversarial security review of my own server: closed scope-bypass and PII-exposure paths and tested 30+ attack shapes with zero leaks.
- Built an autonomous morning triage agent (headless Claude Code with the Sentry, Jira and Slack MCPs). It root-causes production errors against the repo and files at most 3 tickets per run through a 4-condition gate, and it is not allowed to commit code or open PRs.
