What is Clean?
Persistent codebase memory for AI coding agents — semantic code search with call graph context.
Clean is a self-hosted MCP server that gives your AI coding agent persistent, semantic memory of your codebase.
Instead of pasting files into context or hoping your agent guesses the right filename, Clean lets it search by intent — finding authentication logic, payment flows, or error handlers across your entire repo in milliseconds.
How it works
-
Index — Clean scans your repos, parses Python/JS/TS with tree-sitter, and embeds every function and class using a local model. No API calls. Code never leaves your machine.
-
Search — Your agent calls
search_codevia MCP. Clean finds semantically similar code and expands results with the full call graph — callers, callees, and related functions up to 5 hops deep. -
Context — Results come back in TOON format, 30–40% fewer tokens than JSON so your agent can fit more context per request.
Supported agents
| Agent | Status |
|---|---|
| Claude Code | ✓ |
| Cursor | ✓ |
| Antigravity | ✓ |
| Codex | ✓ |
Get started
Follow the Quickstart to be up and running in 5 minutes, or jump straight to the step-by-step guide: