Sourcegraph MCP Server

Official registry Developer tools

Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

Remote (streamable-http)
Claude Code
claude mcp add --transport http sourcegraph-mcp-server 'https://{sourcegraph_hostname}/.api/mcp'
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "sourcegraph-mcp-server": {
            "type": "http",
            "url": "https://{sourcegraph_hostname}/.api/mcp"
        }
    }
}

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Sourcegraph MCP Server

This registry entry represents the Sourcegraph MCP server for a Sourcegraph instance. It can be configured against Sourcegraph Cloud or a private Sourcegraph deployment, so users can connect MCP-compatible clients to their own Sourcegraph server.

At a high level, the Sourcegraph MCP server gives agents and applications access to Sourcegraph code search and code intelligence capabilities through a standard MCP interface. That includes common workflows such as repository discovery, file reads, keyword and semantic search, symbol navigation, references, and code-change exploration.

Configuration

Configure the server with the hostname of your Sourcegraph instance. This entry uses the standard Sourcegraph MCP endpoint:

https://{sourcegraph_hostname}/.api/mcp

For private Sourcegraph instances, set sourcegraph_hostname to your internal or company-hosted Sourcegraph server hostname.

Authentication is handled by Sourcegraph. Depending on the MCP client, this is typically done with browser-based OAuth or a Sourcegraph access token. This MCP config defaults to OAuth.

Notes

This README intentionally keeps client-specific setup details light because MCP integration steps can change over time. For the current Sourcegraph MCP server behavior, supported authentication modes, and client-specific setup instructions, see the official Sourcegraph documentation:

https://sourcegraph.com/docs/api/mcp#sourcegraph-mcp-server

Frequently asked questions

What is Sourcegraph MCP Server?

Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.

How do I install Sourcegraph MCP Server?

It runs as a remote server. In Claude Code: claude mcp add --transport http sourcegraph-mcp-server 'https://{sourcegraph_hostname}/.api/mcp'. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Sourcegraph MCP Server need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is Sourcegraph MCP Server open source?

Its code is public on GitHub, but the repository does not declare a standard license.

Who maintains Sourcegraph MCP Server?

It is published by sourcegraph-community. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.