Codescene Mcp Server

com.codescene由 codescene.com 發布v1.1.0更新於 Oct 24, 2026

An MCP server that provides CodeScene Code Health analysis tools.

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

CodeScene MCP 伺服器,讓 AI 助理在本機對程式碼庫進行 Code Health 分析,找出可維護性問題與技術債。

可以做什麼
  • 對本機儲存庫執行 Code Health 檢視與差異檢視
  • 找出複雜度、深層巢狀、內聚度低等設計問題
  • 引導並驗證小步重構,以更新後的 Code Health 分數衡量進展
  • 從 CodeScene 帳戶取得熱點、技術債目標與程式碼歸屬資訊
  • 顯示近期 MCP 事件的使用概況,以互動式儀表板或 Markdown 摘要呈現
適用情境
適合在助理撰寫或重構程式碼時取得客觀的可維護性回饋,或在修改舊有程式碼前先理解其設計問題。也適合已使用 CodeScene 的團隊,把其洞察接入 Copilot、Cursor、Claude Code 等用戶端。
執行需求
以本機程序執行,通常透過 npx 安裝,需要 Node.js 18 或更新版本;也可使用 Homebrew、VS Code 擴充套件、Windows 安裝指令或手動下載執行檔。完整功能需要 CodeScene 訂閱(雲端或地端部署),透過登入或 CS_ACCESS_TOKEN 驗證。選用環境變數可設定自訂 CA 憑證與關閉版本檢查。
安裝前請注意
完整功能需要付費的 CodeScene 訂閱以及 CS_ACCESS_TOKEN 憑證,請妥善保管該權杖。分析據稱在本機進行,但熱點與技術債資料會透過 REST 從你的 CodeScene 帳戶取得。除非關閉,伺服器會定期連線 GitHub 檢查新版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Codescene Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

CodeScene MCP Server

[CodeScene Hotspot Code Health] [CodeScene Average Code Health] [CodeScene System Mastery]

The CodeScene MCP Server exposes CodeScene's Code Health analysis as local AI-friendly tools.

This server is designed to run in your local environment and lets AI assistants (like GitHub Copilot, Cursor, Claude code, etc.) request meaningful Code Health insights directly from your codebase. The Code Health insights augment the AI prompts with rich content around code quality issues, maintainability problems, and technical debt in general.

The repository also includes a downloadable set of public agent skills in skills/ for teams that want to reuse CodeScene MCP workflows in their own agentic pipelines.

Getting Started with CodeScene MCP

Want AI to perform the setup? Start with skills/installing-and-activating-codescene-mcp/SKILL.md.

  1. Setting up Authentication to the MCP Server — see Authentication.
  2. Install the MCP Server using one of the installation options below.
  3. Add the MCP Server to your AI assistant. See the detailed instructions for your environment in the installation guide.
  4. Copy the agent guidance that matches your license into your repository: AGENTS-full.md for CodeScene Core users, AGENTS-standalone.md for standalone license users, or .amazonq/rules for Amazon Q. Also copy any relevant public skills for reusable workflow prompts.
  5. Explore the available tools to see what the MCP Server can do and which tools are available for your license.

Installation

Choose the installation method that works best for your platform.

NPM / npx (macOS, Linux, Windows)

Run the MCP server directly with npx (no install needed):

bash
npx @codescene/codehealth-mcp

Or install globally:

bash
npm install -g @codescene/codehealth-mcp

The first run automatically downloads the correct platform-specific binary for your system and caches it for future use. Requires Node.js 18 or later.

📖 Full installation & integration guide

Claude Code

Add the CodeScene marketplace and install the plugin:

/plugin marketplace add codescene-oss/codescene-mcp-server/plugin install codescene@codescene

This installs the MCP server and Code Health skills. Requires Node.js 18 or later.

Claude Desktop

Download the MCP bundle from the latest release page:

  • codehealth-mcp-{version}.mcpb

Then open the .mcpb file with Claude Desktop to install the MCP server.

VS Code

The CodeScene MCP is available as a VS Code extension:

Homebrew (macOS / Linux)
bash
brew tap codescene-oss/codescene-mcp-server https://github.com/codescene-oss/codescene-mcp-serverbrew trust codescene-oss/codescene-mcp-serverbrew install cs-mcp

📖 Full installation & integration guide

Windows

For VS Code / GitHub Copilot, the CodeScene MCP extension bundles and automatically configures the server without a separate PowerShell installation.

Run this in PowerShell:

powershell
irm https://raw.githubusercontent.com/codescene-oss/codescene-mcp-server/main/install.ps1 | iex

After installing, fully quit and reopen your AI assistant or IDE (including all VS Code windows) so it picks up the updated PATH, then configure the MCP server using the guide below. Restarting only the MCP server or an integrated terminal does not refresh VS Code's PATH. The guide also includes a VS Code configuration that uses the executable path directly and avoids this PATH requirement.

📖 Full installation & integration guide

Manual Download

Download the latest binary for your platform from the GitHub Releases page:

  • macOS: cs-mcp-macos-aarch64.zip (Apple Silicon) or cs-mcp-macos-amd64 (Intel)
  • Linux: cs-mcp-linux-aarch64.zip or cs-mcp-linux-amd64
  • Windows: cs-mcp-windows-amd64.exe

After downloading, make it executable and optionally add it to your PATH:

