Skip to content

Commit 45cd6f6

Browse files
authored
Add docs for Gemini code assist (#1426)
1 parent fad23ff commit 45cd6f6

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

docs/api/mcp/index.mdx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ You can also add the Sourcegraph MCP server as a locally-scoped server, which is
124124
1. Run the following command in your terminal:
125125

126126
```bash
127-
claude mcp add sourcegraph -s local --transport http https://your-sourcegraph-instance.com/.api/mcp/v1 --header "Authorization: token YOUR_ACCESS_TOKEN"
127+
claude mcp add --transport http sourcegraph https://your-sourcegraph-instance.com/.api/mcp/v1 \
128+
--header "Authorization: token YOUR_ACCESS_TOKEN"
128129
```
129130

130131
<Callout type="info">
@@ -133,6 +134,33 @@ You can also add the Sourcegraph MCP server as a locally-scoped server, which is
133134

134135
Locally-scoped servers take precedence over project-scoped servers with the same name and are stored in your project-specific user settings.
135136

137+
### Google Gemini Code Assist
138+
139+
You can add the Sourcegraph MCP server to Google Gemini Code Assist by configuring the `.gemini/settings.json` file:
140+
141+
1. Open or create the configuration file at `~/.gemini/settings.json` (or the equivalent path on your system).
142+
2. Add the following configuration:
143+
144+
```json
145+
{
146+
"mcpServers": {
147+
"sourcegraph": {
148+
"httpUrl": "https://your-sourcegraph-instance.com/.api/mcp/v1",
149+
"headers": {
150+
"Authorization": "token YOUR_ACCESS_TOKEN"
151+
}
152+
}
153+
}
154+
}
155+
```
156+
157+
<Callout type="info">
158+
Replace `your-sourcegraph-instance.com` with your Sourcegraph instance URL and `YOUR_ACCESS_TOKEN` with your access token.
159+
</Callout>
160+
161+
3. Save the configuration file.
162+
4. Restart Gemini Code Assist to apply the new configuration.
163+
136164
### Cursor
137165

138166
You can add the Sourcegraph MCP server to Cursor by configuring it in your MCP settings file:

0 commit comments

Comments
 (0)