Skip to main content
Glama

zoekt-mcp

MCP server for Zoekt code search.

Quick Start

# 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:6070

Related MCP server: Semantic Code Search MCP Server

CLI Usage

zoekt-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

Environment Variables

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.

Tools

  • search - Search code with Zoekt query syntax

  • list_repos - List indexed repositories

  • file_content - Get file contents from a repository

Claude Desktop

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"
      }
    }
  }
}

Development

bun install
ZOEKT_URL=http://localhost:6070 bun run dev
bun test

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Exposes Sourcegraph Zoekt code search to MCP-capable AI agents, enabling fast, indexed regex/symbol-aware code search over repositories.
      3
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI coding agents with structured access to indexed codebases via semantic search, symbol analysis, and file reading tools.
      13
      Server Side Public , v 1
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides two-modal code search (lexical via Zoekt and semantic via ChromaDB embeddings) for AI coding agents through MCP tools, enabling fast regex and meaning-based code lookup.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to perform local hybrid code search and code intelligence across a workspace, including semantic and full-text search, symbol lookup, file outlines, and caller analysis.
      MIT