
Codehealth MCP
Gives your agent CodeScene structural Code Health reviews, score deltas and commit gates
Codehealth MCP is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 66
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Codehealth MCP
This skill tells an AI coding agent how to use the CodeScene MCP server to measure design-level maintainability of code, going beyond style and lint checks. Before an agent edits a file, it runs a full Code Health review to record a baseline score and the code smells listed. After each change it re-scores the same file and treats any drop as a regression to fix before the task is considered done.
The workflow also covers repository gates. Before a commit the agent runs a pre-commit safeguard to block changes that introduce Code Health regressions, and before opening a pull request it runs a change-set analysis against the base branch. Scores are read on a 1 to 10 scale, and the skill sets how cautiously the agent should refactor depending on the score range.
The MCP server is configured through a CodeScene access token that the user supplies, and the setup uses the npx package for the standalone server. Only the four standalone tools are used, so no paid CodeScene platform account is needed. The tools analyze files and git state in the local repository the user points them at, and the skill advises against using it on secrets or paths that should not be analyzed. If the server is unavailable, the agent is told to report the check as skipped rather than estimate a score.
When your agent uses it
Real-time structural Code Health via CodeScene MCP — review before edits, verify score deltas after changes, gate commits and PRs. Use when reviewing code quality, refactoring, checking if AI changes degraded a file, or before commit/PR.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (8 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafathOr copy only this skill to ~/.claude/skills/codehealth-mcp:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/codehealth-mcp &&
cp -R "$tmp/.agents/skills/codehealth-mcp" ~/.claude/skills/codehealth-mcp &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/codehealth-mcp inside it instead.
Copy the skill folder to ~/.agents/skills/codehealth-mcp to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/codehealth-mcp &&
cp -R "$tmp/.agents/skills/codehealth-mcp" ~/.agents/skills/codehealth-mcp &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/codehealth-mcp inside it instead.
Copy the skill folder to ~/.cursor/skills/codehealth-mcp to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/codehealth-mcp &&
cp -R "$tmp/.agents/skills/codehealth-mcp" ~/.cursor/skills/codehealth-mcp &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/codehealth-mcp inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/codehealth-mcpOr copy the folder to ~/.gemini/skills/codehealth-mcp yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/codehealth-mcp:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/codehealth-mcp &&
cp -R "$tmp/.agents/skills/codehealth-mcp" ~/.copilot/skills/codehealth-mcp &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/codehealth-mcp inside it instead.
Get the folder:
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.gitThen copy REA_Skill/.agents/skills/codehealth-mcp into your agent's skills folder as codehealth-mcp. Agents that support SKILL.md read one folder per skill.
What it does
- Pre-edit health review
- Runs a full structural analysis on a target file to record a baseline score and listed code smells before changes begin.
- Post-change score checks
- Re-scores the edited file after each change and compares it with the baseline to catch regressions.
- Commit safeguard
- Runs a pre-commit check that blocks changes introducing Code Health regressions.
- Branch change-set analysis
- Analyzes the branch against its base before a pull request is opened.
- Score-based refactor limits
- Scales how broad a refactor may be according to the file's score range on a 1 to 10 scale.
- Offline fallback rules
- Tells the agent to report the check as skipped instead of inventing scores when the MCP server is unavailable.
Good for
- Review a legacy module for maintainability before changing it
- Check whether an AI-generated diff degraded the health of a file
- Run a structural check before committing refactored code
- Verify Code Health on a branch before opening a pull request
- Refactor a low-scoring file with a narrow, score-guided scope
Codehealth MCP FAQ
What does Codehealth MCP need to run?
It needs the CodeScene MCP server, installed through npx as @codescene/codehealth-mcp, and a CS_ACCESS_TOKEN that the user sets personally. The standalone tools do not require a paid CodeScene platform account.
Does Codehealth MCP change my code automatically?
No. The skill directs the agent to review and score files and to run gates. It does not make edits on its own, and the tools run only when invoked.
Which tools does Codehealth MCP use?
It uses code_health_review, code_health_score, pre_commit_code_health_safeguard and analyze_change_set. Platform-only tools such as repository-wide hotspot lists are not used.
What happens if the MCP server is down?
The agent should not invent scores. It tells the user the check was skipped and continues only with explicit approval, preferring lint and tests for gating in the meantime.
Does Codehealth MCP work with ECC bundled MCP servers automatically?
No. The codescene entry in the ECC configuration is a template, and the user must copy it into their own config if they want it enabled.
How do I install Codehealth MCP in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/codehealth-mcp to use it in all your projects, or to .claude/skills/codehealth-mcp in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.
Does Codehealth MCP run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Codehealth MCP?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Codehealth MCP?
The closest alternatives to Codehealth MCP are Codebase memory MCP, MCP implementation security review, Code review expert, Harness review and Code quality analysis.
Where this comes from
- Description: from the skill's own SKILL.md.
More from smartworldarafath/REA_Skill

Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android
- Open source
- 66 GitHub stars
- Developer tools

Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity
- Open source
- 66 GitHub stars
- Developer tools

Compare coding agents head-to-head on your own tasks by pass rate, cost and time
- Open source
- 66 GitHub stars
- Developer tools

Guides an agent to design tool sets, observations and error recovery for better completion
- Open source
- 66 GitHub stars
- Developer tools

Gives an agent a structured capture-diagnose-recover loop for failing runs
- Open source
- 66 GitHub stars
- Developer tools

Lets an AI agent make x402 payments within per-task budgets and spending policies
- Open source
- 66 GitHub stars
- Finance and payments




