Sourcegraph MCP Server
Updated June 2026The Sourcegraph MCP server, built by najva-ai, provides najva-ai's Sourcegraph MCP Server is a Python server that gives AI assistants AI-enhanced code search across large, multi-repo codebases using Sourcegraph's query engine. It is community-built and best for Search.
by najva-ai
About
najva-ai's Sourcegraph MCP Server is a Python server that gives AI assistants AI-enhanced code search across large, multi-repo codebases using Sourcegraph's query engine. It exposes three tools: `search` (run Sourcegraph queries with full advanced syntax — regex patterns, `lang:`/`file:`/`repo:` filters, and boolean operators — across sourcegraph.com or a self-hosted instance), `search_prompt_guide` (generate a context-aware guide that helps the model construct effective queries for a stated objective), and `fetch_content` (retrieve file contents or explore directory structures inside a repository). Auth is via a `SRC_ENDPOINT` environment variable (required — e.g. https://sourcegraph.com) plus an optional `SRC_ACCESS_TOKEN` for private instances. The server runs locally over SSE / Streamable-HTTP (default ports 8000/8080) and is installed from source with UV (`uv sync && uv run python -m src.main`), pip (`pip install -e .`), or a bundled Dockerfile; clients like Cursor connect by pointing `.cursor/mcp.json` at the local `http://localhost:8080/sourcegraph/mcp/` URL. It's ideal for agents that need to find and understand code patterns across many repositories rather than a single local checkout.
Installation
uv sync && uv run python -m src.mainCategories
Frequently Asked Questions
What is Sourcegraph MCP Server?
Who built Sourcegraph MCP Server?
Is Sourcegraph MCP Server free?
How do I install Sourcegraph MCP Server?
What does Sourcegraph MCP Server integrate with?
Repo Health
Local/stdio install — runs on your machine, so there is no remote endpoint to verify live. Trust signal below is from the source repo.
Repo recency not yet available for this server.
Quick Info
- Install Type
- source
- Author
- najva-ai
- Categories
- 2
- Integrations
- 5
Related Servers
Everything
Reference/test server with prompts, resources, and tools. Perfect for testing MCP implementations.
Git
Tools to read, search, and manipulate Git repositories. Full Git operations support.
Sequential Thinking
Dynamic and reflective problem-solving through thought sequences.
21st.dev Magic
Create crafted UI components inspired by the best 21st.dev design engineers.
Apify MCP Server
The Apify MCP server gives AI agents access to 6,000+ ready-made cloud scrapers, crawlers, and automation tools on the Apify Store — no infrastructure required. Connect to Apify Actors that extract data from social media platforms (Instagram, TikTok, LinkedIn), search engines (Google, Bing), e-commerce sites (Amazon, eBay), maps (Google Maps), and virtually any website. Each Actor runs in the cloud with managed proxies, browser fingerprinting, and anti-bot bypass built in. Use the Apify MCP server to query Actors by task, stream results directly into your AI context, run custom scraping Actors from your Apify account, and chain multiple data extraction steps in a single workflow. Supports tool filtering to expose only the Actors you need, and integrates with Apify's RAG web browser Actor for retrieval-augmented generation use cases.
Sponsored
Better Stack
Free PlanGet alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.
Start monitoring free →