Sourcegraph MCP
by Sourcegraph
Official listing: built and published by Sourcegraph. More from Sourcegraph
Searches code, jumps to definitions and references, and reads files and commit history across your Sourcegraph instance's repositories, for coding agents on Enterprise plans.
Use it now
Keep it with up to 9 other tools you're setting up, then share them all as one link.
Try this first
Ask your assistant, with Sourcegraph MCP connected:
- Code Search
Use Sourcegraph MCP to search code across repositories: ‹what you're looking for›
- Go to Definition and References
Use Sourcegraph MCP to find a symbol's definition from a usage: ‹what you're looking for›
- Commit and Diff Search
Use Sourcegraph MCP to search commit messages, authors, and code changes across repositories: ‹what you're looking for›
Connect it over MCP
Connect Sourcegraph MCP as an MCP server, following its setup instructions at https://sourcegraph.com/docs/api/mcp/client-integrations
Setup guide: sourcegraph.com/docs/api/mcp/client-integrations
Compare
Press Compare to add it to the tray at the bottom of the window, then pick up to 2 others anywhere on the site.
- Access
- MCP
- Auth
- OAuth 2.0
- Skills
- 5
Skills
Code Search
Searches code across repositories by exact keyword or natural language, with repo, file, and revision filters.
Go to Definition and References
Finds a symbol's definition from a usage and lists every reference to it, across repositories with compiler-level accuracy.
Commit and Diff Search
Searches commit messages, authors, and code changes across repositories, and compares two revisions file by file.
Read Repository Files
Reads file contents by line range and revision, lists directories, and finds repositories, branches, and tags by name.
Deep Search
Answers complex codebase questions through Deep Search conversations and reads past Deep Search results back as context.