Sourcegraph

Official Sourcegraph Developer tools

Lets an agent use Sourcegraph for code, semantic, and diff searches and to find definitions and references. Summary written by AI Index.

The registry’s description: Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.

Remote server Needs a value: sourcegraph_hostname

Add to your client

Add the Sourcegraph MCP server to Claude Code

  1. Run the command

    claude mcp add --transport http sourcegraph https://<sourcegraph_hostname>/.api/mcp
  2. Fill in the values ↓

  3. Check it’s connected

If the file already has servers, add the entry inside the existing object. To check it’s connected, restart or reload the client and look for sourcegraph in its list of MCP servers. A server that needs sign-in opens it on first use.

What you fill in

Required values appear as <NAME> placeholders in the snippets; add optional ones the same way. Descriptions are the server’s registry entry’s.

  • <sourcegraph_hostname> Value Required

    Hostname of your Sourcegraph instance (e.g., sourcegraph.mycompany.com)

Client compatibility

By transport: whether the client’s docs list a transport this server offers. It doesn’t cover sign-in or other requirements.

Sources

This data comes from the Official MCP Registry.