home / mcp / codacy mcp server

Codacy MCP Server

Codacy's MCP Server implementation

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 needed

Install

Use 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>"
      }
    }
  }
}

Additional install options for IDE integrations

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>"
        }
      }
    }
  }
}

Notes on manual VS Code Copilot setup

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>"
        }
      }
    }
  }
}

Available tools

codacy_setup_repository

Add or follow a repository in Codacy to ensure it is registered for analysis and management.

codacy_list_organizations

List organizations with pagination to browse available workspaces.

codacy_list_organization_repositories

List repositories within an organization with pagination to view all connected projects.

codacy_get_repository_with_analysis

Retrieve a repository along with analysis metrics such as Grade, Issues, Duplication, Complexity, and Coverage.

codacy_list_repository_issues

List and filter code quality issues in a repository for auditing, debt assessment, and compliance checks.

codacy_list_files

List files in a repository with pagination to navigate large codebases.

codacy_get_file_issues

Get the issue list for a specific file in a repository.

codacy_get_file_coverage

Get coverage information for a file at the head commit of its branch.

codacy_get_file_clones

List duplication clones for a file to identify repeated or similar code sections.

codacy_get_file_with_analysis

Get detailed analysis information for a file including Grade, Issues, Duplication, Complexity, and Coverage.

codacy_search_organization_srm_items

List security items across an organization for SRM (security and risk management) visibility.

codacy_search_repository_srm_items

List security items for a specific repository.

codacy_list_repository_pull_requests

List pull requests accessible to the user in a repository.

codacy_get_repository_pull_request

Get detailed information about a specific pull request.

codacy_list_pull_request_issues

Return a list of issues found in a pull request.

codacy_get_pull_request_files_coverage

Get diff coverage information for all files in a pull request.

codacy_get_pull_request_git_diff

Return the human-readable Git diff for 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 analysis 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 to analyze files or directories with specific tools and configurations.