Skill v1.0.3
currentAutomated scan100/1002 files
version: "1.0.3" name: configuring-codescene-mcp description: Use when the user wants to view, set, or troubleshoot CodeScene MCP configuration such as OAuth login, access tokens, account IDs, on-prem URLs, default projects, or SSL certificates.
Configuring CodeScene MCP
Overview
Use this skill when the task is to configure the CodeScene MCP Server after it has been installed. The MCP server exposes login, get_config, and set_config tools that let the AI assistant authenticate and manage configuration on the user's behalf. Clients that support MCP prompts also expose a login prompt (slash command) that instructs the assistant to call the login tool.
When to Use
- The user wants to sign in to CodeScene (OAuth).
- The user wants to set or change their CodeScene access token (PAT / standalone).
- The user belongs to multiple Cloud accounts and needs to pin an account ID.
- The user needs to connect to a self-hosted CodeScene instance.
- The user wants to pre-select a default CodeScene project.
- The user needs to configure a custom CA certificate for SSL/TLS.
- The user wants to limit which tools are exposed to reduce token usage (
enabled_tools). - The user asks what their current configuration is.
- The user is troubleshooting a configuration issue (wrong token, missing URL, SSL errors).
Do not use this skill for installing or registering the MCP server in an AI assistant. Use installing-and-activating-codescene-mcp for that.
Quick Reference
login: Sign in with OAuth (opens browser). Preferred for interactive desktop use. Also available as theloginMCP prompt (slash command).get_config: List all configuration options and their current values (sensitive values are masked).get_configwith a key: Read a single option by name.set_config: Set a configuration value persistently.set_configwith an empty value: Delete a stored configuration value.
Authentication precedence
CS_ACCESS_TOKEN/access_token(PAT or standalone) — always wins and blocks OAuthlogin.- Cached OAuth session from a previous
login. - CLI credential refresh.
Configuration Options
| Key | Purpose | |
|---|---|---|
account_id | Optional Cloud account/tenant ID (positive integer). Pin multi-account OAuth to a specific account. Set before login and keep set afterward. | |
access_token | Optional Personal Access Token or standalone MCP license token (CI/headless). | |
onprem_url | Base URL for a self-hosted CodeScene instance (API-mode only). | |
default_project_id | Pre-select a CodeScene project by numeric ID (API-mode only). | |
ca_bundle | Path to a custom PEM-format CA certificate bundle. | |
enabled_tools | Comma-separated allowlist of tool names to expose (empty = all). |
Precedence
Environment variables set by the MCP client always override values in the config file. If the user has set a value via an environment variable in their editor config, set_config will warn that the env var takes precedence and the stored value will not be used until the env var is removed.
Implementation
- Run
get_configto see the current state of all options. - For interactive auth: if
access_tokenis set and the user wants OAuth, clear it first (set_configwith empty value or ask them to removeCS_ACCESS_TOKENfrom client env). For multi-account Cloud, ensureaccount_idis set before callinglogin. - Call
loginfor OAuth (or have the user invoke theloginMCP prompt), orset_configfor PAT / other options. - Run
get_configwith the relevant key to confirm the change took effect. - If the user changed
access_token, inform them that a server restart may be needed for tool registration changes to take effect. - If
get_configshows a value source of "client environment variable", explain that the env var in their editor's MCP configuration takes precedence and must be changed there instead.
When environment variables are appropriate
Environment variables are still the right choice when:
- The configuration is shared across a team or checked into a project (e.g., in
.vscode/mcp.json). - The server runs in Docker and needs
CS_MOUNT_PATH(which is not a config-tool option). - CI or automation pipelines inject secrets at runtime.
For individual, interactive use, prefer login for auth and set_config for other options.
Common Mistakes
- Setting a value with
set_configwhen the same key is already provided as an environment variable by the MCP client. The env var wins and the stored value is silently ignored. - Leaving
access_token/CS_ACCESS_TOKENset and then trying to uselogin— PAT always blocks OAuth. - Setting
account_idafterloginwithout logging in again — the credential slot is chosen at login time and must match later CLI calls. - Forgetting that
access_tokenchanges may require a server restart. - Confusing the config key name with the environment variable name. Use the short key (e.g.,
access_token,account_id) withset_config, not the env var name (CS_ACCESS_TOKEN,CS_ACCOUNT_ID). - Setting
onprem_urlordefault_project_idwhen using a standalone license. These options are only available with CodeScene Core (OAuth or PAT). - Providing a CA bundle path that is not accessible to the MCP server process or Docker container.
- Setting
enabled_toolswith misspelled tool names. The server warns about unknown names, but the misspelled tools are silently ignored. Useget_configwith keyenabled_toolsto see the list of available tool names. - Forgetting that
enabled_toolschanges require a server restart. The tool list is built once at startup. - Trying to disable
get_config,set_config, orloginviaenabled_tools. These tools are always enabled to prevent configuration lockout.