A Codecov MCP that turns coverage into something a workflow can act on
Connect one personal access token and coverage totals, line-by-line reports, patch coverage on a pull request, flag and component comparisons, coverage trends, and ingested test runs become workflow steps. An AI agent can explain why coverage fell on a commit, a merge automation can branch on the patch number, and a scheduled job can write the trend into a database next to the rest of your work.
What the Codecov MCP connector does
The Codecov connector for Mattering Automations is 33 nodes on the Codecov API v2: coverage totals and line-by-line reports, the directory tree rollup and single-file coverage, repositories, branches, commits and the individual uploads behind each one, pull requests with patch coverage, flags and components, coverage trends over a date range, six comparison nodes covering commits, components, flags, a single file, impacted files and file segments, ingested test runs, AI evaluation summaries, and organization members. One personal access token, sent as a bearer token to api.codecov.io, authenticates all of it.
Every node speaks MCP, the open protocol for connecting AI assistants to tools, so Claude, ChatGPT, and any MCP-capable assistant can use them, alongside Matter, the AI assistant built into the platform. An agent asked why coverage dropped can read the commit, list the uploads behind it to see whether a shard is missing, compare flags to find which suite fell, and narrow to the file segments a change touched, without a person opening the Codecov dashboard or a terminal.
Coverage normally lives in two places: a dashboard somebody visits and a comment on a pull request somebody skims. These nodes make it a value the rest of the workflow can use. Patch coverage becomes a condition a merge automation branches on, the weekly trend becomes rows in a Mattering database, a failed-test sweep becomes a task with the failure message already attached, and every one of those runs next to your other connectors with the credential stored once.
The safety modeling is plain, and it is the shape of the API rather than a gap in the build: 32 of the 33 nodes read, exactly one writes, and nothing deletes. The single write is Codecov: Set Member Activation, which flips one boolean and is reversible by the opposite call. Two nodes deserve care for a different reason. Codecov: Get Repository Upload Tokens returns credential material, the repository's upload and graph tokens, and anyone holding an upload token can post coverage reports for that repository, so the node description says to treat its output like the secret it is. And the credential itself is personal: Codecov documents this as a personal account token rather than a per repository or per organization credential, so treat it as carrying its creator's access, which makes a token stored in an automation as powerful as the person who made it.
One connection, three surfaces
- Visual automations. Drag Codecov nodes onto the canvas and wire them to triggers, conditions, and other apps.
- AI agents, yours or ours. These nodes speak MCP, the open protocol, so Claude, ChatGPT, and any MCP-capable assistant can use them, and Matter, the agent built into the platform, uses them natively.
- The whole platform. Combine with native tasks, projects, and other connectors, no middleware in between.
Every Codecov node, ready to drop on the canvas
33 nodes, generated from the connector itself so this list always matches what ships. Expand a category to browse.
Read and query nodes 32
Codecov: Compare Commits
Compare coverage between two commits, or across a pull request. Supply the base and head SHAs together, OR a pull request number, but not both. Returns base, head and patch totals, the per-file comparison, the git commits in the range, and any files present in the diff that coverage does not track.
Codecov: Compare Components
Compare coverage per COMPONENT between two commits or across a pull request, so a change can be attributed to the part of the codebase it touched. Supply base and head SHAs together, OR a pull request number. The response is a BARE ARRAY, so output paths start at data[].
Codecov: Compare Evaluations
Compare AI evaluation runs between two commits, returning the base summary, the head summary and the difference between them, so a change in pass rate, cost or score is attributable to a specific commit. Codecov publishes no response schema for this endpoint, so the sample below was captured from a live call.
Codecov: Compare File Coverage
Compare ONE file between two commits or across a pull request, returning every line of the file with its base and head coverage and whether the line is part of the diff. The name field is an object with base and head entries, because a file can be renamed between the two commits. Supply base and head SHAs together, OR a pull request number.
Codecov: Compare File Segments
The same file comparison narrowed to the SEGMENTS a change touched, instead of every line in the file. Use it when a large file would otherwise drown the useful part of the diff. An unaffected file returns an empty segment list. Supply base and head SHAs together, OR a pull request number.
Codecov: Compare Flags
Compare coverage per FLAG between two commits or across a pull request, which is how you tell that unit coverage held while integration coverage fell. Supply base and head SHAs together, OR a pull request number. The response is a BARE ARRAY, so output paths start at data[]. A flag with no base report comes back with null base totals rather than being omitted.
Codecov: Compare Impacted Files
The precomputed version of the commit comparison, listing only the files a change actually affected. It computes asynchronously: a state of pending means the files are still being worked out and the files list is empty, and processed means it is ready, so poll rather than reading it once. Supply base and head SHAs together, OR a pull request number.
Codecov: Get Branch
Fetch one branch by name. The response embeds the branch's current head commit, including that commit's coverage totals and its full report, so this is the cheapest way to answer 'what is coverage on this branch right now'.
Codecov: Get Commit
Fetch one commit by SHA, including its coverage totals and its full per-file report. The processing state tells you whether Codecov has finished with it: complete, pending, error or skipped.
Codecov: Get Coverage Report
The coverage totals node plus LINE BY LINE coverage for every file, where each entry pairs a line number with 0 for hit, 1 for miss and 2 for partial. A whole repository's line data is a large payload, so filter by path prefix, flag or component unless you genuinely need all of it.
Codecov: Get Coverage Report Tree
Coverage rolled up to the directory tree, matching the repository's folder structure, with lines, hits, partials and misses at each level. Returns only the top level by default; raise the depth or start from a sub-path to go deeper. The response is a BARE ARRAY, so output paths start at data[].
Codecov: Get Coverage Totals
Coverage totals for one commit, plus the same totals broken down file by file. Defaults to the head of the default branch; name a SHA or a branch to target another commit, and narrow with a path prefix, a flag or a component. This is the headline number node.
Codecov: Get Coverage Trend
Coverage over time for a repository, as a paginated series of buckets one day, one week or one month wide. Each bucket carries the minimum, maximum and average coverage inside it. One behaviour to plan for: when there is no measurement on the start date, Codecov prepends a single measurement from BEFORE the start date so the value can be carried forward, so the first row may fall outside the range you asked for.
Codecov: Get Evaluation Summary
Summarise the AI evaluation runs uploaded for a repository: how many items ran, how many passed and failed, the average duration and cost, and the scores by name. Narrow to one commit, or to one grouping such as a test class, a vitest describe block or a langfuse run name. Codecov publishes no response schema for this endpoint, so the sample below was captured from a live call.
Codecov: Get File Coverage
Coverage for ONE file: its totals, its line-by-line values and a link to the file on Codecov. Defaults to the head of the default branch; name a SHA or a branch for another commit. Missing coverage for the path comes back as a 404 rather than an empty report.
Codecov: Get Flag Coverage Trend
Coverage over time for ONE flag, as a paginated series of buckets one day, one week or one month wide, each carrying the minimum, maximum and average coverage inside it. Use it to watch a single suite, for example whether integration coverage is drifting while the overall number holds. As with the repository trend, a measurement from before the start date may be prepended so the value can be carried forward.
Codecov: Get Organization Member
Fetch one member of a Codecov organization by username or by numeric owner id, returning their display name, email, admin flag and activation state.
Codecov: Get Owner
Fetch one organization or user account by name, returning its service, username and display name. Useful as a cheap check that a name is spelled the way Codecov holds it before running a heavier repository or coverage read.
Codecov: Get Pull Request
Fetch one pull request by its number, with base and head coverage totals and the patch coverage of the change. Use it to gate a merge automation on whether the new lines are covered.
Codecov: Get Repository
Fetch one repository by name, returning its default branch, language, private and active flags, and the most recent coverage totals on the default branch. Totals come back null for a repository that has never received an upload.
Codecov: Get Repository Upload Tokens
Fetch a repository's upload token and graph token. The response is CREDENTIAL MATERIAL: the upload token lets any holder post coverage reports for that repository. Treat the output like a secret and do not pipe it into a message, a log or a stored record.
Codecov: List Branches
List a repository's branches with the time each was last updated, most recently updated first. Busy repositories carry thousands of branches, so page through rather than expecting one call to cover them.
Codecov: List Commit Uploads
List every coverage upload Codecov received for one commit, with each upload's flags, CI provider, build URL, processing state and its own totals. This is the node that answers 'is a shard missing' when a commit's coverage looks lower than expected.
Codecov: List Commits
List a repository's commits, newest first, each with its message, author, branch, CI pass flag, Codecov processing state and coverage totals. Filter to one branch to follow a single line of work.
Codecov: List Components
List a repository's components with each component's current coverage. Components are the path groupings defined in codecov.yml, so this is the per-area coverage breakdown. The response is a BARE ARRAY with no page envelope, so output paths start at data[].
Codecov: List Flags
List a repository's coverage flags with each flag's current coverage percentage. Flags are the labels attached to uploads in codecov.yml, typically one per test suite or per runtime.
Codecov: List Member Login Sessions
List login sessions for the members of a Codecov organization, with each member's name, whether they hold an active session, and when it expires. The caller must be an admin of the requested organization; anyone else gets a permission error rather than an empty list.
Codecov: List Organization Members
List the members of a Codecov organization, with each member's username, display name, email, admin flag and whether they are activated. Filter by activation state, by admin state, or by a search term over the name.
Codecov: List Owners
List every organization and user account on one git service that the stored token can reach. This is the starting point for every other node here: the username it returns is what the owner field elsewhere expects. It is also the connector's auth probe, because it is the cheapest call that genuinely requires a valid token.
Codecov: List Pull Requests
List a repository's pull requests as Codecov sees them, each with its title, author, state, CI pass flag, base and head coverage totals, and the patch coverage of the change itself. Patch coverage is the number a review actually cares about.
Codecov: List Repositories
List an owner's repositories with their default branch, primary language, private flag and most recent coverage totals. Filter to repositories that have received an upload, to an explicit list of names, or by a search term.
Codecov: List Test Results
List individual test runs Codecov has ingested for a repository, each with its name, class, suite, framework, outcome, duration, flags and failure message. Filter to failures on a branch to build a flake report, or filter by duration to find the slow tests. This replaces the retired test-results endpoint, which now only redirects here.
Action nodes 1
Codecov: Set Member Activation
Activate or deactivate one member of a Codecov organization. Activation is the only writable field on the whole v2 API. Deactivating removes that person's access to the organization's Codecov data and releases the seat they occupied; the opposite call restores both, which is why this is reversible rather than destructive.
Connecting Codecov takes one credential
Codecov API v2 authenticates with a personal access token, sent as an Authorization bearer header on every request to api.codecov.io. You generate it from your own Codecov account settings under Access, and Codecov documents it as a personal account token rather than a per repository or per organization credential, so treat it as carrying its creator's access. There are no scopes to choose and no documented OAuth app flow for API v2, so the token is the whole credential, which is why the person who creates it matters as much as where it is stored.
Sign in at codecov.io, open the avatar menu, then Settings, then Access, and generate a token. Copy it while it is on screen.
In Mattering Automations, open Connectors, click Add Connector, choose Codecov, and create a credential with the token.
Click Test Connection. Mattering calls the owner listing, which is deliberately account scoped: Codecov serves public repository data with no credential at all, so a repository read can return real rows when no token is sent and proves nothing about whether a credential was configured. Without a valid token the owner listing returns 401.
All 33 Codecov nodes appear in the canvas palette. Run Codecov: List Owners first, because the username it returns is what the owner field on every other node expects, then Codecov: List Repositories for the repository name.
Common uses for the Codecov MCP
Gate a merge on the patch number, not the headline number
Total coverage barely moves when a pull request adds fifty uncovered lines to a large codebase, which is why patch coverage is the number a review actually cares about. Codecov: Get Pull Request returns base and head totals plus the patch coverage of the change itself, and Codecov: Compare Commits gives the same picture addressed by base and head SHAs, along with the files present in the diff that coverage does not track. A workflow reads it when the pull request opens, and takes the branch you want: approve, comment, or open a task for a human.
Explain a coverage drop instead of announcing one
When a commit's coverage looks wrong, the useful question is whether the code got worse or the data got thinner. Codecov: List Commit Uploads answers the second half: it lists every upload Codecov received for that commit with its flags, CI provider, build URL and processing state, which is how a missing shard shows itself. Codecov: Compare Flags then shows that unit coverage held while integration coverage fell, and Codecov: Compare Components attributes the change to the part of the codebase it touched. An agent can run all three and write the explanation, not just the number.
An AI agent that reviews the lines a change actually touched
Codecov: Compare Impacted Files lists only the files a change affected, and the node says the honest thing about it: it computes asynchronously, returning a pending state with an empty file list until it is processed, so a workflow polls rather than reading it once. Codecov's reference does not describe that lifecycle, so the node documents it as behaviour observed through the connector rather than a vendor guarantee. From there Codecov: Compare File Coverage returns every line of one file with its base and head values, and Codecov: Compare File Segments narrows that to the segments the change touched, which is what keeps a large file from drowning the useful part of the diff. That is a small enough payload to hand an assistant along with the diff itself.
Coverage trends that land in a database, not a screenshot
Codecov: Get Coverage Trend returns coverage over time as buckets, and Codecov: Get Flag Coverage Trend does the same for one suite so you can watch integration coverage drift while the overall number holds. Bucket width is a required choice per request, one day, seven days or thirty days, so a daily job and a quarterly report can read the same endpoint at the resolution each needs. Thirty days is a fixed stride rather than a calendar month, so over a long range the buckets drift against month boundaries and a report built on calendar months has to regroup them. One behaviour to plan for is stated on both nodes, and it comes from observation against the live API rather than from vendor documentation. When there is no measurement on your start date, Codecov prepends a single earlier measurement so the value can be carried forward, so the first row may fall outside the range you asked for.
Flaky and slow test reports from the runs themselves
Codecov: List Test Results reads the individual test runs Codecov has ingested, each with its name, class, suite, framework, outcome, duration, flags and failure message. Filter to failures on the main branch and a scheduled sweep builds a flake report with the failure text already in hand; filter by duration bounds and the same node finds the tests that are quietly making CI slower. The output can open a task, write rows to a database, or feed an agent that groups failures by suite before anyone reads them.
Membership hygiene with a reversible write
Codecov: List Organization Members reports who is in the organization with their admin flag and activation state, Codecov: List Member Login Sessions shows who holds an active session and when it expires, and Codecov: Set Member Activation is the one node here that changes anything. It is reversible by design: deactivating releases the seat that person occupied and removes their access to the organization's coverage metrics, and the opposite call restores both. Pair it with an offboarding workflow, and note that the login session listing requires the caller to be an admin of the organization it is asked about.
Example: A pull request opens: read the patch number, and only escalate when it matters
Built on the Automations canvas in a few minutes, or described in plain language to Matter and built for you.
Trigger: an inbound webhook from your git provider fires when a pull request is opened or updated, carrying the repository name and the pull request number.
Codecov: Get Pull Request reads that pull request as Codecov sees it, with base and head totals and the patch coverage of the change itself.
A condition checks the patch number against your bar. Above it, the workflow stops here and the pull request is left alone.
Below the bar, Codecov: Compare Impacted Files lists the files the change affected, polled until its state reports processed rather than pending.
Codecov: Compare File Segments pulls the segments the change touched on the worst file, which is a small enough payload to put in front of a person or an assistant.
The workflow opens a task in Mattering Productivity with the patch number, the impacted files and the uncovered segments attached, so the review starts from the evidence instead of a link to a dashboard.
Codecov MCP questions, answered
What Codecov operations are supported?
33 nodes on the Codecov API v2: 32 query nodes and 1 action node. Coverage reads cover totals, the full line-by-line report, the directory tree rollup and single-file coverage. Repository context covers owners, repositories, branches, commits, the uploads behind each commit, pull requests, flags and components. Six comparison nodes cover commits, components, flags, a single file, impacted files and file segments. Two trend nodes cover coverage over time for a repository and for one flag. There is also test run analytics, AI evaluation summary and comparison, organization members and their login sessions, repository upload tokens, and the single write, member activation. Deliberately not included: the retired test-results endpoints, which Codecov now redirects to test analytics, and anything the v2 API does not expose.
Does this work with Claude, ChatGPT, or other AI assistants?
Yes. Mattering exposes these nodes over MCP, an open protocol for connecting AI assistants to tools, so any MCP-capable assistant, including Claude and ChatGPT, can connect to your workspace and use them. Matter, the assistant built into the platform, uses the same nodes natively.
What can this actually change in Codecov?
One thing: whether an organization member is activated. Activation is the only writable field on the whole v2 API, so Codecov: Set Member Activation is the connector's single action node and it is reversible by the opposite call. There is nothing here that deletes, nothing that edits codecov.yml, and nothing that uploads a coverage report, because the v2 API does not expose those operations. Coverage still arrives the way it always did, from your CI. Everything else in this connector reads.
Why does the connection test call the owner list instead of a repository?
Because a repository read would pass with no credential at all. Codecov serves public repository data unauthenticated: a request for a public organization's repositories returns real rows with no Authorization header, which is genuinely useful but makes it a worthless proof of your token. The owner listing is the cheapest call that actually requires one, returning 401 with no header and 401 with an invalid token. The practical version of this for troubleshooting: a Codecov call that succeeds against a public repository does not tell you the stored token works.
What are Codecov's API rate limits?
Codecov does not publish rate limit numbers for API v2 in its OpenAPI document or its reference pages, so this page will not invent one. The nodes report an error on their output rather than retrying silently, so a workflow that does get refused can wait and continue rather than failing the run. The one piece of rate-adjacent guidance Codecov does give is operational rather than numeric: if the data coming back looks stale, signing in to Codecov re-triggers a sync with your code provider.
How powerful is the token this stores?
More powerful than it looks, which is worth deciding about deliberately. Codecov documents this as a personal account token rather than a per repository or per organization credential, so treat it as carrying its creator's access rather than assuming it is narrower. A token stored in an automation is therefore as powerful as the person who made it, and the right answer for most teams is a dedicated service account with only the access the workflows need. Mattering stores the credential encrypted in Google Secret Manager, and it never appears in workflow logs, but scope is a decision you make on the Codecov side, not one the connector can make for you.
Do flags, components and test analytics work on a free Codecov account?
API access itself is listed on every Codecov plan, including the free tier, so the connector authenticates the same way on any account. What differs is the data behind some of the nodes: flags, components and carryforward flags are paid-plan features on Codecov's pricing page, with flaky test detection higher still. The failure mode is quiet rather than loud, because on a free account those endpoints tend to return an empty result rather than an error, so a component listing that comes back empty reads like a broken node when it is really a plan boundary. Private repositories are a second boundary: they consume a seat licence, and the free tier is limited to one such user and a capped number of private uploads per month. Check your plan before concluding a node is broken.
Can it read coverage for a repository that has never been uploaded to?
It can read the repository, but the coverage will be empty rather than zero. Codecov: Get Repository returns a repository that has never received an upload with null totals, and the file report node returns a 404 for a path with no coverage rather than an empty report. That distinction is useful in a workflow: null totals mean the pipeline never sent anything, which is a CI problem, while a real number that fell is a code problem. Codecov: List Repositories can filter to only the repositories that have received an upload when you want to skip the first case entirely.
How do coverage trends handle date ranges and bucket width?
Bucket width is a required parameter on both trend nodes, chosen per request as one day, seven days or thirty days, so the same node serves a daily dashboard and a quarterly report. Thirty days is a fixed stride rather than a calendar month, so buckets drift against month boundaries over a long range and a calendar-month report has to regroup them locally. The date range is a real start and end pair, which means a scheduled refresh advances its window instead of re-fetching fixed dates forever, and every row carries its own bucket timestamp so a long backfill is one request split locally rather than one request per bucket. The caveat both nodes state comes from observation against the live API rather than from vendor documentation. If there is no measurement on the start date, Codecov prepends one measurement from before it so the value can be carried forward, so a consumer partitioning by timestamp should expect that first row to sit outside the requested window.
Put Codecov to work inside your workspace
Connect once, then use every node in visual automations and AI agent workflows across the Mattering platform.
All product names, logos, and brands are property of their respective owners and are used for identification purposes only. Use of these names, logos, and brands does not imply endorsement or affiliation. Codecov is a product of its respective owner; Mattering is an independent platform.