Zoekt MCP logo

Zoekt MCP

Indexed Zoekt code search over MCP with repository listing and file retrieval.

Install Zoekt MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "zoekt-mcp": {
      "command": "uvx",
      "args": [
        "zoekt-mcp"
      ],
      "env": {
        "ZOEKT_URL": "YOUR_VALUE_HERE",
        "ZOEKT_REPOS_DIR": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx zoekt-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

zoekt-mcp MCP server connects MCP-capable AI clients to a self-hosted Sourcegraph Zoekt webserver. It runs as a Python stdio process and sends HTTP JSON requests to the Zoekt backend for indexed code search, repository listing, and file retrieval. Use it when an agent needs regex- or symbol-aware searches across one or more local code repositories. Docker Compose runs the webserver and one-shot indexer, while the MCP process can be installed with uvx or launched from a container.

Use cases

  • Search indexed repositories for symbol definitions
  • Locate matching code across multiple repositories
  • List repositories available to an agent
  • Retrieve a selected file after a search

Key features

  • Zoekt-backed indexed code search
  • Regex- and symbol-aware queries
  • Repository listing with index metadata
  • File retrieval by repository, path, and branch
  • Stdio MCP transport
  • uvx and Docker installation paths

Tools3

What Zoekt MCP lets your agent do. Expand a tool for its parameters.

Self-reported~60 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · zoekt-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit7mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed3Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Zoekt MCP works

What zoekt-mcp does

zoekt-mcp MCP server exposes Sourcegraph Zoekt through three MCP tools: search_code, list_repos, and get_file. It is intended for AI agents that need to locate code in indexed repositories and then inspect the contents of selected files.

search_code returns search timing, file and match counts, and matching files. Each file result can include its repository, path, language, branches, matching lines, text ranges, and symbols. Queries can use Zoekt search syntax, including repository scoping such as repo:project-a, and symbol-oriented searches such as sym:getVideoId.

list_repos reports the repositories known to the backend, including names, URLs, branches, and index times. get_file retrieves file content for a repository, path, and branch. Together, these tools support a search-then-read workflow without requiring the agent to scan a source tree directly.

How it works

The MCP component is a Python application built with FastMCP. MCP clients start it as a subprocess over stdio, and it communicates with a separately running zoekt-webserver over HTTP JSON. The tools map to the backend's search, repository-listing, and file-printing endpoints.

The backend uses a Zoekt index stored in a Docker volume. A one-shot indexer reads a directory supplied to the Compose stack and makes each top-level subdirectory available as a searchable repository. This allows one backend to index multiple codebases and lets searches run across all indexed repositories or be narrowed with a repository qualifier.

The MCP process does not manage the backend lifecycle. You must start the Docker Compose stack yourself and configure the MCP process with the backend URL. The zoekt-mcp MCP server can be obtained from PyPI through uvx or run from the published GitHub Container Registry image; cloning the repository is not required for those installation paths.

Setup and configuration

The backend requires Docker with Compose v2. Download the release Compose file and its indexing helper, set ZOEKT_REPOS_DIR to a parent directory containing the repositories to index, and run docker compose up -d. On macOS and Windows, the directory must be available through Docker Desktop file sharing.

The MCP client needs either uv/uvx or Docker. With uvx, configure the client to run uvx zoekt-mcp; with the container method, run ghcr.io/radiovisual/zoekt-mcp:latest using interactive stdio. Set ZOEKT_URL to the Zoekt webserver address, such as http://localhost:6070. When the MCP process runs inside Docker on Docker Desktop, use host.docker.internal rather than localhost to reach a host-side backend.

The README provides configurations for Claude Code, Claude Desktop, and Cursor. Server versions can be pinned in either installation path by selecting a package version or container tag. Restart the client after adding the MCP configuration so the tools are loaded.

Tools and capabilities

  • search_code: Search the Zoekt index and return structured file matches, lines, ranges, symbols, counts, and duration.
  • list_repos: Enumerate repositories available from the configured Zoekt backend with branch and index metadata.
  • get_file: Retrieve the content of a specified file and branch from a repository.
  • Repository scoping: Restrict searches with Zoekt qualifiers such as repo:project-a.
  • Symbol-aware queries: Search for definitions or references using Zoekt symbol query syntax when indexed symbol data is available.

Limitations and notes

The backend must be running separately; zoekt-mcp does not start, stop, or refresh the Docker services. Search results depend on the contents of the Zoekt index, so changes to source repositories require the indexing workflow to run again. The server communicates with a Zoekt webserver rather than indexing files itself. Docker Desktop users must account for host networking and file-sharing rules when choosing the backend directory and URL.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Zoekt MCP

zoekt-mcp is an MCP server that connects AI clients to a self-hosted Sourcegraph Zoekt webserver. Its main tools are search_code for indexed, regex- or symbol-aware code search, list_repos for repository metadata, and get_file for retrieving file contents by repository, path, and branch.

Install it with uvx or run its published Docker image. The uvx path uses `uvx zoekt-mcp`, while the container path uses `ghcr.io/radiovisual/zoekt-mcp:latest`; both are configured as stdio MCP processes. You also need Docker Compose for the separate Zoekt backend.

Set `ZOEKT_REPOS_DIR` to a parent directory whose top-level subdirectories should be indexed, then start the provided Docker Compose stack. Configure the MCP process with `ZOEKT_URL`, pointing to the running Zoekt webserver, commonly `http://localhost:6070`.

Yes, the README provides a Cursor MCP configuration. Add the server to `~/.cursor/mcp.json` or a project-level `.cursor/mcp.json`, launch it with uvx or Docker, set `ZOEKT_URL`, and restart Cursor so the three tools appear.

Yes, it can search multiple repositories indexed by one Zoekt backend. Each top-level directory under `ZOEKT_REPOS_DIR` becomes a repository, and queries can search across all of them or use a qualifier such as `repo:project-a` to narrow the scope.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewZoekt MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/zoekt-mcp?style=directory)](https://allmcps.com/mcp/zoekt-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/zoekt-mcp"><img src="https://allmcps.com/api/badge/zoekt-mcp?style=directory" alt="Zoekt MCP on AllMCPs" /></a>