Self-Hosting (Local)
Where Your Data Lives
What the local Clean MCP server stores on disk, and how to back it up or reset it.
The local edition keeps everything on disk under ~/.clean/. Nothing is sent anywhere.
What each path holds
index/— the LanceDB vector tables. Each entity row stores its embedding plus itsfile_path,line_start/line_end,name, fullcode, and call-graph edges, so a search returns everything needed to locate the code without touching the filesystem.metadata.db— a SQLite database tracking each indexed project: repo name, branch, status, entity count, and detected language/framework.repos/— checkouts of public GitHub repos you indexed withindex_repo'srepomode. Local-folder indexing never clones anything here.stats.json— lifetime token-savings totals reported byget_token_savings.
Back up or reset
- Back up the
~/.clean/folder to preserve your indexes. - Delete it to start completely fresh — the next index rebuilds it.
Relocating it
Each location can be moved independently with environment variables — see Configuration:
| Variable | Default |
|---|---|
CLEAN_REPOS_DIR | ~/.clean/repos |
CLEAN_DB_PATH | ~/.clean/metadata.db |
CLEAN_PERSIST_PATH | ~/.clean/index |
To remove a single repo's data instead of the whole folder, use delete_repo.