Codacy MCP Serverのロゴ

Codacy MCP Server

組織
codacy

Codacy's MCP Server implementation

公開者codacy
リポジトリcodacy-mcp-server
言語TypeScript
フォーク
24
スター
63
利用可能なツール
3
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    Codacy MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 3個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには63件のスターと24件のフォークがあります。

Codacy MCP Server

Codacy Badge

MCP Server for the Codacy API, enabling access to repositories, files, quality, coverage, security and more.

Table of Contents

Features / Tools

The following tools are available through the Codacy MCP Server:

Repository Setup and Management

  • 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.

Organization and Repository 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.

Code Quality and Analysis

  • 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:

    • Pagination support for handling large result sets
    • Filtering by multiple criteria including severity, category, and language
    • Author-based filtering for accountability
    • Branch-specific analysis
    • Pattern-based searching

    Common use cases:

    • Code quality audits
    • Technical debt assessment
    • Style guide compliance checks
    • Performance issue investigation
    • Complexity analysis

File Management and Analysis

  • 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.

Security Analysis

  • 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:

  • SAST (Code scanning)
  • Secrets (Secret scanning)
  • SCA (Dependency scanning)
  • IaC (Infrastructure-as-code scanning)
  • CICD (CI/CD scanning)
  • DAST (Dynamic Application Security Testing)
  • PenTesting (Penetration testing)

Pull Request Analysis

  • 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.

Tool and Pattern Management

  • 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.

CLI Analysis

  • codacy_cli_analyze: Run quality analysis locally using Codacy CLI. Features include:
    • Analyze specific files or entire directories
    • Use specific tools or all available tools
    • Get immediate results without waiting for scheduled analysis
    • Apply fixes based on Codacy configuration

Setup

Requirements

Ensure your machine has the following tools installed:

  • git
  • node.js
    • ensure that the 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).

Personal API Access Token

Get your Codacy's Account API Token from your Codacy Account.

You'll need it later in the setup.

Install

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:

Cursor, Windsurf, and others

You can use the one-click install for Cursor:

Install MCP Server

Otherwise, depending on what you are connecting the MCP Server to, you can use the following methods:

  • Cursor: edit the .cursor/mcp.json file to add the following
  • Windsurf: edit the .codeium/windsurf/mcp_config.json file to add the following
  • Claude Desktop: edit the claude_desktop_config.json file to add the following
json
{
  "mcpServers": {
    "codacy": {
      "command": "npx",
      "args": ["-y", "@codacy/codacy-mcp"],
      "env": {
        "CODACY_ACCOUNT_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

VS Code with Copilot

You can use the one-click install for VS Code:

Install with Codacy in VS Code Install with Codacy in VS Code Insiders

Otherwise, if you wish to set it up manually:

  1. For connecting the MCP Server to Copilot in VS Code, add the following to the global config of the IDE:
json
{
  "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:

  • for macOS: ~/Library/Application Support/Code/User/settings.json
  • for Windows: %APPDATA%\Code\User\settings.json
  • for Linux: ~/.config/Code/User/settings.json

Don't forget to update the value of CODACY_ACCOUNT_TOKEN with your token.

  1. Make sure you have Agent mode enabled: vscode://settings/chat.agent.enabled

  2. 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.

Copilot Agent with Codacy tools

Troubleshooting

Claude Desktop and NVM

When using NVM with Claude Desktop, NPX may not work. You should first install the MCP Server globally, and then use Node directly:

bash
npm install -g @codacy/codacy-mcp
json
{
  "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>"
      }
    }
  }
}

Contribute

To work locally on the MCP Server code, run:

bash
npm install
npm run update-api
npm run build

Testing with Inspector

You can test the MCP server using the inspector tool. You can either set a CODACY_ACCOUNT_TOKEN environment variable or pass it inline:

bash
CODACY_ACCOUNT_TOKEN=your_token_here npm run inspect

This will build the project and launch the MCP inspector with your Codacy token.

Testing with an Agent

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

Codacy-CLI Support

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.

License

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.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "codacy-codacy-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@codacy/codacy-mcp"
      ]
    }
  }
}

利用可能なツール

  • codacy_get_pattern

    Get the definition of a specific pattern.

    Common use cases:

    • When the user asks for the definition of a specific pattern
    • When the user asks for more information about an issue found by Codacy

    Common mistakes:

    • Using this tool with the wrong toolUuid
    • Using this tool with the wrong patternId
  • codacy_list_tools

    List all code analysis tools available in Codacy.

  • codacy_cli_analyze

    Run quality analysis locally using Codacy CLI.

    Use this tool to analyze the quality of a repository using Codacy command line.

    Common use cases:

    • When the user asks for an analysis of a repository
    • When the user asks to scan the code
    • When the user wants to analyze based on Codacy configuration
    • When the user wants to apply fixes based on Codacy configuration and analysis
    • When the user wants Codacy results immediately without waiting for the next scheduled analysis

    Common mistakes:

    • Using this tool to know the status of a repository

    • Using this tool without specifying the rootPath

    • Using this tool to know current results from Codacy. Use codacy_get_repository_with_analysis instead.

    • Filling the tool parameter when not asked specifically for it.

    • Using this tool for a organization other than the current one

    • Using this tool with the wrong organization name (if you are not sure, use the codacy_list_organizations tool to validate the organ

Codacy MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Codacy MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Codacy MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Codacy MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "codacy-codacy-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@codacy/codacy-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてCodacy MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Codacy MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Codacy MCP Serverを使ってこのタスクを手伝ってもらえますか?
Codacy MCP Server
はい、読みました。
Codacy MCP Serverで調べた結果をお伝えします。

よくある質問

Codacy MCP Server MCPサーバーは何に使いますか?

Codacy MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでCodacy MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでCodacy MCP Serverを利用できます。

TypingMindでCodacy MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Codacy MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Codacy MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Codacy MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでCodacy MCP Server MCPのどのようなツールを利用できますか?

Codacy MCP Serverは3個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Codacy MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Codacy MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