by codacy
Provides a server that exposes Codacy API capabilities for repository, file, quality, coverage, and security analysis, enabling IDEs and agents to query code metrics and issues.
Codacy MCP Server enables programmatic access to the Codacy platform, allowing tools and IDEs to retrieve information about repositories, files, code‑quality issues, coverage, duplication, security findings, pull‑request details, and more. It acts as a bridge between the Codacy backend and client applications, delivering analysis data in real time.
npx
(the most common approach):
{
"mcpServers": {
"codacy": {
"command": "npx",
"args": ["-y", "@codacy/codacy-mcp"],
"env": { "CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>" }
}
}
}
The JSON above can be placed in the IDE‑specific configuration file (e.g., .cursor/mcp.json
, .codeium/windsurf/mcp_config.json
, or VS Code settings.json
).chat.agent.enabled
).CODACY_ACCOUNT_TOKEN=your_token npm run inspect
This builds the project and launches the inspector UI.codacy_setup_repository
, codacy_get_repository_with_analysis
).codacy_cli_analyze
, supporting ad‑hoc runs with custom tool selection.CODACY_CLI_VERSION
.Scenario | How the MCP server helps |
---|---|
Continuous quality monitoring | CI pipelines can query the server for the latest issue list, coverage, and duplication metrics to enforce quality gates. |
IDE‑embedded assistance | Developers receive real‑time suggestions, issue highlights, and security warnings directly in VS Code, Cursor, or other supported IDEs. |
Security posture auditing | Security teams can pull organization‑wide SRM items to assess vulnerabilities across all repositories. |
Pull‑request review automation | Reviewers can view new/fixed issues, coverage diffs, and code similarity directly within the PR view. |
Custom tooling | Internal tools can call the server’s endpoints to build dashboards, reporting portals, or migration scripts. |
Q: Which token should I use? A: Use a personal Account API Token generated from the Codacy account page under Access Management.
Q: Do I need to install Codacy‑CLI manually?
A: No. The MCP server will attempt to install the CLI automatically. If you prefer a specific version, set CODACY_CLI_VERSION
in the environment.
Q: Which languages are supported? A: All languages supported by Codacy’s analysis tools are available through the server (e.g., Java, JavaScript, Python, Go, etc.).
Q: Can I run the server locally without an IDE?
A: Yes. Install the package globally (npm install -g @codacy/codacy-mcp
) and run it with the same npx
‑style configuration, then interact via HTTP or the provided inspector tool.
Q: What if I use NVM and the npx
command fails?
A: Install the package globally and reference the Node binary directly in the configuration (see the “Claude Desktop and NVM” section of the README).
Q: Is the server open‑source? A: Yes, it is released under the MIT License and the source code is hosted on GitHub.
MCP Server for the Codacy API, enabling access to repositories, files, quality, coverage, security and more.
The following tools are available through the Codacy MCP Server:
codacy_setup_repository
: Add or follow a repository in Codacy if not already present. This tool ensures the repository is registered with Codacy, allowing further analysis and management.codacy_list_organizations
: List organizations with pagination support.codacy_list_organization_repositories
: List repositories in an organization with pagination support.codacy_get_repository_with_analysis
: Get repository with analysis information, including metrics for Grade, Issues, Duplication, Complexity, and Coverage.codacy_list_repository_issues
: Lists and filters code quality issues in a repository. This is the primary tool for investigating general code quality concerns (e.g. best practices, performance, complexity, style) but NOT security issues. For security-related issues, use the SRM items tool instead. Features include:
Common use cases:
codacy_list_files
: List files in a repository with pagination support.codacy_get_file_issues
: Get the issue list for a file in a repository.codacy_get_file_coverage
: Get coverage information for a file in the head commit of a repository branch.codacy_get_file_clones
: Get the list of duplication clones (identical or very similar code segments) for a file in a repository.codacy_get_file_with_analysis
: Get detailed analysis information for a file, including metrics for Grade, Issues, Duplication, Complexity, and Coverage.codacy_search_organization_srm_items
: Primary tool to list security items/issues/vulnerabilities/findings across an organization. Results are related to the organization's security and risk management (SRM) dashboard on Codacy.codacy_search_repository_srm_items
: List security items/issues/vulnerabilities/findings for a specific repository.Both tools provide comprehensive security analysis including:
codacy_list_repository_pull_requests
: List pull requests from a repository that the user has access to.codacy_get_repository_pull_request
: Get detailed information about a specific pull request.codacy_list_pull_request_issues
: Returns a list of issues found in a pull request (new or fixed issues).codacy_get_pull_request_files_coverage
: Get diff coverage information for all files in a pull request.codacy_get_pull_request_git_diff
: Returns the human-readable Git diff of a pull request.codacy_list_tools
: List all code analysis tools available in Codacy.codacy_list_repository_tools
: Get analysis tools settings and available tools for a repository.codacy_get_pattern
: Get the definition of a specific pattern.codacy_list_repository_tool_patterns
: List the patterns of a tool available for a repository.codacy_get_issue
: Get detailed information about a specific issue.codacy_cli_analyze
: Run quality analysis locally using Codacy CLI. Features include:
Ensure your machine has the following tools installed:
npx
command runs without issues.For local analysis, the MCP Server requires the Codacy CLI to be installed. If it is not available, the MCP Server will attempt to install it for you. Codacy CLI v2 runs on macOS, Linux, and Windows (only with WSL).
Get your Codacy's Account API Token from your Codacy Account.
You'll need it later in the setup.
In supported IDEs like VS Code, Cursor, and Windsurf, the easiest way to install Codacy's MCP Server is to do it from the Codacy extension. If you haven't yet, install the extension from within your IDE, or from any of the available marketplaces (Microsoft, OpenVSX). From the extension panel, just click on Add Codacy MCP Server. Restart your IDE afterwards.
Without the extension, you can still use and install the MCP Server:
You can use the one-click install for Cursor:
Otherwise, depending on what you are connecting the MCP Server to, you can use the following methods:
.cursor/mcp.json
file to add the following.codeium/windsurf/mcp_config.json
file to add the followingclaude_desktop_config.json
file to add the following{
"mcpServers": {
"codacy": {
"command": "npx",
"args": ["-y", "@codacy/codacy-mcp"],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
You can use the one-click install for VS Code:
Otherwise, if you wish to set it up manually:
{
"mcp": {
"inputs": [],
"servers": {
"codacy": {
"command": "npx",
"args": ["-y", "@codacy/codacy-mcp"],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
}
You can open the user settings.json file in:
View > Command Palette > Preferences: Open User Settings (JSON)
Or open the general settings.json file directly, which according to your OS should be located in:
~/Library/Application Support/Code/User/settings.json
%APPDATA%\Code\User\settings.json
~/.config/Code/User/settings.json
Don't forget to update the value of CODACY_ACCOUNT_TOKEN
with your token.
Make sure you have Agent mode enabled: vscode://settings/chat.agent.enabled
Open the Copilot chat and switch the mode to Agent
. You can check that the MCP server was enabled correctly by clicking on the Select tools
icon, which should list all the available Codacy tools.
When using NVM with Claude Desktop, NPX may not work. You should first install the MCP Server globally, and then use Node directly:
npm install -g @codacy/codacy-mcp
{
"mcpServers": {
"codacy": {
"command": "/Users/yourusername/.nvm/versions/node/vXX.X.X/bin/node",
"args": ["/path-to/codacy-mcp/dist/index.js"],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
To work locally on the MCP Server code, run:
npm install
npm run update-api
npm run build
You can test the MCP server using the inspector tool. You can either set a CODACY_ACCOUNT_TOKEN
environment variable or pass it inline:
CODACY_ACCOUNT_TOKEN=your_token_here npm run inspect
This will build the project and launch the MCP inspector with your Codacy token.
You can test your local instance configuring the MCP Server as follows:
"codacy": {
"command": "/path/to/bin/node",
"args": [
"/path/to/codacy-mcp-server/dist/index.js"
],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
In order to use the Codacy-CLI, it needs to be installed. Whenever the MCP Server will receive a request to analyze, it will try to install the CLI and initialize it.
In case you want to use a specific version of our CLI, send a CODACY_CLI_VERSION
env variable in the MCP Server configuration.
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by zed-industries
Provides real-time collaborative editing powered by Rust, enabling developers to edit code instantly across machines with a responsive, GPU-accelerated UI.
by cline
Provides autonomous coding assistance directly in the IDE, enabling file creation, editing, terminal command execution, browser interactions, and tool extension with user approval at each step.
by continuedev
Provides continuous AI assistance across IDEs, terminals, and CI pipelines, offering agents, chat, inline editing, and autocomplete to accelerate software development.
by github
Enables AI agents, assistants, and chatbots to interact with GitHub via natural‑language commands, providing read‑write access to repositories, issues, pull requests, workflows, security data and team activity.
by block
Automates engineering tasks by installing, executing, editing, and testing code using any large language model, providing end‑to‑end project building, debugging, workflow orchestration, and external API interaction.
by RooCodeInc
An autonomous coding agent that lives inside VS Code, capable of generating, refactoring, debugging code, managing files, running terminal commands, controlling a browser, and adapting its behavior through custom modes and instructions.
by lastmile-ai
A lightweight, composable framework for building AI agents using Model Context Protocol and simple workflow patterns.
by firebase
Provides a command‑line interface to manage, test, and deploy Firebase projects, covering hosting, databases, authentication, cloud functions, extensions, and CI/CD workflows.
by gptme
Empowers large language models to act as personal AI assistants directly inside the terminal, providing capabilities such as code execution, file manipulation, web browsing, vision, and interactive tool usage.