-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(mcp): codemap mcp — agent-transports v1 (Tracer 1 of 7) #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9722e4d
feat(mcp): scaffold codemap mcp + ping stub (Tracer 1 of 7)
SutuSebastian 7f8f5de
docs(plans): settle Q1+Q2 of agent-transports grill round
SutuSebastian d3f15f3
docs(plans): settle Q3 — lazy resource caching
SutuSebastian 8bc33e1
docs(plans): settle Q4 — snake_case for MCP tool names + input keys
SutuSebastian 38547ac
docs(plans): settle Q5 — single polymorphic save_baseline tool
SutuSebastian 27a76aa
feat(mcp): query + query_batch tools (Tracer 2 of 7)
SutuSebastian 559e6c6
feat(mcp): query_recipe tool (Tracer 3 of 7)
SutuSebastian b21eed1
feat(mcp): audit + context + validate tools (Tracer 4 of 7)
SutuSebastian b2be312
feat(mcp): save_baseline + list_baselines + drop_baseline (Tracer 5 o…
SutuSebastian b55da03
feat(mcp): codemap:// resources, lazy-cached (Tracer 6 of 7)
SutuSebastian 3fe2eb8
docs(mcp): architecture/glossary/README/agent rule + skill (Tracer 7 …
SutuSebastian 02b316d
fix(mcp): address PR #35 CodeRabbit feedback (1 Critical + 1 Major + …
SutuSebastian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| "@stainless-code/codemap": minor | ||
| --- | ||
|
|
||
| feat(mcp): `codemap mcp` — Model Context Protocol server (agent-transports v1) | ||
|
|
||
| Adds the `codemap mcp` top-level command — boots an MCP server over | ||
| stdio so agent hosts (Claude Code, Cursor, Codex, generic MCP clients) | ||
| call codemap as JSON-RPC tools instead of shelling out per query. | ||
| Eliminates the bash round-trip on every agent invocation. | ||
|
|
||
| Surface (one tool per CLI verb plus `query_batch`, all snake_case): | ||
|
|
||
| - `query`, `query_batch`, `query_recipe`, `audit`, `save_baseline`, | ||
| `list_baselines`, `drop_baseline`, `context`, `validate` | ||
| - Resources: `codemap://recipes`, `codemap://recipes/{id}`, | ||
| `codemap://schema`, `codemap://skill` (lazy-cached) | ||
|
|
||
| `query_batch` is MCP-only — N statements in one round-trip with | ||
| batch-wide-defaults + per-statement-overrides (items are | ||
| `string | {sql, summary?, changed_since?, group_by?}`). Per-statement | ||
| errors are isolated. `save_baseline` ships as one polymorphic tool | ||
| (`{name, sql? | recipe?}` with runtime exclusivity check) mirroring | ||
| the CLI's single `--save-baseline=<name>` verb. | ||
|
|
||
| Output shape is verbatim from each tool's CLI counterpart's `--json` | ||
| envelope (no re-mapping). Bootstrap once at server boot; tool | ||
| handlers reuse existing engine entry-points (`executeQuery`, | ||
| `runAudit`, etc.) — no duplicate business logic. | ||
|
|
||
| New dep: `@modelcontextprotocol/sdk`. | ||
|
|
||
| HTTP API (`codemap serve`) stays in roadmap backlog; design points | ||
| (tool taxonomy + output shape) are reserved in `docs/architecture.md | ||
| § MCP wiring` so HTTP inherits them when a concrete consumer asks. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.