CleanClean

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)Cloud
Transportstdio (agent launches the process)SSE / HTTP over the network
Where code is indexedOn your machine, in ~/.clean/Securely in the cloud
Setupgit clone + pip installSign up, install the GitHub App
AuthNoneAPI key + org slug
ReposLocal folders or public GitHub reposYour connected GitHub repos
Team sharingManual (copy the index)Built in
CostFree, self-hostedFree tier + paid plans
LicenseMITProprietary service

How it works

  1. 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.

  2. Search — Your agent calls search_code over MCP. Clean finds semantically similar code and expands each result with its call graph (callers, callees, and same-file neighbours).

  3. 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

AgentLocal (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:

On this page