# Codecov MCP for AI Agents AI Agent Connect

> Codecov MCP lets you query test coverage and engineering metrics directly from your AI agent. Track coverage percentages, audit commit health, and browse repository reports without switching tabs. It connects your Codecov account to your workspace so you can monitor software quality in real time.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_BhxY5dMcJ3daTaX2y9iBmjnp8uvuBDxG25b4pKhj/ai-agent-connect
- **Tags:** test-coverage, code-quality, ci-cd-pipeline, software-testing, coverage-reports, automated-testing

## Description

This Codecov MCP connects your account to your AI agent so you can manage test coverage and engineering insights through natural conversation. You don't have to keep your browser open to check if a recent commit dropped your coverage below a certain threshold or to see how a specific branch is performing. Instead, you can ask your agent to pull data directly from your repositories. It makes sense to have this in your Vinkius catalog because it puts your quality metrics where your work actually happens. You can look up coverage for specific commit SHAs, see the full hierarchy of your reports, and get a clear view of your own profile or repository metadata. It's about getting answers immediately while you're coding or planning a release. You can verify build health, monitor branch distribution, and audit code quality without ever leaving your workspace. It turns your test coverage data into an interactive part of your development process.

## Tools

### get_commit_coverage_totals
Get the total coverage numbers for a specific commit SHA. This helps you verify if a build meets your quality gates.

### list_repository_branches
See all the branches currently tracked in Codecov. Use this to check coverage across different development lines.

### list_repository_commits
Get a list of recent commits and their coverage status. It's a fast way to see how recent changes affected your numbers.

### list_coverage_flags
See all the coverage flags defined for a repository. This helps you understand how your team categorizes different test types.

### list_codecov_repositories
List every repository tied to your owner account. Use this to get a bird's eye view of your entire portfolio.

### get_my_codecov_profile
Pull your own user profile and account details. Use this to check your permissions or personal settings.

### get_repository_coverage_details
Get a deep dive into the coverage of a specific repository. It shows you the overall health of your project.

### get_coverage_report_tree
See a hierarchical view of your coverage reports. This lets you see exactly which folders or files are missing tests.

## Prompt Examples

**Prompt:** 
```
Show me the coverage for the 'auth-service' repo.
```

**Response:** 
```
### Repository Coverage: auth-service

*   **Overall Coverage:** 88.4%
*   **Status:** ✅ Meets threshold
*   **Total Hits:** 4,200
*   **Total Misses:** 150

Would you like to see the report tree for this repository?
```

**Prompt:** 
```
What's the coverage on the latest commit?
```

**Response:** 
```
Checking the latest commit... 

**Commit SHA:** `a1b2c3d4` 
**Coverage Total:** 92.1% 
**Status:** Passed

This commit meets your required coverage target of 90%.
```

**Prompt:** 
```
List all the branches we have in Codecov.
```

**Response:** 
```
Here are the branches currently tracked in Codecov:

*   `main` (94.2%)
*   `develop` (89.1%)
*   `feature/login-page` (82.5%)
*   `hotfix/auth-patch` (98.0%)
```

## Capabilities

### Pull commit coverage totals
Get the aggregate coverage numbers for a specific commit SHA to check build health.

### View report hierarchies
See a structured view of coverage reports that matches your project's file structure.

### List repository branches
See all the branches currently being tracked in your Codecov account.

### Fetch repository details
Get a deep dive into the coverage status and metadata for any specific repository.

### Access user profiles
Retrieve your own user profile and core account metadata directly in the chat.

### Monitor commit history
List recent commits along with their specific coverage status.

### Check coverage flags
See all the coverage flags defined for a repository to understand your team's categories.

## Use Cases

### Verifying a specific commit
An engineer wants to know if a specific commit hit the target. They ask the agent to check the SHA using get_commit_coverage_totals.

### Identifying coverage gaps
A manager needs to see which folders are lagging. The agent uses get_coverage_report_tree to show the hierarchy.

### Checking branch distribution
A developer is unsure about branch coverage. They use list_repository_branches to see all active tracks.

### Auditing the full portfolio
A QA lead wants a list of all repos. They ask the agent to list_codecov_repositories to see the full list.

## Benefits

- Stop clicking through dashboards by using get_repository_coverage_details to see health stats instantly.
- Verify build stability on every push by pulling data with get_commit_coverage_totals.
- Identify specific gaps in your test suite using get_coverage_report_tree to see folder-level data.
- Keep track of multi-branch progress by listing branches with list_repository_branches.
- Audit your entire project portfolio at once using list_codecov_repositories to see all repo stats.
- Check recent work history quickly with list_repository_commits to see coverage trends.

## How It Works

The bottom line is you get instant access to your code quality metrics without leaving your IDE or chat window.

1. Subscribe to the Codecov MCP on Vinkius.
2. Add your Codecov Global API Token from your account settings.
3. Ask your AI client to check coverage, list repos, or audit a specific commit.

## Frequently Asked Questions

**Can the Codecov MCP show me specific file coverage?**
Yes, it pulls the report tree so you can see exactly which folders and files are covered within your project.

**How do I see coverage for a specific commit?**
You can ask the agent to check a specific SHA to see the exact hits and misses for that build.

**Can I use this to see all my repositories?**
Yes, the Connector can list every repository tied to your account for a full overview of your portfolio.

**Does this work for multiple branches?**
It can list all branches and show you how coverage differs across them, making it easy to compare different workstreams.

**Can I see my own profile info?**
Yes, it can pull your user profile and account metadata directly into the chat for quick reference.

**Is this for CI/CD automation?**
It's a great way to get coverage data into your agent's context, which helps with monitoring and auditing during your development cycle.

**Can I see the coverage percentage for a specific commit?**
Yes! Use the `get_commit_coverage_totals` tool with the commit SHA. The agent will return the aggregate coverage percentage, hits, misses, and other metrics for that specific version of the code.

**How do I check the coverage distribution across my project's folders?**
Use the `get_coverage_report_tree` tool. Your agent will fetch a hierarchical view of the report, showing you exactly which directories have high coverage and which need more tests.

**Where do I find my Codecov API Token?**
Log in to your Codecov account, go to **Settings**, and select **Access**. You can generate and copy a new API token from the 'Tokens' section.