Codescene MCP Server logo

Codescene MCP Server

Analyze CodeScene Code Health locally, review changes, inspect technical debt, and guide refactoring through MCP tools.

Install Codescene MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "codescene-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@codescene/codehealth-mcp"
      ],
      "env": {
        "CS_ACCESS_TOKEN": "YOUR_VALUE_HERE",
        "CS_ONPREM_URL": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

codescene-mcp-server brings CodeScene Code Health analysis and project insights to AI assistants through local MCP tools. It can score or review individual source files, compare branch changes, inspect hotspots, ownership, and technical debt goals, and run pre-commit or pre-PR safeguards. Local rules can be inspected, changed, and validated without API access, while project-scoped features use CodeScene authentication. Reach for it when an agent needs measurable maintainability feedback before refactoring, committing, or opening a pull request.

Use cases

  • Review modified files before creating a pull request
  • Check Code Health regressions before committing
  • Rank files by maintainability score
  • Find owners and technical debt hotspots
  • Tune and validate repository Code Health rules

Key features

  • Single-file Code Health scores and smell reviews
  • Branch and pre-commit quality safeguards
  • Technical debt hotspot and goal queries
  • Code ownership lookup
  • Local Code Health rule configuration
  • Embedded skill discovery and download

Tools28

What Codescene MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~10.7k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

26/26 checks healthy over the last 91d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · @codescene/codehealth-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars78Stargazers on the source repository.
npm downloads18kPackage downloads in the last 30 days.
Last commit3d agoMost recent push to the default branch.
Tools exposed28Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Codescene MCP Server works

What codescene-mcp-server does

CodeScene Code Health analysis is exposed as MCP tools for AI-assisted development. The server works with a local codebase for file reviews, scoring, branch comparisons, pre-commit checks, and rules configuration. It also connects to CodeScene for project-level information such as technical debt hotspots, ownership, goals, project selection, and safeguard usage.

File analysis can return a numeric score or a detailed review with code-smell findings. Scores range from 10.0 for optimal code to 1.0 for the worst result. The documented bands are Green Code at 9.0–9.9, Yellow Code at 4.0–8.9, and Red Code at 1.0–3.9. A refactoring business-case tool provides model-based optimistic and pessimistic projections with a 90% confidence interval.

How it works

The server runs in the developer environment and provides its capabilities to MCP-compatible assistants. Local safeguards inspect either the current modified and staged files or all files that differ between a Git branch and a specified base reference. Results can identify improved, degraded, stable, or unknown file-level outcomes and include quality-gate and coverage metadata.

Project queries use a CodeScene project ID and the latest available analysis data. Authentication can use OAuth through the login tool or a personal access token supplied with CS_ACCESS_TOKEN. CodeScene Cloud and on-premises deployments are supported; on-premises use requires CS_ONPREM_URL to identify the instance.

Setup and configuration

One installation route is npx @codescene/codehealth-mcp, which requires Node.js 18 or later. The package can also be installed globally with npm, installed through Homebrew, downloaded as a platform binary, or added through the Claude Code marketplace. Claude Desktop can install an MCP bundle from the latest GitHub release, and VS Code provides an extension through its marketplaces. A Docker image is available, although its distribution is scheduled for retirement after December 31, 2026.

After installation, add the server to the chosen assistant and authenticate if CodeScene-backed tools are needed. The get_config and set_config tools inspect and persist supported settings; client environment variables take precedence over saved configuration values. verify_installation checks Git repository access, authentication, API and CLI connectivity, agent instructions, and the runtime environment.

Tools and capabilities

  • Score one supported source file or request a detailed Code Health review.
  • Compare a branch with a Git base reference and run pre-commit safeguards.
  • Generate refactoring impact estimates and explain Code Health concepts or productivity implications.
  • Find project hotspots, technical debt goals, and likely owners for a path.
  • List, inspect, download, or synchronize embedded agent skills.
  • List and modify Code Health rules, thresholds, and validation files locally.
  • Authenticate, switch Cloud accounts, inspect configuration, and review safeguard usage.

Limitations and notes

File scoring and reviews operate on one analyzable, supported source file at a time. Branch and pre-commit checks require a valid Git repository; branch reviews also require a resolvable base_ref and cover only changed files. Review output may be CLI text, while branch and safeguard results are JSON text.

Project-level tools require a valid project ID and current CodeScene analysis data. Ownership and technical-debt queries may return empty data when no matching record exists. Some API-backed features require authentication, and safeguard usage requires a CodeScene Core account rather than a standalone license. Refactoring business-case figures are projections, not guarantees. Rules configuration changes write to a local code-health-rules.json file and should be validated afterward.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Codescene MCP Server

codescene-mcp-server is an MCP server that connects AI assistants to local CodeScene Code Health analysis and CodeScene project data. Its main tools score and review files, compare branch changes, run pre-commit safeguards, inspect hotspots and ownership, manage rules, and support refactoring analysis.

Install it with `npx @codescene/codehealth-mcp`, or use npm, Homebrew, a platform binary, Claude Code, Claude Desktop, VS Code, or Docker. The npx route requires Node.js 18 or later. After installation, add the server to your MCP client.

Yes, codescene-mcp-server works with Cursor. The server is designed for local MCP use with AI assistants, and Cursor is named as a supported assistant in the project materials.

Use `analyze_change_set` with a Git repository path and resolvable `base_ref`. It reviews files differing between the current HEAD and that reference, then returns quality-gate status, coverage metadata, file verdicts, and findings.

Authenticate with the `login` tool or provide a CodeScene personal access token through `CS_ACCESS_TOKEN`. For an on-premises instance, configure `CS_ONPREM_URL` before using login. Authentication is needed for CodeScene-backed project features.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCodescene MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codescene-mcp-server?style=directory)](https://allmcps.com/mcp/codescene-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/codescene-mcp-server"><img src="https://allmcps.com/api/badge/codescene-mcp-server?style=directory" alt="Codescene MCP Server on AllMCPs" /></a>