All case studies
05 — Experience · public sector · code not public
An MCP server with guardrails — an LLM writing safely to an internal system
An MCP server that lets an AI assistant log work in an internal tracking system: dry-run mode, two-step confirmations and validation before every write.
Problem
Logging work in an internal task system meant a lot of manual clicking. Giving a language model write access to a production system, however, is risky: made-up identifiers, accidental deletions.
What I built
- A Python MCP server with about 20 tools: tasks, dictionaries, statistics, templates.
- Sign-in through Keycloak (OIDC).
- Dry-run mode for every write operation and two-step confirmation for deletions.
- Validation against cached dictionaries before every write — the model cannot store a value that doesn't exist in the system.
- Structured error codes the model can branch on to decide its next step.
- Works with Claude Desktop, Cursor, Cline and n8n.
Outcome
- Work is logged by the agent right after a task is finished.
- No records with made-up values, thanks to validation before writes.
Facing a similar problem?
Describe your process — I'll tell you whether and how it can be solved.