
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
mcp-server-codecov
Advanced tools
MCP server for querying Codecov coverage data with configurable URL support
A Model Context Protocol (MCP) server that provides tools for querying Codecov coverage data. Supports both codecov.io and self-hosted Codecov instances with configurable URL endpoints.
📦 Published on npm: mcp-server-codecov
Important: Codecov has two different types of tokens:
This MCP server requires an API token, not an upload token. To create an API token:
https://codecov.io or your self-hosted URL)The easiest way to use this MCP server is to install it globally via npm:
npm install -g mcp-server-codecov
After installation, the mcp-server-codecov command will be available globally and you can use it directly in your MCP configuration.
Benefits of npm installation:
npm update -g mcp-server-codecovOnly use this method if you're contributing to the project or need to modify the source code:
git clone https://github.com/egulatee/mcp-server-codecov.git
cd mcp-server-codecov
npm install
npm run build
Note: For regular usage, prefer the npm installation method above.
The server is configured through environment variables:
CODECOV_BASE_URL (optional): Base URL for the Codecov instance. Defaults to https://codecov.ioCODECOV_TOKEN (optional): Authentication token for accessing private repositoriesAdd to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Using npm package (recommended):
{
"mcpServers": {
"codecov": {
"command": "npx",
"args": ["-y", "mcp-server-codecov"],
"env": {
"CODECOV_BASE_URL": "https://codecov.io",
"CODECOV_TOKEN": "your-codecov-token-here"
}
}
}
}
{
"mcpServers": {
"codecov": {
"command": "node",
"args": ["/path/to/mcp-server-codecov/dist/index.js"],
"env": {
"CODECOV_BASE_URL": "https://codecov.io",
"CODECOV_TOKEN": "your-codecov-token-here"
}
}
}
}
Use the Claude Code CLI to add the MCP server with the npm package:
claude mcp add --transport stdio codecov \
--env CODECOV_BASE_URL=https://codecov.io \
--env CODECOV_TOKEN=${CODECOV_TOKEN} \
-- npx -y mcp-server-codecov
This automatically configures the server in your ~/.claude.json file.
cd /path/to/codecov-mcp
npm install && npm run build
claude mcp add --transport stdio codecov \
--env CODECOV_BASE_URL=https://codecov.io \
--env CODECOV_TOKEN=${CODECOV_TOKEN} \
-- node /absolute/path/to/codecov-mcp/dist/index.js
Add to your Claude Code MCP settings file at ~/.claude.json:
Using npm package (recommended):
{
"mcpServers": {
"codecov": {
"command": "npx",
"args": ["-y", "mcp-server-codecov"],
"env": {
"CODECOV_BASE_URL": "https://codecov.io",
"CODECOV_TOKEN": "${CODECOV_TOKEN}"
}
}
}
}
{
"mcpServers": {
"codecov": {
"command": "node",
"args": ["/absolute/path/to/codecov-mcp/dist/index.js"],
"env": {
"CODECOV_BASE_URL": "https://codecov.io",
"CODECOV_TOKEN": "${CODECOV_TOKEN}"
}
}
}
}
Notes:
${VAR} syntax${CODECOV_TOKEN} will be read from your shell environment (e.g., from ~/.zshrc or ~/.bashrc)-y flag for npx automatically accepts the package installation promptFor self-hosted Codecov instances, simply set the CODECOV_BASE_URL environment variable to your instance URL.
Claude Desktop:
{
"mcpServers": {
"codecov": {
"command": "npx",
"args": ["-y", "mcp-server-codecov"],
"env": {
"CODECOV_BASE_URL": "https://codecov.your-company.com",
"CODECOV_TOKEN": "your-codecov-token-here"
}
}
}
}
Claude Code CLI:
claude mcp add --transport stdio codecov \
--env CODECOV_BASE_URL=https://codecov.your-company.com \
--env CODECOV_TOKEN=${CODECOV_TOKEN} \
-- npx -y mcp-server-codecov
Claude Code Manual (~/.claude.json):
{
"mcpServers": {
"codecov": {
"command": "npx",
"args": ["-y", "mcp-server-codecov"],
"env": {
"CODECOV_BASE_URL": "https://codecov.your-company.com",
"CODECOV_TOKEN": "${CODECOV_TOKEN}"
}
}
}
}
After installing via npm, verify the package is correctly installed:
# Check installed version
npm list -g mcp-server-codecov
# Verify command is accessible
which mcp-server-codecov
# Test the package info
npm view mcp-server-codecov version
After configuring the MCP server, verify it's working correctly:
# List all configured MCP servers
claude mcp list
# Check the codecov server status
claude mcp get codecov
Expected output for npm installation:
codecov: mcp-server-codecov - ✓ Connected
Troubleshooting connection issues:
echo $CODECOV_TOKENclaude mcp get codecov1. 401 Unauthorized Error
If you get a 401 Unauthorized error when using the tools:
CODECOV_TOKEN is set in the MCP server's env sectionCODECOV_BASE_URL2. Environment Variable Not Expanding
If ${CODECOV_TOKEN} isn't being replaced:
~/.zshrc or ~/.bashrc)echo $CODECOV_TOKEN3. HTTP vs HTTPS
Always use https:// for the CODECOV_BASE_URL, not http://:
https://your-codecov-instance.comhttp://your-codecov-instance.com4. Connection Failed
If the server shows as not connected:
dist/index.js is correct and absolutenpm run buildGet line-by-line coverage data for a specific file.
Parameters:
owner (required): Repository owner (username or organization)repo (required): Repository namefile_path (required): Path to the file within the repository (e.g., 'src/index.ts')ref (optional): Git reference (branch, tag, or commit SHA)Example:
Get coverage for src/index.ts in owner/repo on main branch
Get coverage data for a specific commit.
Parameters:
owner (required): Repository ownerrepo (required): Repository namecommit_sha (required): Commit SHAExample:
Get coverage for commit abc123 in owner/repo
Get overall coverage statistics for a repository.
Parameters:
owner (required): Repository ownerrepo (required): Repository namebranch (optional): Branch name (defaults to repository's default branch)Example:
Get overall coverage for owner/repo on main branch
This project maintains 97%+ code coverage with comprehensive unit tests using Vitest.
# Run tests once
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage report
npm run test:coverage
# Launch Vitest UI for debugging
npm run test:ui
All code changes must maintain a minimum of 90% coverage across all metrics:
Coverage reports are automatically generated in the coverage/ directory after running npm run test:coverage. Open coverage/index.html in your browser to view detailed coverage information.
Tests run automatically on:
main and develop branchesmain or developCoverage reports are uploaded to Codecov, and PR comments show coverage changes for each pull request.
Tests are located in src/__tests__/ and use Vitest with the following patterns:
Example test structure:
import { describe, it, expect } from 'vitest';
import { getConfig, CodecovClient } from '../index.js';
describe('getConfig', () => {
it('returns default configuration when no env vars set', () => {
const config = getConfig();
expect(config.baseUrl).toBe('https://codecov.io');
});
});
When contributing:
npm testnpm run test:coverage# Install dependencies
npm install
# Build the project
npm run build
# Watch mode for development
npm run watch
This project uses an automated release workflow via GitHub Actions. Releases are published to npm automatically when you push a version tag.
Before creating releases, ensure the repository has the NPM_TOKEN secret configured:
Generate an npm access token:
Add the token to GitHub repository secrets:
NPM_TOKENTo create a new release:
Update version and changelog:
# Bump version in package.json (major.minor.patch)
npm version patch # or 'minor' or 'major'
# Update CHANGELOG.md with release notes
# Add entry following Keep a Changelog format
Commit and push changes:
git add package.json CHANGELOG.md
git commit -m "chore: prepare release v1.0.2"
git push origin main
Create and push version tag:
# Create annotated tag
git tag -a v1.0.2 -m "Release v1.0.2"
# Push tag to trigger release workflow
git push origin v1.0.2
Automated workflow runs:
The GitHub Actions workflow (.github/workflows/release.yml) automatically:
Verify release:
If the automated workflow fails or for emergency releases:
# Authenticate with npm
npm adduser
# Publish manually
npm publish --access public
# Create GitHub release manually
gh release create v1.0.2 --title "v1.0.2" --notes-file CHANGELOG.md
This project follows Semantic Versioning:
This server uses Codecov's API v2. The API endpoints follow this pattern:
/api/v2/gh/{owner}/repos/{repo}/file_report/{file_path}/api/v2/gh/{owner}/repos/{repo}/commits/{commit_sha}/api/v2/gh/{owner}/repos/{repo}Currently supports GitHub repositories (gh). Support for other providers (GitLab, Bitbucket) can be added by modifying the API paths.
MIT
FAQs
MCP server for querying Codecov coverage data with configurable URL support
The npm package mcp-server-codecov receives a total of 30 weekly downloads. As such, mcp-server-codecov popularity was classified as not popular.
We found that mcp-server-codecov demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.