# codecov

This MCP server lets an agent query Codecov coverage for files, commits, repositories, and pull requests. It also works with self-hosted Codecov.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: egulatee
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/egulatee/mcp-server-codecov
- Updated: 2026-02-20
- HTML: https://affpapa.org/en/nevibecode/mcp/codecov

## What it does

codecov exposes tools for reading coverage data through an MCP connection. An agent can inspect line-level results for a file, retrieve coverage for a commit or repository, review a pull request’s coverage impact, and compare two branches, tags, or commits. That gives code review a direct way to check coverage changes.

The server runs with `npx` and reads `CODECOV_TOKEN` plus `CODECOV_BASE_URL`. Use the URL variable when the Codecov instance is self-hosted. The token must be a Codecov API token rather than an upload token; an upload token is for sending reports and will not provide the required read access.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CODECOV_TOKEN`, `CODECOV_BASE_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CODECOV_TOKEN=<CODECOV_TOKEN> --env CODECOV_BASE_URL=<CODECOV_BASE_URL> --transport stdio codecov -- npx -y mcp-server-codecov
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add codecov --env CODECOV_TOKEN=<CODECOV_TOKEN> --env CODECOV_BASE_URL=<CODECOV_BASE_URL> -- npx -y mcp-server-codecov
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "codecov": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-server-codecov"
            ],
            "env": {
                "CODECOV_TOKEN": "<CODECOV_TOKEN>",
                "CODECOV_BASE_URL": "<CODECOV_BASE_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "codecov": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-server-codecov"
            ],
            "env": {
                "CODECOV_TOKEN": "<CODECOV_TOKEN>",
                "CODECOV_BASE_URL": "<CODECOV_BASE_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CODECOV_TOKEN=<CODECOV_TOKEN> -e CODECOV_BASE_URL=<CODECOV_BASE_URL> codecov npx -y mcp-server-codecov
```
Replace <…> with your own values

## When to use it
- inspect coverage for a repository file
- check coverage for a specific commit
- review coverage changes in a pull request
- compare coverage across two Git references
- spot files that lack coverage before merging

## Example prompts
- Show line-level coverage for `src/index.ts` in `owner/repo` on the `main` branch.
- Check the coverage impact of pull request `123` in `owner/repo`.
- Compare coverage between `main` and `feature-branch` in `owner/repo`.

## Similar
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13181
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 10025
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11962
- [mockserver](https://affpapa.org/en/nevibecode/mcp/mockserver.md) — MCP server · ★ 4999

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
