---
title: "Sourcegraph MCP server"
url: "https://martechdb.com/vendors/sourcegraph"
markdown_url: "https://martechdb.com/vendors/sourcegraph.md"
api_url: "https://martechdb.com/api/v1/vendors/sourcegraph.com"
updated: "2026-10-01"
---

# Sourcegraph MCP server

The official MCP server published by Sourcegraph. MartechDB lists only servers the vendor publishes itself, never community servers.

- Website: [sourcegraph.com](https://sourcegraph.com)
- Categories: [Websites & apps](https://martechdb.com/categories/websites-apps.md)

## Sourcegraph MCP Server

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

- Address: https://{sourcegraph_hostname}/.api/mcp
- Runs: Hosted
- Sign-in: Sign-in: see vendor docs (`unknown`)
- Official MCP Registry: listed as `io.github.sourcegraph/mcp`
- Source code: https://github.com/sourcegraph-community/mcpregistry
- How we found it: Official MCP Registry, published under the vendor's name
- Last checked: October 2026, in our research

### Connect it

Claude Code:

```sh
claude mcp add --transport http sourcegraph 'https://{sourcegraph_hostname}/.api/mcp'
```

- Add to Cursor: <cursor://anysphere.cursor-deeplink/mcp/install?name=sourcegraph&config=eyJ1cmwiOiJodHRwczovL3tzb3VyY2VncmFwaF9ob3N0bmFtZX0vLmFwaS9tY3AifQ%3D%3D>
- Add to VS Code: <vscode:mcp/install?%7B%22name%22%3A%22sourcegraph%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2F%7Bsourcegraph_hostname%7D%2F.api%2Fmcp%22%7D>
- Claude.ai and Claude Desktop: Customize, Connectors, "+", Add custom connector, then paste https://{sourcegraph_hostname}/.api/mcp
- ChatGPT: Settings, Apps, Advanced settings, turn on Developer mode, Create, then paste https://{sourcegraph_hostname}/.api/mcp (this usually works only with servers that use self-serve sign-in or none)

JSON for Cursor, Windsurf and other clients that connect to hosted servers:

```json
{
    "mcpServers": {
        "sourcegraph": {
            "type": "http",
            "url": "https://{sourcegraph_hostname}/.api/mcp"
        }
    }
}
```

## Alternatives with an official MCP server

In Websites & apps:

- [Cloudflare](https://martechdb.com/vendors/cloudflare.md) (cloudflare.com)
- [Microsoft](https://martechdb.com/vendors/microsoft.md) (microsoft.com)
- [GitHub](https://martechdb.com/vendors/github.md) (github.com)
- [WordPress](https://martechdb.com/vendors/wordpress.md) (wordpress.org)

## Get this data

- API: `curl https://martechdb.com/api/v1/vendors/sourcegraph.com`
- MCP: `claude mcp add --transport http martechdb https://martechdb.com/mcp`, then ask about Sourcegraph.
- Web page: https://martechdb.com/vendors/sourcegraph
