CleanClean
API Reference

MCP Tools

The tools Clean exposes to AI agents via the Model Context Protocol.

When connected via MCP, Clean exposes three tools to your agent.

search_code

Semantic search across an indexed repository.

Input schema

{
  "query": "authentication middleware",
  "repo": "owner/repo",
  "k": 10
}
FieldTypeRequiredDescription
querystringNatural language search query
repostringRepository in owner/repo format
kintegerNumber of results (default: 10)

Output

TOON-formatted search results with call graph context. Equivalent to GET /search.


index_repo

Trigger indexing for a repository.

Input schema

{
  "repo": "owner/repo"
}

Output

Indexing status and job ID.


list_repos

List all repositories that have been indexed.

Input schema

No input required.

Output

Array of indexed repositories with their status, entity count, and last indexed timestamp.


MCP endpoints

AgentTransportEndpoint
Claude CodeStreamable HTTPhttp://localhost:8000/mcp
Claude DesktopSSEhttp://localhost:8000/mcp/sse
CursorSSEhttp://localhost:8000/mcp/sse
AntigravityStreamable HTTPhttp://localhost:8000/mcp
CodexStreamable HTTPhttp://localhost:8000/mcp

On this page