How to add ClearRun to VS Code

Add a clearrun entry under servers in .vscode/mcp.json. Use "${env:CLEARRUN_API_KEY}" as the key value so the key stays out of the file.

Last updated

Steps

  1. Set the key in your environment

    export CLEARRUN_API_KEY=YOUR_CLEARRUN_API_KEY

    Start VS Code from that shell, or set the variable for your user account.

  2. Create .vscode/mcp.json

    {
      "servers": {
        "clearrun": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@clearrun/mcp"],
          "env": {
            "CLEARRUN_API_KEY": "${env:CLEARRUN_API_KEY}"
          }
        }
      }
    }

    VS Code uses servers, not mcpServers.

  3. Start the server and try it

    Start clearrun from the MCP view, then ask the chat to use clearrun_score on an answer.

For every workspace

Run the command MCP: Open User Configuration and add the same entry there.