bash
chmod +x cs-mcp-*mv cs-mcp-* /usr/local/bin/cs-mcp

You can also build a static executable from source.

Docker

[!WARNING] The Docker distribution is being retired. From October 1 through December 31, 2026, Docker images will be released only for bug fixes. No Docker images will be released after December 31, 2026. Migrate to NPM / npx, Homebrew, the Windows installer, or another installation option above.

bash
docker pull codescene/codescene-mcp

📖 Full installation & integration guide | Build the Docker image locally


Use Cases

[!TIP] Watch the demo video of the CodeScene MCP.

[!NOTE] CodeScene MCP comes with a set of example prompts, agent guidance files to capture the key use cases, and a downloadable set of public skills. Copy the agent guidance that matches your license — AGENTS-full.md for CodeScene Core users or AGENTS-standalone.md for standalone users — and any relevant skills to your own repository.

With the CodeScene MCP Server in place, your AI tools can:

Safeguard AI-Generated Code

Prevent AI from introducing technical debt by flagging maintainability issues like complexity, deep nesting, low cohesion, etc.

Uplift Unhealthy Code for AI Readiness

AI refactoring quality improves when code is modular and easy to reason about. The MCP server gives your assistant concrete guidance to get there:

  • run focused Code Health reviews,
  • identify the specific design issues to address,
  • refactor in small, measurable steps, and
  • verify progress with updated Code Health scores.

This workflow works with MCP alone and is often enough to safely improve legacy code.

Make Targeted Refactoring

AI tools can refactor code, but they lack direction on what to fix and how to measure if it helped.
The Code Health tools solve this by giving AI assistants precise insight into design problems, as well as an objective way to assess the outcome: did the Code Health improve?

Understand Existing Code Before Acting

Use Code Health reviews to inform AI-driven summaries, diagnostics, or code transformations based on real-world cognitive and design challenges, not just syntax.

Review MCP Safeguard Impact

Ask your AI assistant to show your MCP usage overview to see Code Health uplifts, prevented degradations, and the scope and quality of your latest 250 MCP events. Supported clients display an interactive dashboard; other clients receive a Markdown summary. This API-connected feature requires a CodeScene Core account and is not available with a standalone license. See show_mcp_usage_overview for details.

Frequently Asked Questions

Do I need a CodeScene account to use the MCP?

The full feature set — including hotspots, technical debt goals, and code ownership — requires a CodeScene subscription. Authenticate by asking your AI Assistant to login to CodeScene, or use the login too. Alternatively, use your CodeScene instance to create the CS_ACCESS_TOKEN which activates the MCP. The MCP supports both CodeScene Cloud and CodeScene on-prem.

For local Code Health analysis without a CodeScene subscription, you can use the standalone CodeScene Code Health MCP.

How does the MCP Server keep my code private and secure?

The CodeScene MCP Server runs fully locally. All analysis — including Code Health scoring, delta reviews, and business-case calculations — is performed on your machine, against your local repository. No source code or analysis data is sent to cloud providers, LLM vendors, or any external service.

Analysis results (e.g. hotspots and technical debt goals) are fetched via REST from your own CodeScene account using a secure token.

For complete details, please see CodeScene's full privacy and security documentation.

Can I use any LLM as the backbone for CodeScene MCP?

CodeScene MCP can work with any model your AI assistant supports, but we strongly recommend choosing a frontier model when your assistant offers a model selector (as in tools like GitHub Copilot).

Frontier models -- such as Claude Sonnet -- deliver far better rule adherence and refactoring quality, while legacy models like GPT-4.1 often struggle with MCP constraints. For a consistent, high-quality experience, select the newest available model.

I have multiple repos — how do I configure the MCP?

Since you have to provide a mount path for Docker, you can either have a MCP configuration per project (in VS Code that would be a .vscode/mcp.json file per project, for example) or you can mount a root directory within which all your projects are and then just use that one configuration instead.

Why does IntelliJ give a wrong path to the MCP server?

In our testing we've seen that IntelliJ's AI Assistant sometimes gives a wrong path to the CodeScene MCP server. From what we can tell, it seems to have nothing to do with the MCP server itself, but rather with IntelliJ's AI Assistant, which seems to hallucinate parts of the path some of the time. We're still investigating this issue and will update this section once we have more information.

How do I configure custom SSL certificates?

If your organization uses an internal CA (Certificate Authority), set the REQUESTS_CA_BUNDLE environment variable to point to your CA certificate file (PEM format). The MCP server automatically configures SSL — you only need to set it once.

The MCP also supports SSL_CERT_FILE and CURL_CA_BUNDLE as alternatives.

For detailed configuration examples (including Docker certificate mounting), see Configuration Options — SSL/TLS.

How do I disable the version update check?

The MCP server periodically checks GitHub for newer releases and shows a "VERSION UPDATE AVAILABLE" banner when your version is outdated. This check runs in the background and never blocks tool responses, but in network-restricted environments you may want to disable it entirely.

Set the CS_DISABLE_VERSION_CHECK environment variable to any non-empty value (e.g. 1). For setup details, see Configuration Options — Version Check.

Building from Source

The MCP server is written in Rust. To build from source:

bash
cargo build --release

The binary is produced at target/release/cs-mcp.

For more details, see:

來源:README.md,提交 96aad91

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。