Skip to content

feat(mcp): MCP server — Gate 5, M5 reached (5.7)#40

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-5/step-5.7-mcp-server
Jul 15, 2026
Merged

feat(mcp): MCP server — Gate 5, M5 reached (5.7)#40
officialCodeWork merged 1 commit into
developmentfrom
build/phase-5/step-5.7-mcp-server

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

What

TRACKER step 5.7 — MCP server. The final Phase 5 step: CodeRadar becomes a pluggable node in a multi-agent pipeline.

New @coderadar/mcp package. createServer(graph) registers five tools over @modelcontextprotocol/sdk's McpServer with zod input schemas and agent-facing descriptions (when to use each; that ambiguous + disambiguation should be relayed to a human):

Tool Wraps Returns
resolve_context(ticket) buildBundle the full budgeted ContextBundle
find_component(terms) matchComponents ranked candidates
trace_lineage(id) traceLineage per-instance data/state/events
journeys(start, depth?) journeys user-journey paths
blast_radius(node, depth?) blastRadius reverse-dependency impact

Every tool returns a QueryResult envelope as JSON text — no LLM in the node, it's a deterministic context provider.

Bins: coderadar-mcp loads a graph from CODERADAR_GRAPH (or argv) and serves stdio. Also shipped in the published ui-lineage bundle as ui-lineage-mcp (MCP SDK + zod kept external, installed as runtime deps), so end users get the server with npm i ui-lineage.

Accept

Integration test drives a real MCP Client over StdioClientTransport against a graph scanned from a4-generic-text: lists exactly the five tools, and round-trips ok / ambiguous / declined envelopes (find_component(["Card number"]) ok, ["Save"] ambiguous with a disambiguation, ["zzqqnope"] declined; trace_lineage/blast_radius decline unknown ids; resolve_context declines a backend-only ticket).

Gate 5 passes. M5 reached — ticket in → budgeted context bundle out, over MCP.

Verification

  • 7 packages build/typecheck clean; the bundled ui-lineage-mcp bin starts and resolves its externals
  • unit tests: 193 pass (mcp 6, parser 119, core 46, agent-sdk 19, vision 3)
  • eval: 265 pass · 0 fail · 0 xfail, all honesty metrics 1.000, gate OK

🤖 Generated with Claude Code

New @coderadar/mcp package. createServer(graph) registers five tools over
@modelcontextprotocol/sdk's McpServer with zod input schemas and
agent-facing descriptions:
- resolve_context(ticket) → the full budgeted ContextBundle (buildBundle)
- find_component(terms), trace_lineage(id), journeys(start, depth?),
  blast_radius(node, depth?) → core query envelopes

Each tool returns a QueryResult envelope as JSON text; descriptions tell
the agent that ambiguous/disambiguation is for a human. No LLM in the node.

Bin `coderadar-mcp` loads a graph from CODERADAR_GRAPH (or argv) and serves
stdio. Also shipped in the published ui-lineage bundle as the
`ui-lineage-mcp` bin (MCP SDK + zod kept external, installed as runtime
deps). Integration test drives a real stdio Client: lists all five tools
and round-trips ok/ambiguous/declined over a4-generic-text.

Gate 5 passed. M5 reached — ticket in → budgeted context bundle out, over
MCP. Full suite: 193 unit tests, eval 265/0/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit 8458c53 into development Jul 15, 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.

2 participants