io.github.radiovisual/zoekt-mcp
Fast indexed code search for AI agents, powered by Sourcegraph Zoekt.
Versions
0.3.0latestTools 3
search_code Run a Zoekt query against the indexed corpus. Query syntax highlights: - ``repo:NAME`` restrict to repos whose name matches NAME (regex) - ``file:PATH`` restrict to files whose path matches PATH (regex) - ``lang:LANGUAGE`` restrict to a language (``python``, ``go``, ...) - ``sym:IDENT`` match symbol definitions (functions, classes, ...) - ``case:yes`` case-sensitive content match - ``/regex/`` regex content match (literal match by default) - whitespace is AND; use ``or`` for boolean OR Examples: - ``lang:python def hello`` — Python files containing ``def hello`` - ``sym:users`` — anything that defines a ``users`` symbol - ``repo:flask-app file:app.py`` — within one file of one repo Returns a compact object with ``files`` (each containing ``repo``, ``file``, ``language``, and ``matches``) plus top-level stats. Results are capped at ``max_results`` files.
list_repos List indexed repositories. ``filter`` is an optional ``repo:`` atom (e.g. ``repo:flask`` or ``repo:.`` for all) used to narrow the list. Leave empty to list every indexed repository. Returns ``{"repos": [{name, url, branches, ...}, ...], "count": N}``.
get_file Fetch the full contents of a file from an indexed repository. ``repo`` is the repository name as reported by ``list_repos``; ``path`` is the file path within that repo; ``branch`` defaults to ``HEAD`` but can be any branch zoekt has indexed. Returns ``{"repo", "path", "branch", "content"}``.
Permissions 3
network medium filesystem low env_vars low