← Back to directory
C

Codescene MCP Server

Official
Expose CodeScene's Code Health analysis as local AI-friendly tools.
GitHub source repository ↗
★ 61 Stars Category · Dev Tools Popular Source revision 0d5106f9dad4
46FMRS · D
Reliability
7/20
Security and permissions
8/20
Maintenance
6/20
Documentation
13/20
Setup experience
12/20

The CodeScene MCP Server provides AI assistants with code health analysis capabilities, emphasizing local execution and AI-friendly tools. It is suitable for teams combining AI development with code quality improvement, but requires a CodeScene account. Officially maintained with detailed documentation, it carries risks related to model dependency and configuration complexity.

Read the FMRS scoring method →

The CodeScene MCP Server exposes CodeScene's Code Health analysis as local AI-friendly tools for AI assistants like GitHub Copilot, Cursor, and Claude Code. It provides code health insights, including maintainability issues, complexity, and technical debt. The server runs fully locally, ensuring code and analysis data stay on-premises. Requires a CodeScene account or standalone license.

Tools

code_health_review
Performs a focused Code Health review on specified code segments, identifying design issues.
hotspots
Lists hotspot areas in the codebase that are frequently changed and have high complexity.
technical_debt_goals
Retrieves technical debt goals to prioritize tech debt reduction.
code_ownership
Shows code ownership information to understand module responsibilities.
delta_review
Reviews code changes to assess impact on code health.

Setup

  1. Obtain an access token: Create a personal access token in your CodeScene instance (CS_ACCESS_TOKEN). 2. Choose installation method: Use npx (npx @codescene/codehealth-mcp), global npm, Homebrew (brew install cs-mcp), Windows script, manual download, or Docker (docker pull codescene/codescene-mcp). 3. Configure your AI assistant: Add the MCP server to your assistant (e.g., Claude Desktop, VS Code). 4. Copy the agent guidance file (AGENTS-full.md or AGENTS-standalone.md) to your repository, and add relevant skills. 5. Verify the tools are available.

Fit and risk

Best for

  • Teams integrating AI-driven development with code quality analysis
  • Developers aiming to safely refactor legacy code with AI assistance
  • Organizations embedding code health checks in CI/CD pipelines

Not for

  • Users without a CodeScene account or standalone license (though a standalone Code Health MCP is available)
  • Scenarios requiring zero network dependency after setup (analysis is local but fetches data from CodeScene)
  • Teams needing a complete replacement for CodeScene's platform features

Required permissions

  • Requires CS_ACCESS_TOKEN to fetch data from a CodeScene instance
  • Read access to the local codebase for analysis
  • Volume mount for Docker installations to access code
  • Environment variables for custom SSL certificates (e.g., REQUESTS_CA_BUNDLE)
  • Can set CS_DISABLE_VERSION_CHECK to disable version checks

Risks and side effects

  • Transmission risk: Analysis results are fetched via REST from your own CodeScene account; source code is not sent externally, but token security is critical.
  • Dependency risk: A valid access token is required; token leakage could expose data.
  • Model limitations: Older models may not adhere to MCP constraints, affecting refactoring quality.
  • Path hallucination: IntelliJ's AI assistant may provide incorrect MCP paths, causing connection issues.

Troubleshooting

  1. Check that CS_ACCESS_TOKEN is set and valid.
  2. For Docker, ensure the correct code directory path is mounted.
  3. If using custom SSL certificates, set REQUESTS_CA_BUNDLE to your CA cert file.
  4. If IntelliJ gives wrong path, try manually specifying the correct MCP server path.
  5. Refer to docs for common issues like disabling version update check.

Use cases

Safeguard AI-generated code: Prevent AI from introducing technical debt by flagging maintainability issues.
Uplift unhealthy code for AI readiness: Improve code modularity via focused Code Health reviews and incremental refactoring.
Make targeted refactoring: Use Code Health tools to determine what to fix and measure progress with updated scores.
Understand existing code before acting: Use Code Health reviews to inform AI-driven summaries and diagnostics.

Supported clients

Claude DesktopFull support
VS CodeFull support
JetBrains IntelliJPartial support
GitHub CopilotFull support
CursorFull support