Codacy MCP server: 24 tools for code quality and security
Codacy keeps code-quality findings and security findings apart for an agent. The tool list has a measured cost before the first query.
Last verified 1 September 2026 · from Codacy's repository, its documentation and the server's own tools/list response
This page is one of 90 in a directory of monitoring and developer tools. Each page checks what an AI coding agent can get out of the tool through its MCP server, the connector that lets the agent query the tool directly.
Summary
Codacy publishes an official MCP server with 24 tools, all prefixed codacy_, covering code quality issues, test coverage, duplication and security findings.
Codacy keeps quality issues and security items apart. Each has its own tools, and each tool description says which questions it answers.
Two of the tools reach outside Codacy. codacy_cli_install and codacy_cli_analyze fetch and run the Codacy CLI locally, so the connector is not purely a read over a hosted API.
What is the Codacy MCP server?
It is Codacy's server for the Model Context Protocol. Codacy analyzes repositories for quality, coverage and security, so the agent can query those findings.
The surface splits three ways. Repository tools read issues, files, coverage and duplication. Pull-request tools read the diff, its issues and its coverage. SRM tools, for Software Risk Management, read security findings, which Codacy keeps separate from quality issues.
Two further tools run analysis on your machine rather than reading stored results, by installing and invoking the Codacy CLI.
Codacy covers code, tests and review broadly, reaches part of the way into release through pull-request gating, and reaches nothing in production observability, agent observability or cost.
| Part of the work | What Codacy has here | Can an agent reach it |
|---|---|---|
| Code, tests & review | Quality issues, coverage, duplication, security findings | Yes. Core strength, and the product's whole purpose |
| CI & release | Pull-request analysis | Partial. Diff coverage and pull-request issues are release gates in practice. There is no pipeline surface |
| Production observability | None | No telemetry. Codacy reads the code, not the running system |
| Agent observability & evals | None | No traces, evaluations or prompt versioning for your own agents |
| AI cost management | None | No token or model spend data |
In practice, Codacy answers what is wrong with the code and what the tests cover, and nothing about what the code does once it runs. An agent connected here can find the security findings on a branch and the files with no coverage. It cannot tell you whether any of it matters in production, so this connector pairs with a telemetry one.
What can an AI agent do with Codacy?
| Task | Tools | Works | Watch out for |
|---|---|---|---|
| Review a pull request for problems | codacy_list_pull_request_issues codacy_get_pull_request_git_diff | Yes | Quality issues only; security findings are a separate tool |
| Check what the pull request left uncovered | codacy_get_pull_request_files_coverage | Yes | Diff coverage needs coverage reports uploaded to Codacy |
| Find security vulnerabilities | codacy_search_repository_srm_items codacy_search_organization_srm_items | Yes | Codacy's own description calls this the primary tool for security, not the issues tool |
| Investigate one file | codacy_get_file_issues codacy_get_file_coverage codacy_get_file_clones | Yes | Coverage is for the head commit of the default branch |
| Understand why a rule fired | codacy_get_pattern codacy_list_repository_tool_patterns | Yes | Patterns are per tool, so the agent needs the tool as well as the pattern |
| Analyze code that is not pushed yet | codacy_cli_analyze codacy_cli_install | Yes | This downloads and runs a CLI on your machine. See the limits below |
| Add a repository to Codacy | codacy_setup_repository | Yes | A write, and the only one here that changes your Codacy account |
24 tools registered, all on by default, all prefixed `codacy_`
- Organizations and repositories3
codacy_list_organizationscodacy_list_organization_repositoriescodacy_get_repository_with_analysis- Quality issues3
codacy_list_repository_issuescodacy_get_issuecodacy_get_file_issues- Security findings2
codacy_search_repository_srm_itemscodacy_search_organization_srm_items- Pull requests5
codacy_list_repository_pull_requestscodacy_get_repository_pull_requestcodacy_list_pull_request_issuescodacy_get_pull_request_git_diffcodacy_get_pull_request_files_coverage- Files4
codacy_list_filescodacy_get_file_with_analysiscodacy_get_file_coveragecodacy_get_file_clones- Rules4
codacy_list_toolscodacy_get_patterncodacy_list_repository_toolscodacy_list_repository_tool_patterns- Local analysis2Write
codacy_cli_installcodacy_cli_analyze- Account1Write
codacy_setup_repository
The local-analysis group is marked as a write because it downloads and runs a binary on your machine, which is a different kind of action from reading stored results. Counted on 24 August 2026.
What connecting costs before the first question
A context window is the amount of text a model can hold at once, and connecting uses some of it before the agent asks anything. Every tool the server registers sends its name, description and input schema to the model when the session starts. The tool list is charged whether or not a single tool is called.
Codacy's descriptions average 591 characters, longer than most, because several carry a common mistakes section: guidance written for the agent about how the tool is usually misused. That is unusual, and it is charged at connection like everything else.
| Tool set | Tools | Tokens (GPT-5.6, GPT-5.5) | Tokens (GPT-4, GPT-3.5) | Tokens (Claude Haiku 4.5 to Opus 5) | Share of a 200,000-token window |
|---|---|---|---|---|---|
| Every tool, as registered | 24 | 12,072 to 14,630 | 11,960 to 14,583 | 14,901 to 20,299 | 6.0% to 10.1% |
Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted 24 August 2026 from tools/list on the published @codacy/codacy-mcp package. It was run locally with a placeholder token.
Registration is static, so no Codacy account was involved. Figures cover name, description and input schema.
The two models in column one share the o200k_base encoding, so they get one count. The spread is formatting, about 21%. Reasoning tokens are output, spent per request. The tool list is input, charged once at connection.
The Claude figures are measured rather than encoded. Anthropic publishes no local tokenizer. So the definitions were sent to the API's count_tokens endpoint, and a no-tools baseline was subtracted. The range covers two tokenizer generations rather than two serializations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is about a third.
Codacy MCP server limits: where answers come back incomplete
Codacy's first limit is not about data at all. Two of its tools download and run a binary on your machine.
The agent says: “I analyzed the code locally.” It downloaded and ran a binary to do it.
codacy_cli_install fetches the Codacy CLI onto your machine and codacy_cli_analyze runs it. That is how analysis works before code is pushed, and it means the connector executes software rather than only reading results.
CODACY_CLI_VERSION pins which version is fetched, which is the difference between a reproducible analysis and whatever is current.
Guard: Pin CODACY_CLI_VERSION, and leave the two CLI tools off your allowlist if you only want stored results read.
The agent says: “There are no security problems.” It searched the quality issues.
Codacy keeps quality issues and security items apart. codacy_list_repository_issues covers best practice, performance, complexity and style; security findings live behind the SRM tools, and Codacy's own tool descriptions say so explicitly.
An agent that reaches for the issues tool and reports nothing has answered a different question from the one asked.
Guard: Have the agent name which tool it used. For security, that should be one of the SRM search tools.
The agent says: “This file has no test coverage.” No coverage report was ever uploaded.
Coverage tools read reports your pipeline uploads to Codacy. A repository that never uploads produces the same empty answer as a file with no tests.
Guard: Confirm coverage upload is configured before treating an empty coverage result as evidence.
How to configure Codacy MCP for agents
- 1
Decide whether the agent may run the CLI
codacy_cli_installandcodacy_cli_analyzefetch and execute the Codacy CLI locally. That is how unpushed code gets analyzed, and it is also the only code execution here. - 2
Pin
CODACY_CLI_VERSIONWithout it the fetched version is whatever is current, so the same analysis can give different results on different days.
- 3
Tell the agent which tool answers security questions
Codacy separates quality issues from SRM security findings, and the wrong tool returns a confident, empty answer.
- 4
Budget the context
24 tools cost about 12,072 tokens, roughly 6% of a 200,000-token window.
Paste this into your agent’s instructions
Two of Codacy's failure modes are indistinguishable from good news: the wrong tool for security, and missing coverage uploads. Both return empty. The block makes the agent name what it queried.
When you answer using Codacy MCP tools, state: - Which tool you used. Quality issues and security findings are separate surfaces, and only the SRM tools answer security questions. - The repository and branch, and whether coverage reports exist for it. Missing uploads look like missing tests. - Whether you ran the local CLI, which executes on this machine rather than reading stored analysis. Never state that data does not exist. State that none was returned under the constraints above. Write your answer in ASD-STE100 Simplified Technical English. Use short sentences with one idea in each.
Do you need the MCP server at all?
Partly. Codacy has a documented REST API, and a coding agent can call it with the same account token.
The connector adds two things the API does not. First, the tool descriptions carry usage guidance, including which tool answers a security question rather than a quality one. That is the mistake an agent most often makes here. Second, the CLI tools analyze code that has not been pushed, which no hosted API can do.
For reading stored results on a schedule, the API is lighter than 12,072 tokens of definitions.
Connect the server for interactive review, especially on unpushed code. Use the API for scripted reporting.
Codacy MCP server setup
The package runs with npx and needs a Codacy account token in CODACY_ACCOUNT_TOKEN.
CODACY_CLI_VERSION pins the CLI that local analysis downloads. Leaving it unset means whatever is current at the time.
Claude Code
One token. The CLI is fetched only if a local-analysis tool is called.
claude mcp add-json "codacy" '{"command":"npx",
"args":["-y","@codacy/codacy-mcp"],
"env":{"CODACY_ACCOUNT_TOKEN":"<your-token>"}}'Cursor
In ~/.cursor/mcp.json. Pinning the CLI version keeps local analysis reproducible.
{"mcpServers":{"codacy":{"command":"npx",
"args":["-y","@codacy/codacy-mcp"],
"env":{"CODACY_ACCOUNT_TOKEN":"<your-token>",
"CODACY_CLI_VERSION":"<pinned-version>"}}}}Codex CLI
Codex reads TOML, so the JSON blocks above will not transfer.
[mcp_servers.codacy]
command = "npx"
args = ["-y", "@codacy/codacy-mcp"]
env = { CODACY_ACCOUNT_TOKEN = "<your-token>" }Every other client
Each block below is the configuration for one client, with the file path and the key that client expects.
Claude Desktop
macOS ~/Library/Application Support/Claude/claude_desktop_config.json. Windows %APPDATA%\Claude\claude_desktop_config.json. There is no CLI. Edit through Settings, Developer, Edit Config.
Quit and restart fully for changes to load. Paths in args must be absolute. Logs at ~/Library/Logs/Claude/mcp.log.
{"mcpServers":{"codacy":{"command":"npx",
"args":["-y","@codacy/codacy-mcp"],
"env":{"CODACY_ACCOUNT_TOKEN":"<your-token>","CODACY_CLI_VERSION":"<pinned-version>"}}}}Gemini CLI
~/.gemini/settings.json globally, or .gemini/settings.json per project. Key mcpServers. CLI: gemini mcp add.
{"mcpServers":{"codacy":{"command":"npx",
"args":["-y","@codacy/codacy-mcp"],
"env":{"CODACY_ACCOUNT_TOKEN":"<your-token>","CODACY_CLI_VERSION":"<pinned-version>"}}}}VS Code Copilot
.vscode/mcp.json per workspace, or your user profile. CLI: code --add-mcp.
{"servers":{"codacy":{"command":"npx",
"args":["-y","@codacy/codacy-mcp"],
"env":{"CODACY_ACCOUNT_TOKEN":"<your-token>","CODACY_CLI_VERSION":"<pinned-version>"}}}}The key is `servers`, not `mcpServers`. VS Code is the only client that uses that name, and copying a config from anywhere else fails silently.
Windsurf
~/.codeium/windsurf/mcp_config.json, which is the path Windsurf documents. Key mcpServers, the same JSON shape as Cursor, carrying the same account token.
Zed
~/.config/zed/settings.json, carrying the same account token as the blocks above.
The key is `context_servers`. Zed does not call them MCP servers in config, so searching its settings for mcp finds nothing.
Google Antigravity
~/.gemini/config/mcp_config.json globally, or .agents/mcp_config.json per project. Key mcpServers. There is no CLI. Use the /mcp overlay in the editor. Supports stdio, streamable HTTP, SSE and websocket.
{"mcpServers":{"codacy":{"command":"npx",
"args":["-y","@codacy/codacy-mcp"],
"env":{"CODACY_ACCOUNT_TOKEN":"<your-token>","CODACY_CLI_VERSION":"<pinned-version>"}}}}Amp (Sourcegraph)
~/.config/amp/settings.json or .amp/settings.json, carrying the same account token. The amp mcp CLI covers approve, doctor and oauth.
The key is `amp.mcpServers`, namespaced. A bare mcpServers block is ignored.
Cline
~/.cline/mcp.json per the docs. The source also reads ~/.cline/data/settings/cline_mcp_settings.json. Key mcpServers, standard JSON shape, carrying the same account token. Supports stdio, streamable HTTP and SSE.
Goose (Block)
~/.config/goose/config.yaml, carrying the same account token.
YAML, and servers are called `extensions`. Goose does not use the MCP vocabulary in config at all. Add one interactively with goose configure, or per session with goose session --with-extension.
Kiro (AWS)
.kiro/settings/mcp.json per workspace, or ~/.kiro/settings/mcp.json globally. Key mcpServers, standard JSON shape, carrying the same account token.
Warp
~/.warp/.mcp.json or .warp/.mcp.json. Key mcpServers, standard shape, carrying the same account token. Also addable through the /agent-add-mcp skill.
JetBrains Junie
.junie/mcp/mcp.json per project, or ~/.junie/mcp/mcp.json. Key mcpServers, carrying the same account token. Use /mcp in the CLI to manage.
Roo Code
.roo/mcp.json per project. The global file is mcp_settings.json, opened from the Roo Code MCP settings view with Edit Global MCP. Key mcpServers, carrying the same account token.
Continue
.continue/mcpServers/*.yaml, one file per server, carrying the same account token.
YAML, and `mcpServers` is a list, not an object. Every JSON client keys servers by name. Continue takes an array, so a converted config will not parse.
Trae
.trae/mcp.json per project, or paste into the UI under Raw Config (JSON). Key mcpServers, standard shape, carrying the same account token.
Devin
Devin has no config file to edit. Servers are added through a web form in the settings UI, and Devin's documentation states you do not need to write or paste JSON. The block below is the shape those fields describe, shown for reference. Either route uses the same account token.
Read-only access, permissions and security
Two tools execute code on your machine
codacy_cli_installdownloads the Codacy CLI andcodacy_cli_analyzeruns it. Every other tool reads a hosted API.Pin the CLI version
An unpinned fetch means the binary can change between runs, which is both a reproducibility and a supply-chain consideration.
The token carries your Codacy access
An account token reaches the organizations and repositories that user can see.
One tool changes your account
codacy_setup_repositoryadds or follows a repository in Codacy, which is the only hosted-side write here.
Troubleshooting
- No security issues found on a repository that has them
- The quality tool was probably used. Security findings live behind
codacy_search_repository_srm_itemsandcodacy_search_organization_srm_items, which Codacy's own descriptions name as the primary security tools. - Coverage is empty everywhere
- Coverage tools read reports uploaded to Codacy. A repository whose pipeline never uploads returns empty, which is not the same as untested code.
- The server hangs on first use
- A local-analysis tool triggers a CLI download on first call, which takes longer than an ordinary request. Subsequent calls reuse it.
- Local analysis gives different results than last week
- The CLI version is not pinned. Set
CODACY_CLI_VERSIONso the same analysis runs each time.
Codacy MCP server: Reference
| Item | Value |
|---|---|
| Status | Repository pushed 30 July 2026 · package 0.6.24 |
| Adoption | 62 stars |
| Package | @codacy/codacy-mcp on npm |
| Auth | CODACY_ACCOUNT_TOKEN; CODACY_CLI_VERSION pins the local CLI |
| Tools | 24, all on by default, of which 2 run a local CLI |
| Read-only | None. Keep the CLI and setup tools off the allowlist |
| Surfaces | Quality issues and SRM security findings kept separate |
What engineers report
codacy/codacy-mcp-server has 62 stars and was last pushed on 30 July 2026, with the package at 0.6.24. Public discussion is limited to a handful of issues, two of which are quoted below.
| What was checked | What it shows |
|---|---|
| Stars | 62 |
| Last push | 30 July 2026 |
| Package | @codacy/codacy-mcp 0.6.24 on npm |
| Tools | 24, all on by default, all prefixed codacy_ |
| Average description length | 591 characters per tool |
“When a tool is configured to use the repository configuration file, ... the MCP's
codacy_cli_analyzestill regenerates the Codacy pattern-catalog config and analyzes against it, ignoring the repo's config file. This produces false positives.”
“I see there're
.cursor/rules/codacy.mdcfile and.codacy/folder. But the agent report error.zsh: command not found: codacy_cli_analyze”
Repository facts from the GitHub API and package facts from npm, both retrieved 24 August 2026. Tool counts and description lengths come from the server's own tools/list response.
Should you connect an agent to Codacy?
Yes. Best for codacy teams pinning the CLI version, or leaving the CLI tools off the allowlist entirely.
- Strongest fit
- Teams on Codacy who want an agent reading quality, coverage and security findings while reviewing a pull request.
- Main advantage
- A clear split between quality and security, with tool descriptions that steer an agent to the right one.
- Main weakness
- No telemetry, so findings arrive without any evidence of whether they matter in production.
- Operational risk
- Two tools download and run a CLI on your machine, which is a different kind of trust from a read-only API.
From Oodle
One platform for agent traces and infrastructure
Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface, from $10 per million spans.
See agent observabilityFrequently asked questions
How many tools does the Codacy MCP server have?
24, all enabled on connection and all prefixed codacy_. Counted from the server's own tools/list response on npm 0.6.24, 24 August 2026.
Why did it find no security issues?
That happens when it used the quality tool. Codacy separates the two: security findings live behind the SRM search tools, and the tool descriptions say so.
Does it run anything on my machine?
Yes. codacy_cli_install downloads the Codacy CLI and codacy_cli_analyze runs it. Pin CODACY_CLI_VERSION, or keep both off your allowlist.
Can it review code I have not pushed?
Yes, through the CLI tools. The hosted tools read stored analysis, which only exists for code Codacy has seen.
Does it monitor production?
No. Codacy analyzes code. Pair it with an observability connector for what the code does once it runs.