# Sourcegraph
Code intelligence for teams that need to search, understand, and change large codebases.
Listing: https://bestaithings.com/tool/sourcegraph

Website: https://sourcegraph.com/
Categories: Software Dev
Pricing: Paid, from $16K
Runs on: Web, Linux
Public API: yes
MCP server: yes
License: proprietary
Listing updated: 2026-11-17

Sourcegraph indexes an organization's repositories so engineers and AI coding agents can search, understand, and change code across all of them at once. It is built for large codebases, including very large monorepos and multi-repo setups across major code hosts.

Code Search returns exact, deterministic, and exhaustive results, with symbol search and code navigation for tracing dependencies. Deep Search takes complex questions in natural language and returns answers grounded in the code, with citations. Agents and tools such as Claude Code, Cursor, Codex, and Amp can reach the same code graph through an MCP server, GraphQL and REST APIs, and a CLI.

For changes, Agentic Batch Changes applies one change across hundreds of repositories. Insights and code monitoring track metrics and activity across the codebase. Deployment is single-tenant cloud or self-hosted, with SSO (SAML, OpenID Connect, OAuth), SCIM provisioning, and RBAC.

### What you can do with it

- **Search every repository.** Code Search finds exact matches across all your code, so you can trace an error message or locate every use of a deprecated API.
- **Ask questions in plain language.** Deep Search answers with citations to the code, which lets engineers and agents work from facts about the codebase.
- **Read large diffs.** Diff Tour turns a big diff into a guided reading path, with related files grouped and explained for reviewers.
- **Change code at scale.** Agentic Batch Changes updates dependencies, fixes patterns, and refactors across many repositories in one operation.
- **Give coding agents context.** The MCP server, APIs, and CLI feed codebase knowledge to AI coding agents for cross-repo work.
- **Track code health.** Insights and code monitoring show high-level metrics and changes over time.

### Who it's for

Sourcegraph suits engineering organizations with large or sprawling codebases: platform teams running migrations, developers onboarding to unfamiliar code, security and SRE teams tracing risk and root causes, and teams adopting AI coding agents. It is sold to enterprises through sales, so it is not aimed at individual developers or small projects.

## Questions
Q: Is Sourcegraph free?
A: No. Sourcegraph is a paid tool, with plans from $16K.
Q: Which AI coding agents work with Sourcegraph?
A: Sourcegraph works with Claude Code, Cursor, Codex, Amp, and more. Agents connect through the MCP server, the GraphQL and REST APIs, or the CLI to get context from your codebase.
Q: Can Sourcegraph be self-hosted?
A: Yes, Sourcegraph offers both a single-tenant cloud and a self-hosted deployment. Enterprise authentication includes SSO via SAML, OpenID Connect, and OAuth, plus SCIM provisioning and RBAC.
Q: How does Sourcegraph handle code and data security?
A: Sourcegraph is SOC2 Type II and ISO27001 compliant. It uses zero data retention for LLM inference, so inference is not stored beyond what is required and is not shared with third parties.
Q: Can Sourcegraph search public code?
A: Yes, Sourcegraph has a Public Code Search that searches across more than 1M public repositories.
Q: Does Sourcegraph have an API?
A: Yes. Sourcegraph has a public API, and its documentation is linked at the top of this page.
Q: Does Sourcegraph have an MCP server?
A: Yes. Sourcegraph has an MCP server, so AI assistants such as Claude and ChatGPT can use it directly.
Q: What are some alternatives to Sourcegraph?
A: Other tools listed here for similar work include Qodo, CodeRabbit, and Claude Code.
