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

~/.clean/
├── index/         LanceDB vector store
├── metadata.db    SQLite — which repos are indexed, their status
├── repos/         git clones (only for GitHub-mode indexing)
└── stats.json     cumulative token-savings counters

What each path holds

  • index/ — the LanceDB vector tables. Each entity row stores its embedding plus its file_path, line_start/line_end, name, full code, 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 with index_repo's repo mode. Local-folder indexing never clones anything here.
  • stats.json — lifetime token-savings totals reported by get_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:

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

On this page