Semantic code search

Code search your
agent can reason with.

Clean MCP gives Claude Code, Cursor, and any MCP client meaning-aware code search — tree-sitter parsing, a call graph, and local embeddings, from one server.

Hosted cloud, or free open source — up to you. MIT · no lock-in.

clean · mcp · stdio

find the function that validates email on signup

search_code("email validation on signup")
validateEmail()
auth/signup.ts · 0.94
export function validateEmail(input: string) {
return EMAIL_RE.test(input.trim());
}
callershandleSignupvalidateFormcalleesEMAIL_RE.test

full source + callers/callees · one call

// works with your MCP client
Claude CodeCursorCodexWindsurfAntigravity
What it does

Built for how agents actually read code.

Semantic retrieval, a real call graph, and tiered results — so your agent spends tokens on the right code, not on grepping.

01

Semantic search

Describe behaviour, not keywords. Finds code by what it does — “the function that validates email on signup.”

02

Local-only by default

Embeddings, metadata, and source live in ~/.clean/. Nothing leaves your machine. No API keys, no telemetry.

03

MCP-native

Drops into Claude Code, Cursor, Codex, or any MCP client over stdio. One line of config.

04

Index anything

Point it at a local folder or a public GitHub repo. Clone-and-index happens in the background.

05

Tree-sitter parsing

Real AST parsing for Python, JavaScript, and TypeScript — not regex guesswork.

06

Call-graph aware

Results carry direct callers and callees, so the agent sees how a function is actually used.

Two ways to run it

Self-host it free, or let us run it.

Same semantic search either way. Pick what fits — your laptop or our cloud.

Open sourceFree · MIT

Runs entirely on your laptop. Indexes stay on disk in ~/.clean/. No account, no API keys, no telemetry.

  • 100% local — nothing leaves your machine
  • Index local folders or public GitHub repos
  • Python 3.10–3.13 · pip install and go
  • Hackable, self-hostable, yours forever
install
git clone https://github.com/cleanmcp/clean-mcp.git
python -m pip install -e ".[dev]"
claude mcp add clean -- python -m clean.local.mcp_server
View on GitHub
CloudHosted

Managed indexing and shared context for your whole team. Zero setup, always-on, indexes kept warm.

  • No install — connect your MCP client in one step
  • Team-wide shared index & context sync
  • Background re-indexing keeps repos fresh
  • Org management, API keys, and usage in one dashboard
.mcp.json
{
  "mcpServers": {
    "clean": {
      "command": "npx",
      "args": ["-y", "mcp-remote",
        "https://api.tryclean.ai/mcp/sse",
        "--header", "Authorization:Bearer <key>"]
    }
  }
}
Start free
Ship faster

Give your agent real code search.

Spin up the open-source server in a minute, or skip setup with the cloud. Same search, your choice.