Build a tenant-safe MCP tool server & eval runner
Enforce server-side MCP authorization, build hybrid RAG grounding, bound agent loops, and run golden evaluation gates.
Your brief
Implement the core runtime and evaluation pipeline for a forward-deployed AI support agent: strict tool argument validation, tenant-isolated MCP tool execution, hybrid retrieval with no-match fallbacks, agent loop circuit breakers, structured JSON parsing, and release-gating evals.
Node.js 22.12+ and basic JavaScript/JSON experience. Review fde foundations whenever a concept is unfamiliar.
Uses in-memory documents, synthetic tickets, and deterministic lexical/synonym scoring so every step runs offline with zero API keys. Production systems connect real vector/BM25 stores, live LLM providers, and persistent audit logs.
Download starter.mjs and checks.mjs into one folder. Run node checks.mjs ./starter.mjs 1 through 6 as you complete each step.
0 / 6 steps verified by you. Checks are self-reported; this website does not execute your code.
- 1
Validate MCP tool schemas strictly
Reject unknown tools, missing parameters, invalid enums, and unexpected keys.
- 2
Enforce server-side tenant and role boundaries
Treat the LLM agent as an untrusted client; scope data by trusted actor identity.
- 3
Build tenant-scoped hybrid retrieval & fallback
Bridge vocabulary mismatches and refuse to guess when evidence is weak.
- 4
Bound agentic loops and token budgets
Halt terminal errors, repeated identical tool failures, and runaway costs.
- 5
Parse and enforce structured LLM responses
Validate types, required fields, enums, and reject unexpected keys.
- 6
Run golden eval gates and explain trade-offs
Measure accuracy, citation grounding, refusals, and schema validity per dimension.