Connect CodeScene MCP

Early access

This is early access functionality. Contact your account executive to get access.

Connect your AI assistant to CodeScene in three steps: find the server address, add it to your assistant, and approve the access. You sign in with your CodeScene account in the browser. There is no token to create.

The assistant can read the analysis of the projects you can open in CodeScene. It cannot change projects, settings, or code. When it is connected, continue with CodeScene MCP: Explore Your Insights.

Step 1: Find the server address

The server address is your CodeScene Host URL followed by /mcp:

  1. In CodeScene, open Configuration → System.

  2. Under Host/Network Settings, copy CodeScene Host URL.

  3. Add /mcp at the end. https://codescene.example.com becomes https://codescene.example.com/mcp, and https://example.com/codescene becomes https://example.com/codescene/mcp.

Use exactly that host name. An address with another name for the same server, such as its IP address, is refused at sign-in.

Step 2: Add CodeScene to your assistant

Follow the steps for your assistant, and replace <server address> with the address from step 1.

Claude

For Claude on the web, desktop, and mobile. Needs a paid plan. On Team and Enterprise plans, an owner may have to add the connector first.

Needs an internet-facing server

Claude connects from its own servers, so your CodeScene Host URL has to be reachable from the internet.

  1. Open Settings → Connectors and choose Add custom connector.

  2. Enter the name CodeScene and the server address <server address>. Leave the advanced settings empty.

  3. Click Connect, then continue with step 3.

  4. In a chat, turn on CodeScene from the tools menu.

ChatGPT

Needs a paid plan. In Business and Enterprise workspaces, an admin may have to allow developer mode.

Needs an internet-facing server

ChatGPT connects from its own servers, so your CodeScene Host URL has to be reachable from the internet.

  1. Open Settings → Apps & Connectors → Advanced settings and turn on Developer mode.

  2. Back in Apps & Connectors, choose Create.

  3. Enter the name CodeScene and the server address <server address>, and choose OAuth.

  4. Click Create, then continue with step 3.

  5. In a chat, add CodeScene from the + menu.

Claude Code

Claude Code connects from your computer, so it works wherever your browser reaches CodeScene.

  1. In a terminal, run:

     claude mcp add --transport http --scope user codescene <server address>
    
  2. Start claude, type /mcp, select codescene, and choose Authenticate. Continue with step 3.

Codex

For the Codex CLI and the IDE extension.

Codex connects from your computer, so it works wherever your browser reaches CodeScene.

  1. In a terminal, run:

     codex mcp add codescene --url <server address>
     codex mcp login codescene
    
  2. Continue with step 3.

VS Code

For GitHub Copilot chat.

VS Code connects from your computer, so it works wherever your browser reaches CodeScene.

  1. Open the Command Palette and run MCP: Open User Configuration.

  2. Add the server:

     {
       "mcpServers": {
         "codescene": {
           "type": "http",
           "url": "<server address>"
         }
       }
     }
    
  3. Click Start above the server entry and allow the sign-in. Continue with step 3.

  4. In Copilot chat, switch to Agent mode. The CodeScene tools are in the tools picker.

Cursor

Cursor connects from your computer, so it works wherever your browser reaches CodeScene.

  1. Open Cursor Settings → MCP & Integrations and choose Add Custom MCP.

  2. Add the server to ~/.cursor/mcp.json, including the client id:

     {
       "mcpServers": {
         "codescene": {
           "url": "<server address>",
           "auth": {
             "CLIENT_ID": "cs-remote-mcp",
             "scopes": ["remote-mcp.read"]
           }
         }
       }
     }
    
  3. Click Connect next to codescene. Continue with step 3.

Use the file in your home directory

A project’s own .cursor/mcp.json can hide the server from the agent, so the connection works once and then shows as disconnected.

Other assistants

Any assistant that supports a remote MCP server with OAuth sign-in can connect when it is allowed. Add the server address <server address>. If CodeScene says the assistant is not allowed, see If your assistant is not allowed.

Step 3: Approve the access

  1. The assistant opens CodeScene in your browser. Sign in if you are not already.

  2. CodeScene shows which assistant asks for access. Check it, and choose Approve.

To check the connection, ask the assistant: Which CodeScene projects can I see?

CodeScene remembers the approval. To disconnect, revoke it in Manage OAuth2 Authorizations and remove the server from the assistant.

Troubleshooting

What you see

What to do

“Not found” when you add the server

CodeScene is not turned on for your account or server yet. Contact your account executive to get access.

CodeScene says the assistant is not allowed

See If your assistant is not allowed.

The assistant finds no projects

It sees the projects you can open in CodeScene. Check that you approved the account that holds them.

The assistant says the analysis needs to be run again

Run a new analysis of the project.

The connection worked, then stopped

The access was revoked, or an admin removed the assistant from the allowed list. Connect again, or ask your admin.

  • If Claude or ChatGPT cannot reach the server, your CodeScene Host URL is not reachable from the internet. Use Claude Code, Codex, VS Code, or Cursor instead.

If your assistant is not allowed

CodeScene only lets known assistants sign in. Claude, Claude Code, ChatGPT, Codex, and VS Code are allowed by default. For any other assistant, from the quickest option:

  1. Set a client id. If the assistant lets you set an OAuth client id, use cs-remote-mcp with the scope remote-mcp.read, as in the Cursor steps. This works for assistants that run on your computer, not for web apps.

  2. Ask an admin to allow it, as described below.

  3. Contact CodeScene support with the assistant’s name. Widely used assistants are added to the defaults.

For administrators

Allow an assistant

An assistant identifies itself with the address of a description document. Find it in the assistant’s documentation, or in the client_id parameter of the failed sign-in page. The defaults are:

Assistant

Identified as

Claude

https://claude.ai/oauth/mcp-oauth-client-metadata

Claude Code

https://claude.ai/oauth/claude-code-client-metadata

ChatGPT

https://chatgpt.com/oauth/client.json

Codex

https://chatgpt.com/oauth/codex/client.json

VS Code

https://vscode.dev/oauth/client-metadata.json

Allow another assistant with a personal access token that has write scope. $CODESCENE_URL is https://codescene.io on CodeScene Cloud, and the CodeScene Host URL on your own server.

curl -X POST \
  -H "Authorization: Bearer $CODESCENE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"clientId": "https://assistant.example.com/oauth/client.json"}' \
  "$CODESCENE_URL/api/account/config/mcp/clients"

If CodeScene cannot fetch the description document, for example without outbound HTTPS or behind a proxy, send the document itself as metadata in the same request. The defaults work without outbound access.

Removing an assistant from the list stops new sign-ins at once. Users who already connected keep access until their sign-in expires, within an hour. To end a user’s access at once, delete the grant at /api/account/config/mcp/grants with the user’s id and the assistant’s client id.