From c835dbad6b2c10bec78c1fe3678ef38642db61d0 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 11 Nov 2025 13:13:35 -0800 Subject: [PATCH 1/3] Add 'type' field to Claude MCP server configuration --- docs/api/mcp/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api/mcp/index.mdx b/docs/api/mcp/index.mdx index cfa418b0d..05cb224a8 100644 --- a/docs/api/mcp/index.mdx +++ b/docs/api/mcp/index.mdx @@ -100,6 +100,7 @@ You can add the Sourcegraph MCP server to [Claude Code](https://claude.ai/code) { "mcpServers": { "sourcegraph": { + "type": "http", "url": "https://your-sourcegraph-instance.com/.api/mcp/v1", "headers": { "Authorization": "token YOUR_ACCESS_TOKEN" From 0d41160bd5778a9566ad4c5cf01e70d274e2b926 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 11 Nov 2025 16:09:46 -0800 Subject: [PATCH 2/3] Update MCP documentation to change transport method in command example --- docs/api/mcp/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/mcp/index.mdx b/docs/api/mcp/index.mdx index 05cb224a8..5c0a9a9fe 100644 --- a/docs/api/mcp/index.mdx +++ b/docs/api/mcp/index.mdx @@ -124,7 +124,7 @@ You can also add the Sourcegraph MCP server as a locally-scoped server, which is 1. Run the following command in your terminal: ```bash - claude mcp add sourcegraph -s local --url https://your-sourcegraph-instance.com/.api/mcp/v1 --header "Authorization: token YOUR_ACCESS_TOKEN" + claude mcp add sourcegraph -s local --transport http https://your-sourcegraph-instance.com/.api/mcp/v1 --header "Authorization: token YOUR_ACCESS_TOKEN" ``` From 39253b19a141cf14d6ab67025c09206625f71a0a Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 11 Nov 2025 16:24:48 -0800 Subject: [PATCH 3/3] Add Cursor configuration instructions for Sourcegraph MCP server in documentation --- docs/api/mcp/index.mdx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/api/mcp/index.mdx b/docs/api/mcp/index.mdx index 5c0a9a9fe..cd1d80b1a 100644 --- a/docs/api/mcp/index.mdx +++ b/docs/api/mcp/index.mdx @@ -133,6 +133,34 @@ You can also add the Sourcegraph MCP server as a locally-scoped server, which is Locally-scoped servers take precedence over project-scoped servers with the same name and are stored in your project-specific user settings. +### Cursor + +You can add the Sourcegraph MCP server to Cursor by configuring it in your MCP settings file: + +1. Open or create the MCP configuration file at `~/.cursor/mcp.json` (or the equivalent path on your system). +2. Add the following configuration: + + ```json + { + "mcpServers": { + "sourcegraph": { + "type": "http", + "url": "https://your-sourcegraph-instance.com/.api/mcp/v1", + "headers": { + "Authorization": "token YOUR_ACCESS_TOKEN" + } + } + } + } + ``` + + + Replace `your-sourcegraph-instance.com` with your Sourcegraph instance URL and `YOUR_ACCESS_TOKEN` with your access token. Note that Cursor requires the `type: "http"` field to be explicitly specified. + + +3. Save the configuration file. +4. Restart Cursor to apply the new configuration. + ## Available Tools