Skip to content

feat(mcp): spar-mcp crate skeleton + read-only tools (Track E commit 8 / v0.9.0)#179

Merged
avrabe merged 1 commit intomainfrom
feat/v0.9.0-spar-mcp-skeleton
Apr 28, 2026
Merged

feat(mcp): spar-mcp crate skeleton + read-only tools (Track E commit 8 / v0.9.0)#179
avrabe merged 1 commit intomainfrom
feat/v0.9.0-spar-mcp-skeleton

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 28, 2026

Summary

  • New spar-mcp crate 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.
  • Three read-only / idempotent tools: spar.verify_move, spar.enumerate_moves, spar.check_chain. All declare readOnlyHint: true + idempotentHint: true per the MCP 2025-11-25 spec.
  • Deterministic apply path stays CLI-exclusive (no spar.apply_move over MCP, ever) per Track E migration research §6.5 — certification chain stays in spar.

Architecture

  • spar-cli promoted to lib + bin so verify / enumerate / check-chain logic is shareable.
  • spar-mcp consumes the lib API in-process — no shell-out, no re-parsing of stdout.
  • stdio JSON-RPC 2.0 transport; reachable as spar-mcp standalone binary or spar mcp serve.
  • 11 tests: 5 in-process Rust API path + 6 stdio JSON-RPC envelope path.

Test plan

  • cargo test -p spar-mcp — 11/11 pass
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • rivet validate — PASS
  • CI green
  • Spot-check via claude --mcp-config '{"mcpServers": {"spar": {"command": "spar-mcp", "args": []}}}' (post-merge smoke)

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

…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>
@avrabe avrabe force-pushed the feat/v0.9.0-spar-mcp-skeleton branch from 2c0986b to 66dc7ba Compare April 28, 2026 20:27
@avrabe avrabe merged commit fa983a9 into main Apr 28, 2026
16 of 17 checks passed
@avrabe avrabe deleted the feat/v0.9.0-spar-mcp-skeleton branch April 28, 2026 21:35
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.

1 participant