What is Clean?
Semantic code search for AI coding agents, with call graph context. Run it locally as an open-source MCP server, or use the hosted cloud.
Clean is an MCP server that gives your AI coding agent meaning-aware memory of your codebase. Instead of pasting files into context or hoping your agent guesses the right filename, Clean lets it search by intent — find authentication logic, payment flows, or error handlers across an entire repo in milliseconds.
It parses your code with tree-sitter, builds a call graph, embeds every function with a sentence-transformer model, and stores everything in LanceDB. Search results come back with full source, the file path and line range, and the surrounding callers and callees.
Two ways to run Clean
Clean comes in two editions that expose the same MCP tools. Pick whichever fits how you work — you can also use both.
Local (open source)
A stdio MCP server that runs on your laptop. Indexes stay on disk in ~/.clean/. No cloud, no API keys, no telemetry. MIT-licensed at github.com/cleanmcp/clean-mcp.
Cloud
A hosted service at mcp.tryclean.ai. Connect GitHub repos through a dashboard, share indexes across your team, and connect agents with an API key — nothing to install or keep running.
| Local (open source) | Cloud | |
|---|---|---|
| Transport | stdio (agent launches the process) | SSE / HTTP over the network |
| Where code is indexed | On your machine, in ~/.clean/ | Securely in the cloud |
| Setup | git clone + pip install | Sign up, install the GitHub App |
| Auth | None | API key + org slug |
| Repos | Local folders or public GitHub repos | Your connected GitHub repos |
| Team sharing | Manual (copy the index) | Built in |
| Cost | Free, self-hosted | Free tier + paid plans |
| License | MIT | Proprietary service |
How it works
-
Index — Clean parses Python, JavaScript, and TypeScript with tree-sitter and embeds every function, class, and method. Locally this happens on your machine; in the cloud it runs on Clean's servers.
-
Search — Your agent calls
search_codeover MCP. Clean finds semantically similar code and expands each result with its call graph (callers, callees, and same-file neighbours). -
Context — Results are returned as a compact tiered summary in TOON format — 30–40% fewer tokens than raw JSON — so your agent fits more understanding into each request.
Supported agents
| Agent | Local (stdio) | Cloud (SSE/HTTP) |
|---|---|---|
| Claude Code | ✓ | ✓ |
| Cursor | ✓ | ✓ |
| Claude Desktop | ✓ | ✓ |
| Antigravity | ✓ | ✓ |
| Codex | ✓ | ✓ |
Any MCP-compatible client works — these are just the ones with ready-made config snippets.
Get started
Follow the Quickstart to be running in a few minutes, or jump straight in:
- Cloud: Sign up → Set up Clean → Connect your agents
- Local: Install from source → Connect your agents
- Reference: All MCP tools · How Clean reduces cost