home / mcp / codacy mcp server
Codacy's MCP Server implementation
Configuration
View docs{
"mcpServers": {
"codacy-codacy-mcp-server": {
"command": "npx",
"args": [
"-y",
"@codacy/codacy-mcp"
],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}You run an MCP server that connects to the Codacy API to access repositories, files, quality metrics, security findings, and more. It exposes a programmable interface you can connect to with your MCP clients to analyze code, manage repositories, and retrieve analytics.
Connect your MCP client to the Codacy MCP Server using a local stdio server configuration. You provide the MCP client with a running Codacy MCP Server instance, authenticated with your Codacy Account API token. After starting the server, your MCP client can perform operations such as listing organizations and repositories, fetching repository analysis, listing files and issues, and running CLI-style analyses locally.
Prerequisites you need before installation are Node.js and npm (or npx available). Ensure the npx command runs without issues. For local analysis, the Codacy MCP Server uses the Codacy CLI, and if it is not present, the MCP Server can install it for you.
# Prerequisites
node -v
npm -v
# Optional: install Codacy CLI if not present
# The MCP server can install it when neededUse supported IDEs or run manual configuration to connect the MCP Server to Codacy. The following configurations describe how to run the MCP server tooling from your environment.
{
"mcpServers": {
"codacy": {
"command": "npx",
"args": ["-y", "@codacy/codacy-mcp"],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}If you use Cursor, Windsurf, Claude Desktop, or VS Code with Copilot, you can enable a one-click installation or configure manually. The commands shown below are representative configurations you can apply in your environment.
{
"mcp": {
"inputs": [],
"servers": {
"codacy": {
"command": "npx",
"args": ["-y", "@codacy/codacy-mcp"],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
}If you prefer to set up manually in your VS Code settings, add the MCP server configuration to your global settings. Update the CODACY_ACCOUNT_TOKEN with your token.
{
"mcp": {
"inputs": [],
"servers": {
"codacy": {
"command": "npx",
"args": ["-y", "@codacy/codacy-mcp"],
"env": {
"CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
}Add or follow a repository in Codacy to ensure it is registered for analysis and management.
List organizations with pagination to browse available workspaces.
List repositories within an organization with pagination to view all connected projects.
Retrieve a repository along with analysis metrics such as Grade, Issues, Duplication, Complexity, and Coverage.
List and filter code quality issues in a repository for auditing, debt assessment, and compliance checks.
List files in a repository with pagination to navigate large codebases.
Get the issue list for a specific file in a repository.
Get coverage information for a file at the head commit of its branch.
List duplication clones for a file to identify repeated or similar code sections.
Get detailed analysis information for a file including Grade, Issues, Duplication, Complexity, and Coverage.
List security items across an organization for SRM (security and risk management) visibility.
List security items for a specific repository.
List pull requests accessible to the user in a repository.
Get detailed information about a specific pull request.
Return a list of issues found in a pull request.
Get diff coverage information for all files in a pull request.
Return the human-readable Git diff for a pull request.
List all code analysis tools available in Codacy.
Get analysis tools settings and available tools for a repository.
Get the definition of a specific analysis pattern.
List the patterns of a tool available for a repository.
Get detailed information about a specific issue.
Run quality analysis locally using Codacy CLI to analyze files or directories with specific tools and configurations.