- Home
- MCP servers
- CodeScene
CodeScene
- python
17
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"codescene-oss-codescene-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"CS_ACCESS_TOKEN",
"-e",
"CS_ONPREM_URL",
"-e",
"CS_ACE_ACCESS_TOKEN",
"-e",
"CS_MOUNT_PATH=${input:CS_MOUNT_PATH}",
"--mount",
"type=bind,src=${input:CS_MOUNT_PATH},dst=/mount/,ro",
"codescene-mcp"
],
"env": {
"CS_MOUNT_PATH": "/home/user/projects",
"CS_ONPREM_URL": "${input:CS_ONPREM_URL}",
"CS_ACCESS_TOKEN": "${input:CS_ACCESS_TOKEN}",
"REQUESTS_CA_BUNDLE": "/path/to/ca.pem",
"CS_ACE_ACCESS_TOKEN": "${input:CS_ACE_ACCESS_TOKEN}"
}
}
}
}The CodeScene MCP Server exposes CodeScene’s Code Health insights as local AI-friendly tools you can query from your codebase. It runs in your environment so AI assistants can request meaningful health data and guidance to improve maintainability, reduce debt, and refine automated codework with trusted, private analysis.
How to use
You connect an MCP client to the CodeScene MCP Server to query code health insights from your repository. Use cases include safeguarding AI-generated code by flagging maintainability issues, receiving AI-guided guidance for refactoring, and obtaining AI-driven summaries or diagnostics based on real-world design challenges. To enable advanced capabilities like automated refactoring, you can activate ACE (CodeScene ACE) by providing the ACE access token to the MCP server through your client configuration.
How to install
Prerequisites: you need a CodeScene account to obtain an access token and a runtime environment capable of running Docker or a native executable, depending on the installation method you choose.
Choose one of the installation methods below and follow the steps exactly as shown.
Homebrew (macOS / Linux) install method:
brew tap codescene-oss/codescene-mcp-server https://github.com/codescene-oss/codescene-mcp-server
brew install cs-mcp
How to install
Windows install method (PowerShell):
irm https://raw.githubusercontent.com/codescene-oss/codescene-mcp-server/main/install.ps1 | iex
How to install
Manual download and setup:
# macOS (Apple Silicon) or macOS Intel
# Linux (ARM64) or Linux (AMD64)
# Windows (AMD64)
# After download, make it executable and optionally add to PATH
chmod +x cs-mcp-*
mv cs-mcp-* /usr/local/bin/cs-mcp
How to install
Docker installation:
docker pull codescene/codescene-mcp
Additional configuration and usage notes
ACE activation and environment configuration: to enable ACE, pass CS_ACE_ACCESS_TOKEN to the MCP server. You can wire this into your editor or AI assistant configuration. A typical example shows the MCP running inside Docker with required environment variables and a mounted repository path.
MCP connection configurations
The MCP server can be connected via local stdio or remote HTTP endpoints. The following concrete configurations show how to start and connect the MCP server from a client, including how to mount your code directory and pass required tokens.
{
"servers": {
"codescene": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "CS_ACCESS_TOKEN",
"-e", "CS_ONPREM_URL",
"-e", "CS_ACE_ACCESS_TOKEN",
"-e", "CS_MOUNT_PATH=${input:CS_MOUNT_PATH}",
"--mount",
"type=bind,src=${input:CS_MOUNT_PATH},dst=/mount/,ro",
"codescene-mcp"
],
"env": {
"CS_ACCESS_TOKEN": "${input:CS_ACCESS_TOKEN}",
"CS_ONPREM_URL": "${input:CS_ONPREM_URL}",
"CS_ACE_ACCESS_TOKEN": "${input:CS_ACE_ACCESS_TOKEN}"
}
}
}
}
MCP connection configurations
SSL and certificate configuration tips are important if your organization uses a private CA. You can point the certificate bundle to a PEM file, and the MCP server will convert it to a Java truststore at runtime. You can either use REQUESTS_CA_BUNDLE, SSL_CERT_FILE, or CURL_CA_BUNDLE depending on your setup.
{
"servers": {
"codescene": {
"type": "stdio",
"command": "cs-mcp",
"env": {
"CS_ACCESS_TOKEN": "your-token-here",
"CS_ONPREM_URL": "https://your-codescene-instance.example.com",
"REQUESTS_CA_BUNDLE": "/path/to/your/internal-ca.crt"
}
}
}
}
Security and privacy notes
All analysis is performed locally on your machine. Network communication with CodeScene uses a secure token. No code or analysis data is sent to external cloud services unless explicitly configured.
Available tools
code_health_insights
Provides actionable insights about code quality, maintainability issues, and potential technical debt surfaced from your codebase.
ace_refactoring
Leverages ACE to restructure complex functions into smaller, cohesive units to improve AI-driven refactoring accuracy.
delta_reviews
Delivers delta-style reviews showing how changes affect code health metrics and debt goals.