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:

 https://codescene.io/mcp

CodeScene turns this on per account. If your assistant answers “not found” when you add the address, contact your account executive to get access.

Step 2: Add CodeScene to your assistant

Follow the steps for your assistant. They already contain the server address.

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.

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

  2. Enter the name CodeScene and the server address https://codescene.io/mcp. 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.

  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 https://codescene.io/mcp, and choose OAuth.

  4. Click Create, then continue with step 3.

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

Claude Code

  1. In a terminal, run:

     claude mcp add --transport http --scope user codescene https://codescene.io/mcp
    
  2. Start claude, type /mcp, select codescene, and choose Authenticate. Continue with step 3.

Codex

For the Codex CLI and the IDE extension.

  1. In a terminal, run:

     codex mcp add codescene --url https://codescene.io/mcp
     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. CodeScene allows both by default. For Copilot in JetBrains IDEs, see JetBrains IDEs.

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.

VS Code

  1. Open the Command Palette and run MCP: Open User Configuration. This opens mcp.json.

  2. Add the server under servers:

     {
       "servers": {
         "codescene": {
           "type": "http",
           "url": "https://codescene.io/mcp"
         }
       }
     }
    
  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.

Copilot CLI

Needs Copilot CLI 1.0.92 or later. Run copilot update first if you have an older version.

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

     {
       "mcpServers": {
         "codescene": {
           "type": "http",
           "url": "https://codescene.io/mcp"
         }
       }
     }
    

    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 Copilot asks for a client id, or the sign-in fails with MCP connection failed, add the client id to the server entry and run /mcp auth codescene:

     {
       "mcpServers": {
         "codescene": {
           "type": "http",
           "url": "https://codescene.io/mcp",
           "oauthClientId": "cs-remote-mcp",
           "oauthScopes": ["remote-mcp.read"]
         }
       }
     }
    

JetBrains IDEs

For JetBrains AI Assistant, Junie, and GitHub Copilot in IntelliJ IDEA, PyCharm, and the other JetBrains IDEs.

  1. Add a remote MCP server with the address https://codescene.io/mcp. Where to add it depends on the assistant, for example Settings → Tools → AI Assistant → Model Context Protocol (MCP).

  2. Start the server. The IDE says that CodeScene doesn’t support automatic client registration and asks for a client registration.

  3. Enter the client id cs-remote-mcp and leave the client secret empty. If the IDE asks for a scope, enter remote-mcp.read.

  4. The IDE opens CodeScene in your browser. Continue with step 3.

Cursor

  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": "https://codescene.io/mcp",
           "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.

The same steps connect Kiro to codescene.io.

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

     {
       "mcpServers": {
         "codescene": {
           "url": "https://codescene.io/mcp",
           "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 https://codescene.io/mcp. 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.

When you belong to more than one account, choose the account on the same page. The assistant reads the projects of that account.

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

CodeScene remembers the approval. To disconnect, revoke it in Manage OAuth2 CLI And IDE Sessions and remove the server from the assistant.

Switch account

Ask the assistant to list your CodeScene accounts and switch to another one. You stay signed in. The switch applies to that assistant only, and does not change the account selected on codescene.io.

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 the approval page does not list an account you belong to, CodeScene is not turned on for that account.

If your assistant is not allowed

CodeScene only lets known assistants sign in. Claude, Claude Code, ChatGPT, Codex, VS Code, and the GitHub Copilot CLI 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 JetBrains, 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

GitHub Copilot CLI

https://github.com/copilot/cli/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"

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.