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 your browser, so you don’t need a token.

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 this host name. Other names for the same server, such as its IP address, are 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.

GitHub Copilot

You can use Copilot in VS Code or in the terminal with the Copilot CLI. We recommend VS Code: CodeScene allows it by default, and it guides you through the sign-in.

Each has its own configuration file, and the formats differ: VS Code uses servers, the Copilot CLI uses mcpServers. Follow the steps for the one you use.

Both connect from your computer, so they work wherever your browser reaches CodeScene.

Copilot CLI

  1. Add the server under mcpServers in ~/.copilot/mcp-config.json:

     {
       "mcpServers": {
         "codescene": {
           "type": "http",
           "url": "<server address>"
         }
       }
     }
    

    Or run /mcp add in copilot and enter the same name, type, and address.

  2. Start copilot. It opens CodeScene in your browser. Continue with step 3.

    If CodeScene says the assistant is not allowed, see If your assistant is not allowed.

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 .cursor/mcp.json inside a project can hide the server from the agent. The connection then works once and shows as disconnected afterwards.

Kiro

For the Kiro IDE and the Kiro CLI, which share one configuration file.

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

  1. Add the server to ~/.kiro/settings/mcp.json, including the client id and the callback address:

     {
       "mcpServers": {
         "codescene": {
           "url": "<server address>",
           "oauthScopes": ["remote-mcp.read"],
           "oauth": {
             "clientId": "cs-remote-mcp",
             "redirectUri": "http://127.0.0.1:33420/callback"
           }
         }
       }
     }
    

    If port 33420 is in use on your computer, pick another port, but keep the path /callback.

  2. Save the file. In the Kiro panel, codescene shows as Unauthenticated under MCP Servers. Click Authenticate. Kiro opens CodeScene in your browser. Continue with step 3.

    The Kiro panel with the codescene MCP server marked Unauthenticated and an Authenticate button next to it

Other assistants

Other assistants can connect if they support remote MCP servers with OAuth sign-in. 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 is asking for access. If it’s the one you’re connecting, 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 only the projects you can open in CodeScene. Check that you approved the account that has 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, GitHub Copilot, Cursor, or Kiro instead.

  • If GitHub Copilot cannot connect but other assistants can, your server may only allow TLS 1.3, which Copilot doesn’t support yet. Turn on TLS 1.2 where HTTPS is set up for CodeScene, such as your reverse proxy or load balancer.

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 other assistants, try these in order:

  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 and Kiro steps. If you can also set the callback address, use http://127.0.0.1:<port>/callback. This only 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

Each assistant identifies itself with the web address of a description document. You find it in the assistant’s documentation, or in the client_id parameter in the address 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 are already connected keep access for up to an hour, until their sign-in expires. 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.