Code coverage reporting
## Codecov MCP Server: Comprehensive Test Coverage Intelligence The **Codecov MCP Server** integrates industry-leading test coverage analysis into Google Antigravity, providing actionable insights to improve code quality and ensure critical paths are properly tested. ### Why Codecov MCP? - **Coverage Visualization**: See exactly which lines, branches, and functions are covered by tests with intuitive visual reports - **Pull Request Insights**: Get instant coverage feedback on every PR with automatic comments showing coverage changes - **Trend Analysis**: Track coverage trends over time to ensure your test suite grows with your codebase - **Flags and Components**: Organize coverage by feature flags, services, or components for granular analysis - **CI/CD Integration**: Enforce coverage thresholds as quality gates in your deployment pipeline ### Key Features #### 1. Coverage Analysis ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Show current test coverage for the main branch and identify files with less than 70% coverage" }] ) ``` #### 2. PR Coverage Review ```python # Analyze PR coverage impact response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Review coverage changes in PR #456 and highlight any new code without test coverage" }] ) ``` #### 3. Coverage Flags ```python # Manage coverage components response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Show coverage breakdown by flag: unit-tests, integration-tests, and e2e-tests" }] ) ``` #### 4. Historical Trends ```python # Track coverage over time response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Generate coverage trend report for the past 6 months showing weekly averages" }] ) ``` ### Configuration ```json { "mcpServers": { "codecov": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-codecov"], "env": { "CODECOV_TOKEN": "your-codecov-token", "CODECOV_OWNER": "your-org", "CODECOV_REPO": "your-repo" } } } } ``` ### Use Cases **Quality Gates**: Enforce minimum coverage thresholds on pull requests to prevent untested code from reaching production. **Coverage Planning**: Identify critical code paths lacking tests and prioritize test writing efforts effectively. **Team Metrics**: Track coverage contributions by team members and celebrate improvements in test quality. **Risk Assessment**: Identify high-risk areas with low coverage that could benefit from additional testing investment. The Codecov MCP Server ensures your test suite provides meaningful protection, helping teams ship with confidence knowing critical code paths are thoroughly tested.
{
"mcpServers": {
"codecov": {
"mcpServers": {
"codecov": {
"env": {
"CODECOV_TOKEN": "your-token"
},
"args": [
"-y",
"codecov-mcp-server"
],
"command": "npx"
}
}
}
}
}