Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Model Context Protocol (MCP) server to enable AI coding agents to interact with CoverageChecker for querying code coverage data. The implementation includes a new CoverageChecker.Mcp project that exposes three MCP tools: get_coverage_summary, analyze_delta, and run_tests_and_analyze. The PR also enhances the ProcessExecutor to support per-call working directory specification, which is needed for the MCP server to execute commands in specific directories.
Changes:
- Added MCP server project with JSON-RPC protocol implementation for AI agent integration
- Enhanced ProcessExecutor to accept optional working directory parameter per execution call
- Updated ProcessExecutionException to use primary constructor syntax and changed visibility to internal
- Added comprehensive tests for new MCP server functionality and updated existing ProcessExecutor tests
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/CoverageChecker.Mcp/McpServer.cs | Core MCP server implementation with request handling and tool execution logic |
| src/CoverageChecker.Mcp/McpModels.cs | Immutable record types for MCP protocol messages |
| src/CoverageChecker.Mcp/Program.cs | Entry point that configures logging to stderr to avoid interfering with MCP stdio communication |
| src/CoverageChecker.Mcp/CoverageChecker.Mcp.csproj | Project configuration for packaging as a global .NET tool |
| src/CoverageChecker.Mcp/README.md | Comprehensive documentation for installing and using the MCP server with AI agents |
| src/CoverageChecker/Services/ProcessExecutor.cs | Enhanced Execute method to accept optional working directory parameter with fallback to constructor value |
| src/CoverageChecker/Exceptions.cs | Refactored ProcessExecutionException to use primary constructor syntax and internal visibility |
| src/CoverageChecker/CoverageChecker.csproj | Added InternalsVisibleTo for MCP project and tests |
| tests/CoverageChecker.Mcp.Tests/McpServerTests.cs | Unit tests covering MCP protocol handling, error cases, and tool execution |
| tests/CoverageChecker.Mcp.Tests/CoverageChecker.Mcp.Tests.csproj | Test project configuration with reference to MCP server project |
| tests/CoverageChecker.Tests.Unit/ServiceTests/ProcessExecutorTests.cs | Updated tests to handle new working directory parameter and added test for prioritization logic |
| tests/CoverageChecker.Tests.Unit/ServiceTests/GitServiceTests.cs | Updated mock setups to include new working directory parameter |
| README.md | Added MCP server to features list and projects section |
| CoverageChecker.sln | Added new MCP projects, solution folders, and additional platform configurations |
4d6e0c1 to
edadc3a
Compare
|
…server compatibility fixes
bddcdca to
08c91ad
Compare
fb95368 to
b051250
Compare
b051250 to
acfb402
Compare
acfb402 to
1b3f5ea
Compare
|





No description provided.