code-search MCP server
Commit Nov 9, 2026Enables an AI client to search, find, and replace code across multiple repositories using a self-hosted Zoekt-powered engine.
Also known as techquestsdev/code-search
- Stars
- 9
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 9, 2026
- License
- Apache-2.0
What is code-search MCP?
code-search enables an AI client to search, find, and replace code across multiple repositories using a self-hosted Zoekt-powered engine.
Summary generated from the project's README
About code-search MCP server
Searching and modifying code across massive repository collections is what this tool enables for engineering teams. It uses a self-hosted Zoekt engine to provide sub-second search results across millions of lines of code while keeping all data on your own infrastructure. This setup is ideal for organizations that require high privacy and control over their source code.
Users connect their existing GitHub, GitLab, Gitea, or Bitbucket accounts by providing a platform token to sync repositories. The system can be deployed via Docker and managed through a web interface or a command line interface. It supports bulk operations like finding and replacing strings across hundreds of repositories, even automating the creation of merge requests or pull requests to handle the changes.
For larger organizations, the enterprise edition offers OIDC single sign-on with providers like Okta or Google Workspace, role-based access control using glob patterns, and audit logging. The architecture relies on a Go-based API server, PostgreSQL for data, and Redis for job queuing to ensure high performance during large-scale indexing tasks.
What you can do with it
- 1Perform bulk code updatesAn AI client can execute a find and replace operation across many repositories and automatically create pull requests for the changes.
- 2Search large codebases quicklyDevelopers can search for specific deprecated functions or strings across millions of lines of code in milliseconds.
- 3Maintain code privacyTeams can host the entire search engine on their own infrastructure to ensure code never leaves their servers.
- 4Automate repository managementUsers can use the command line to list repositories or trigger a synchronization of all connected sources.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachabletechquestsdev/code-search is public and reachablegithub.com/techquestsdev/code-search ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/techquestsdev/code-search ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubCode Search
Search, find, and replace code across all your repositories in milliseconds.
A self-hosted code search and bulk operations platform. Powered by Zoekt (the same search engine Google uses internally), designed for teams that need speed, privacy, and control.
Features
- Lightning Fast Search — Sub-second search across millions of lines of code
- Bulk Replace — Find and replace across hundreds of repos with automated MR/PR creation
- Privacy First — Self-hosted on your infrastructure; your code never leaves your servers
- Multi-Platform — GitHub, GitLab, Gitea, and Bitbucket support
- Developer Experience — Modern Web UI and powerful CLI for automation
Enterprise Features (Open Alpha)
The Enterprise Edition is currently in open alpha — free to use while in early access, no pricing, no commitment. Request a license via the contact page to get started.
- OIDC Single Sign-On — Integrate with Okta, Azure AD, Google Workspace, and more.
- Role-Based Access Control — Fine-grained repository permissions with glob patterns.
- Audit Logging — Full compliance trail of searches, file access, and administrative actions.
- Horizontal Scaling — Scale to thousands of repositories with sharded indexing and API servers.
- License Management — Centrally manage seats and feature access.
Quick Start
Get searching in 2 minutes with Docker:
# Download and start all services
curl -O https://raw.githubusercontent.com/techquestsdev/code-search/main/docker-compose.yml
docker compose up -d
# Open the web UI
open http://localhost:3000
Then:
- Go to Connections → Add Connection
- Add your GitHub/GitLab token
- Click Sync to discover repositories
- Start searching!
CLI Usage
The CLI is designed for power users and CI/CD automation:
# Search across all repositories
code-search search "deprecated_function" --repos "myorg/*"
# Find and replace with automatic MR creation
code-search replace "v1.0.0" "v2.0.0" \
--repos "myorg/*" \
--execute \
--mr-title "Upgrade to v2.0.0"
# Repository management
code-search repo list
code-search repo sync --all
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Web UI / CLI │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ API Server │
└─────────────────────────────────────────────────────────────────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Zoekt │ │ PostgreSQL │ │ Redis │
│(Search Index)│ │ (Data) │ │ (Queue) │
└──────────────┘ └──────────────┘ └──────────────┘
▲
│
┌─────────────────────────────────────────────────────────────────┐
│ Indexer Service │
│ (Clones repos from GitHub/GitLab/Gitea/Bitbucket) │
└─────────────────────────────────────────────────────────────────┘
Development
Prerequisites: Go 1.21+, Node.js 20+, PostgreSQL 16+, Redis 7+
# Clone the repository
git clone https://github.com/techquestsdev/code-search.git
cd code-search
# Start infrastructure (PostgreSQL, Redis, Zoekt)
make dev-infra
# Build all binaries
make build
# Run services (in separate terminals)
make dev-api # API Server → http://localhost:8080
make dev-indexer # Indexer Service
make dev-web # Web UI → http://localhost:3000
Tech Stack
| Component | Technology | Purpose |
|---|---|---|
| Backend | Go | High-performance API server |
| Frontend | Next.js | Modern, responsive web interface |
| CLI | Go + Cobra | Fast, scriptable command line |
| Search Engine | Zoekt | Trigram-based code search |
| Database | PostgreSQL / MySQL | Reliable data persistence |
| Queue | Redis | Job queue and caching |
Documentation
| Resource | Description |
|---|---|
| Getting Started | Introduction and quick start |
| Installation | Docker, Kubernetes, Helm guides |
| Configuration | All configuration options |
| CLI Reference | Command line documentation |
| API Reference | REST API documentation |
| Architecture | System design and data flow |
Contributing
We welcome contributions! Please see our CONTRIBUTING.md for details on the process and our Individual Contributor License Agreement (ICLA).
License
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
Acknowledgments
Built with inspiration from Sourcegraph and powered by Zoekt.
code-search MCP questions
Which platforms are supported?
The platform supports GitHub, GitLab, Gitea, and Bitbucket.
How can I perform bulk operations?
You can use the bulk replace feature to find and replace code across hundreds of repositories with automated MR/PR creation.
Is my code kept private?
Yes, because it is self-hosted on your own infrastructure, your code never leaves your servers.
Can I use this in a CI/CD pipeline?
Yes, the CLI is specifically designed for power users and CI/CD automation.