Frictionless MCP server setup
The Sourcegraph MCP server, and our new Deep Search tools, can now be connected via OAuth to your AI agents with minimal configuration required.

The Sourcegraph MCP server, and our new Deep Search tools, can now be connected via OAuth to your AI agents with minimal configuration required.
The Sourcegraph MCP server now supports OAuth authentication using the OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591). This makes using the new Deep Search tool easier than ever.
Previously, connecting an AI agent like Claude Code or Amp to your Sourcegraph MCP server required specifying an access token header or creating an OAuth client for agents that supported specifying a custom client ID. Now, you can connect most AI agents to the Sourcegraph MCP server with one command.
For example, for Amp, you can run:
amp mcp add sg https://sourcegraph.example.com/.api/mcp
For Claude Code, you can run:
claude mcp add --transport http sg https://sourcegraph.example.com/.api/mcp
This works similarly for other MCP-compatible agents.
To enable this feature, set the site setting auth.idpDynamicClientRegistrationEnabled to true. We plan to enable this feature by default in the future.
The MCP server now offers different endpoints with specialized tool suites for different use cases:
/.api/mcp — The full suite of Sourcegraph tools for code search, navigation, and analysis/.api/mcp/deepsearch — A focused Deep Search subagentThe /.api/mcp/v1 endpoint still exists with the same tool names as before.
deepsearch_read tool to read existing Deep Search threadssg_ prefix has been removed from all MCP tool names, following the conventions adopted by other MCP providers