feat(mcp): spar-mcp crate skeleton + read-only tools (Track E commit 8 / v0.9.0)#179
Merged
feat(mcp): spar-mcp crate skeleton + read-only tools (Track E commit 8 / v0.9.0)#179
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…8 / v0.9.0) New `spar-mcp` crate exposing spar's hypothetical-rebinding oracle as MCP (Model Context Protocol) tools so LLM agents can drive design-space exploration with spar as the deterministic correctness oracle. Three read-only / idempotent tools: - `spar.verify_move` — single hypothetical-rebinding check - `spar.enumerate_moves` — design-space exploration with multi-objective ranking - `spar.check_chain` — end-to-end latency breakdown for a chain Architecture: - `spar-cli` promoted to lib + bin so verify/enumerate logic is shareable - `spar-mcp` consumes the lib API in-process; no shell-out / re-parsing - stdio JSON-RPC transport (Initialize, tools/list, tools/call) - All tools `readOnlyHint: true` and `idempotentHint: true` per spec - Deterministic apply path stays CLI-exclusive (no `spar.apply_move` over MCP) Tests: 11 (5 in-process + 6 stdio). REQ-MCP-001 + TEST-MCP-* in artifacts/. Closes Track E commit 8/8 of the v0.8.0 migration design carved out as v0.9.0 scope per docs/designs/track-e-migration-research.md §6.5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2c0986b to
66dc7ba
Compare
7 tasks
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.
Summary
spar-mcpcrate exposes spar's hypothetical-rebinding oracle as MCP (Model Context Protocol) tools so LLM agents can drive design-space exploration with spar as the deterministic correctness oracle.spar.verify_move,spar.enumerate_moves,spar.check_chain. All declarereadOnlyHint: true+idempotentHint: trueper the MCP 2025-11-25 spec.spar.apply_moveover MCP, ever) per Track E migration research §6.5 — certification chain stays in spar.Architecture
spar-clipromoted tolib + binso verify / enumerate / check-chain logic is shareable.spar-mcpconsumes the lib API in-process — no shell-out, no re-parsing of stdout.spar-mcpstandalone binary orspar mcp serve.Test plan
cargo test -p spar-mcp— 11/11 passcargo clippy --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanrivet validate— PASSclaude --mcp-config '{"mcpServers": {"spar": {"command": "spar-mcp", "args": []}}}'(post-merge smoke)🤖 Generated with Claude Code