MCP server for Zoekt code search.
# Run with npx (no install required)
npx zoekt-mcp --url http://localhost:6070
# Or install globally
npm install -g zoekt-mcp
zoekt-mcp --url http://localhost:6070zoekt-mcp [OPTIONS]
OPTIONS:
--url <url> Zoekt webserver URL (required, or set ZOEKT_URL)
--transport <mode> Transport mode: "http" or "stdio" (default: auto-detect)
--port <number> HTTP server port (default: 3000)
--host <address> HTTP server host (default: 0.0.0.0)
--log-level <level> Log level: debug, info, warn, error (default: info)
--timeout <ms> Zoekt request timeout in ms (default: 30000)
--help, -h Show help
--version, -v Show version
EXAMPLES:
zoekt-mcp --url http://localhost:6070
zoekt-mcp --url http://localhost:6070 --transport stdio
zoekt-mcp --url http://localhost:6070 --port 8080 --log-level debug
| Variable | Default | Description |
|---|---|---|
ZOEKT_URL |
(required) | Zoekt webserver URL |
MCP_TRANSPORT |
auto-detect | http or stdio |
MCP_PORT |
3000 |
HTTP server port |
MCP_HOST |
0.0.0.0 |
HTTP server host |
LOG_LEVEL |
info |
debug, info, warn, error |
ZOEKT_TIMEOUT_MS |
30000 |
Request timeout in milliseconds |
CLI flags take precedence over environment variables.
search- Search code with Zoekt query syntaxlist_repos- List indexed repositoriesfile_content- Get file contents from a repository
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"zoekt": {
"command": "npx",
"args": ["zoekt-mcp", "--url", "http://localhost:6070", "--transport", "stdio"]
}
}
}Or with environment variables:
{
"mcpServers": {
"zoekt": {
"command": "zoekt-mcp",
"env": {
"ZOEKT_URL": "http://localhost:6070",
"MCP_TRANSPORT": "stdio"
}
}
}
}bun install
ZOEKT_URL=http://localhost:6070 bun run dev
bun testMIT