Sourcegraph MCP Server
About
Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.
Use this server
Add it to your MCP client. The catalogue lists this config verbatim from its source — it does not run, download, or vouch for the server. Review the command before you run it.
TransportHTTP (remote server)
Claude Code
claude mcp add --transport http mcp 'https://{sourcegraph_hostname}/.api/mcp'
Cursor
If the button doesn't open Cursor, use the JSON below — Cursor accepts the same mcpServers config.
VS Code
code --add-mcp '{"name":"mcp","type":"http","url":"https://{sourcegraph_hostname}/.api/mcp"}'
JSON
{
"mcpServers": {
"mcp": {
"url": "https://{sourcegraph_hostname}/.api/mcp"
}
}
}