{"id":36742984,"url":"https://github.com/divar-ir/zoekt-mcp","last_synced_at":"2026-01-12T12:30:18.366Z","repository":{"id":306560377,"uuid":"1026589079","full_name":"divar-ir/zoekt-mcp","owner":"divar-ir","description":"MCP server for Zoekt","archived":false,"fork":false,"pushed_at":"2025-11-25T10:07:22.000Z","size":24,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-28T16:24:48.969Z","etag":null,"topics":["ai","codesearch","context","mcp","mcp-server","zoekt"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divar-ir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-26T07:31:10.000Z","updated_at":"2025-11-25T10:07:25.000Z","dependencies_parsed_at":"2025-07-26T13:29:32.746Z","dependency_job_id":"42495fd7-caff-41f4-9a9f-5c851376797c","html_url":"https://github.com/divar-ir/zoekt-mcp","commit_stats":null,"previous_names":["divar-ir/zoekt-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/divar-ir/zoekt-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divar-ir%2Fzoekt-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divar-ir%2Fzoekt-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divar-ir%2Fzoekt-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divar-ir%2Fzoekt-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divar-ir","download_url":"https://codeload.github.com/divar-ir/zoekt-mcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divar-ir%2Fzoekt-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","codesearch","context","mcp","mcp-server","zoekt"],"created_at":"2026-01-12T12:30:18.297Z","updated_at":"2026-01-12T12:30:18.350Z","avatar_url":"https://github.com/divar-ir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zoekt MCP Server\n\nA Model Context Protocol (MCP) server that provides code search capabilities powered by [Zoekt](https://github.com/sourcegraph/zoekt), the indexed code search engine used by Sourcegraph.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n  - [Using UV (recommended)](#using-uv-recommended)\n  - [Using pip](#using-pip)\n  - [Using Docker](#using-docker)\n- [Configuration](#configuration)\n  - [Required Environment Variables](#required-environment-variables)\n  - [Optional Environment Variables](#optional-environment-variables)\n- [Usage with AI Tools](#usage-with-ai-tools)\n  - [Cursor](#cursor)\n- [MCP Tools](#mcp-tools)\n  - [search](#search)\n  - [search_prompt_guide](#search_prompt_guide)\n  - [fetch_content](#fetch_content)\n- [Development](#development)\n  - [Linting and Formatting](#linting-and-formatting)\n\n## Overview\n\nThis MCP server integrates with Zoekt, a text search engine optimized for code repositories. Zoekt provides trigram-based indexing for searches across large codebases, making it suitable for AI assistants that need to find and understand code patterns.\n\n## Features\n\n- **Code Search**: Search across codebases using Zoekt's trigram indexing\n- **Advanced Query Language**: Support for regex patterns, file filters, language filters, and boolean operators\n- **Repository Discovery**: Find repositories by name and explore their structure\n- **Content Fetching**: Browse repository files and directories\n- **AI Integration**: Designed for LLM integration with guided search prompts\n\n## Prerequisites\n\n- **Zoekt Instance**: You need access to a running Zoekt search server. See the [Zoekt documentation](https://github.com/sourcegraph/zoekt#installation) for setup instructions.\n- **Python 3.10+**: Required for running the MCP server\n- **UV** (optional): Modern Python package manager for easier dependency management\n\n## Installation\n\n### Using UV (recommended)\n\n```bash\n# Install dependencies\nuv sync\n\n# Run the server\nuv run python src/main.py\n```\n\n### Using pip\n\n```bash\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install package\npip install -e .\n\n# Run the server\npython src/main.py\n```\n\n### Using Docker\n\n```bash\n# Build the image\ndocker build -t zoekt-mcp .\n\n# Run the container with default ports\ndocker run -p 8000:8000 -p 8080:8080 \\\n  -e ZOEKT_API_URL=http://your-zoekt-instance \\\n  zoekt-mcp\n\n# Or run with custom ports\ndocker run -p 9000:9000 -p 9080:9080 \\\n  -e ZOEKT_API_URL=http://your-zoekt-instance \\\n  -e MCP_SSE_PORT=9000 \\\n  -e MCP_STREAMABLE_HTTP_PORT=9080 \\\n  zoekt-mcp\n```\n\n## Configuration\n\n### Required Environment Variables\n\n- `ZOEKT_API_URL`: URL of your Zoekt search instance\n\n### Optional Environment Variables\n\n- `MCP_SSE_PORT`: SSE server port (default: 8000)\n- `MCP_STREAMABLE_HTTP_PORT`: HTTP server port (default: 8080)\n\n## Usage with AI Tools\n\n### Cursor\n\nAfter running the MCP server, add the following to your `.cursor/mcp.json` file:\n\n```json\n{\n  \"mcpServers\": {\n    \"zoekt\": {\n      \"url\": \"http://localhost:8080/zoekt/mcp/\"\n    }\n   }\n}\n```\n\n## MCP Tools\n\nThis server provides three powerful tools for AI assistants:\n\n### 🔍 search\nSearch across indexed codebases using Zoekt's advanced query syntax with support for regex, language filters, and boolean operators.\n\n### 📖 search_prompt_guide\nGenerate a context-aware guide for constructing effective search queries based on your specific objective.\n\n### 📂 fetch_content\nRetrieve file contents or explore directory structures from indexed repositories.\n\n\n## Development\n\n### Linting and Formatting\n\n```bash\n# Check code style\nuv run ruff check src/\n\n# Format code\nuv run ruff format src/\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivar-ir%2Fzoekt-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivar-ir%2Fzoekt-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivar-ir%2Fzoekt-mcp/lists"}