CleanClean
Agents

Claude Code

Connect Clean to Claude Code via MCP.

Claude Code uses the SSE transport. Add the following to ~/.claude.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. Both are shown in the dashboard's MCP Config step.

Getting the config from the dashboard

The easiest way is to copy the pre-filled config block directly from tryclean.ai/dashboard/onboarding, the dashboard populates your API key and org slug automatically.

You can also run the terminal command shown on the dashboard, which writes the config file for you.

Claude Desktop

For Claude Desktop (not Claude Code CLI), use the stdio proxy instead:

{
  "mcpServers": {
    "clean": {
      "command": "npx",
      "args": ["-y", "@tryclean/mcp-proxy"],
      "env": {
        "CLEAN_API_KEY": "YOUR_API_KEY",
        "CLEAN_SLUG": "your-org-slug"
      }
    }
  }
}

Verify

In a Claude Code session:

> List MCP tools

You should see search_code, index_repo, and list_repos.

Using Clean in Claude Code

Just describe what you're looking for:

"Find the rate limiting middleware" "Show me how authentication is handled" "Search for the payment webhook handler"

Claude Code will call search_code automatically and return semantically matched functions with call graph context.

On this page