Installing the CodeHealth™ MCP Server (Single-User)
The CodeHealth™ MCP Server (Single-User) gives your AI assistant local access to Code Health analysis so it can review code, safeguard AI-generated changes, support refactoring, and help communicate why Code Health matters.
Before you start
Make sure you have:
a single-user access token
an MCP-compatible AI assistant or editor
one supported installation method from the list below
Step 1: Choose an installation method
Pick the setup that fits your platform and workflow best.
Option 1: NPM / npx
This is the quickest way to get started.
Requirements:
Node.js 18 or later
Run the CodeHealth MCP Server directly with npx:
npx @codescene/codehealth-mcpOr install it globally:
npm install -g @codescene/codehealth-mcpOn first run, the correct platform-specific binary is downloaded automatically and cached for future use. Supported platforms for the NPM path are macOS ARM64, macOS AMD64, Linux ARM64, Linux AMD64, and Windows AMD64.
Option 2: Homebrew
Use this on macOS or Linux if you prefer installing with Homebrew.
brew tap codescene-oss/codehealth-mcp https://github.com/codescene-oss/codehealth-mcp brew trust codescene-oss/codehealth-mcp brew install cs-mcpAfter installation, the cs-mcp command is available in your PATH. Some applications, including VS Code or Claude Desktop, may need a restart before PATH changes are picked up. Homebrew supports macOS ARM64, macOS AMD64, Linux ARM64, and Linux AMD64.
Option 3: Windows PowerShell
Use this on Windows for a simple one-command installation.
Requirements:
Windows 10 or later
PowerShell 5.1 or later
Run:
irm https://raw.githubusercontent.com/codescene-oss/codehealth-mcp/main/install.ps1 | iexThis installs the latest version into %LOCALAPPDATA%\Programs\cs-mcp and adds it to your PATH. After installation, restart your terminal. Some applications, including VS Code or Claude Desktop, may also need a full restart before the new PATH is picked up.
Option 4: Manual download
You can also download the latest binary from the GitHub Releases page and add it to your PATH manually.
Supported platforms:
macOS ARM64 (Apple Silicon)
macOS AMD64 (Intel)
Linux ARM64
Linux AMD64
Windows AMD64
After downloading, make the binary executable and optionally move it into your PATH so your MCP client can call it as cs-mcp.
chmod +x cs-mcp mv cs-mcp /usr/local/bin/cs-mcpThe exact filename differs by platform.
Step 2: Get your single-user access token
You can find the complete token signup and setup flow in our article How to start your CodeHealth™ MCP Server (Single-User) free trial and get your access token, including where to find the token email and how to use the token in your MCP configuration.
Step 3: Copy the AI guidance file into your repository
Copy AGENTS-standalone.md into your repository as AGENTS.md.
This file guides AI agents on how to use the CodeHealth MCP Server correctly, including safeguard workflows for AI-touched code and the recommended approach for Code Health-guided refactoring.
If you use Amazon Q, copy the .amazonq/rules directory instead.
Step 4: Add the CodeHealth MCP Server (Single-User) to your MCP client
Add the CodeHealth MCP Server to your MCP client and set your single-user token as CS_ACCESS_TOKEN. The CodeHealth MCP repository documents example configurations for native binaries, npx, and common editors such as VS Code, GitHub Copilot, Cursor, Claude Code, Kiro, and Amazon Q.
Example: static binary (cs-mcp)
{ "servers": { "codescene": { "type": "stdio", "command": "cs-mcp", "env": { "CS_ACCESS_TOKEN": "<your single-user token here>" } } } }This is the same documented pattern used for the native binary setup.
Example: npx
{ "servers": { "codescene": { "type": "stdio", "command": "npx", "args": [ "@codescene/codehealth-mcp" ], "env": { "CS_ACCESS_TOKEN": "<your single-user token here>" } } } }This follows the documented npx setup flow.
Step 5: Run your first checks
Good first prompts:
Review the Code Health of the current file.
Score the current file and explain what lowers the score.
Safeguard my staged changes before I commit them.
Analyze this change set before I open a pull request.
✅ Success insight: The CodeHealth MCP Server (Single-User) is now ready to help your AI assistant review local code, safeguard code changes, support refactoring, and work with Code Health directly in your repository.
Having a technical issue?
If something is not working as expected during installation, configuration, or use of the CodeHealth™ MCP Server, please raise a GitHub issue here.
Before submitting, include:
Operating system
MCP client or editor
CodeHealth MCP Server version, if available (
cs-mcp --versionfor Homebrew or manual installations)the installation method you used
the exact error message
whether the issue happens during installation, configuration, or tool usage
If you share configuration snippets, make sure to remove or mask your access token first.
Was this helpful?
More in CodeHealth™ MCP server (Single-User License)
Where to find more detailed documentation and get help with the CodeHealth™ MCP Server (Single-User)FAQ: CodeHealth™ MCP Server (Single-User)How to reset your CodeHealth™ MCP Server (Single-User) access tokenHow to start your CodeHealth™ MCP Server (Single-User) free trial and get your access tokenStill need help? Ask the team