diff --git a/docs/api/mcp/index.mdx b/docs/api/mcp/index.mdx index cd1d80b1a..9e9d3837f 100644 --- a/docs/api/mcp/index.mdx +++ b/docs/api/mcp/index.mdx @@ -124,7 +124,8 @@ 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 --transport http https://your-sourcegraph-instance.com/.api/mcp/v1 --header "Authorization: token YOUR_ACCESS_TOKEN" + claude mcp add --transport http sourcegraph https://your-sourcegraph-instance.com/.api/mcp/v1 \ + --header "Authorization: token YOUR_ACCESS_TOKEN" ``` @@ -133,6 +134,33 @@ 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. +### Google Gemini Code Assist + +You can add the Sourcegraph MCP server to Google Gemini Code Assist by configuring the `.gemini/settings.json` file: + +1. Open or create the configuration file at `~/.gemini/settings.json` (or the equivalent path on your system). +2. Add the following configuration: + + ```json + { + "mcpServers": { + "sourcegraph": { + "httpUrl": "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. + + +3. Save the configuration file. +4. Restart Gemini Code Assist to apply the new configuration. + ### Cursor You can add the Sourcegraph MCP server to Cursor by configuring it in your MCP settings file: