CleanClean
Agents

Cursor

Connect Clean to Cursor via MCP.

Cursor uses SSE transport. Add the following to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "clean": {
      "type": "sse",
      "url": "https://api.tryclean.ai/mcp/sse",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY",
        "X-Clean-Slug": "your-org-slug"
      }
    }
  }
}

Replace YOUR_API_KEY with your clean_sk_... key and your-org-slug with your organization slug.

Getting the config from the dashboard

Go to tryclean.ai/dashboard/onboarding, open the MCP Config step, and select the Cursor tab. The dashboard generates the config with your key and slug pre-filled.

You can either:

  • Run the terminal command: writes the config to ~/.cursor/mcp.json automatically
  • Copy the JSON: merge the clean entry into your existing ~/.cursor/mcp.json manually

If you're editing the file manually, merge the clean entry into the existing mcpServers object rather than replacing the whole file.

Open Cursor MCP settings

Alternatively, paste the config through Cursor's UI:

Settings > Features > MCP Servers > Add Server

Restart Cursor

Restart Cursor completely for the MCP server to be detected.

Verify

Open Cursor's MCP panel. You should see clean listed as a connected server with the search_code, index_repo, and list_repos tools.

On this page