feat(mcp): MCP server — Gate 5, M5 reached (5.7)#40
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
TRACKER step 5.7 — MCP server. The final Phase 5 step: CodeRadar becomes a pluggable node in a multi-agent pipeline.
New
@coderadar/mcppackage.createServer(graph)registers five tools over@modelcontextprotocol/sdk'sMcpServerwith zod input schemas and agent-facing descriptions (when to use each; thatambiguous+disambiguationshould be relayed to a human):resolve_context(ticket)buildBundlefind_component(terms)matchComponentstrace_lineage(id)traceLineagejourneys(start, depth?)journeysblast_radius(node, depth?)blastRadiusEvery tool returns a QueryResult envelope as JSON text — no LLM in the node, it's a deterministic context provider.
Bins:
coderadar-mcploads a graph fromCODERADAR_GRAPH(or argv) and serves stdio. Also shipped in the publishedui-lineagebundle asui-lineage-mcp(MCP SDK + zod kept external, installed as runtime deps), so end users get the server withnpm i ui-lineage.Accept
Integration test drives a real MCP
ClientoverStdioClientTransportagainst a graph scanned froma4-generic-text: lists exactly the five tools, and round-trips ok / ambiguous / declined envelopes (find_component(["Card number"])ok,["Save"]ambiguous with adisambiguation,["zzqqnope"]declined;trace_lineage/blast_radiusdecline unknown ids;resolve_contextdeclines a backend-only ticket).Gate 5 passes. M5 reached — ticket in → budgeted context bundle out, over MCP.
Verification
ui-lineage-mcpbin starts and resolves its externals🤖 Generated with Claude Code