Repository navigation
feat: add local stdio MCP server subcommand (codeint mcp) - #164
Merged
Merged
Conversation
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
Add the built-in local stdio Model Context Protocol (MCP) server subcommand (
codeint mcp) so coding agents (Claude Code, Cursor, Codex, Antigravity) can callcheck,diff, andtrenddirectly as structured read-only tools with zero new external dependencies.Closes #161
Tier
Tier 2 from the tier check: adds
crates/cli/src/mcp.rs,crates/cli/tests/mcp.rs,Command::Mcp, and MCP documentation.Task
Spec #161:
codeint mcpsubcommand incrates/configandcrates/cli.initialize,notifications/initialized,ping,tools/list,tools/call) exposing read-onlycheck,diff, andtrendtools using existingserde_jsondependency.crates/cli/tests/mcp.rs.codeint mcpindocs/reference.md,docs/guide/mcp.md,docs/guide/README.md, andllms.txt.Fail-first test
crates/cli/tests/mcp.rs::mcp_initialize_list_and_call_toolsandcrates/cli/tests/referencecodeint mcpdid not exist andtests/referencefailed until### codeint mcpand the top-level command row were documented.tests/mcp.rspassed (1 passed; 0 failed) andtests/referencepassed (5 passed; 0 failed).Checks
cargo clippy --workspace --all-targets -- -D warningscargo test --package codeint-cli --test mcpcargo test --package codeint-cli --test referencecargo run --package xtask -- merged-resultcargo run --package codeint-cli -- diff origin/mainSafety proof
codeint mcpruns strictly over stdin/stdout with no open network port, exposes only read-only measurement tools (check,diff,trend), compiles with#![forbid(unsafe_code)], and adds zero new external crates.crates/cli/tests/mcp.rs::mcp_initialize_list_and_call_toolsdrives the realcodeint mcpbinary over stdin/stdout pipes and verifiesinitialize,tools/list,check,diff,trend, and-32601unknown-method error responses.interrogate: none required below Tier 3.Runtime evidence
4aa9f46codeint mcpover stdio pipes against a real Git repository incrates/cli/tests/mcp.rsandcodeint mcpEOF exit 0 incrates/cli/tests/reference.Gaps