Skip to content

Commit 5d1849a

Browse files
committed
docs: add self-hosted MCP configuration examples
1 parent 21cbbba commit 5d1849a

1 file changed

Lines changed: 104 additions & 6 deletions

File tree

packages/docs/mcp-server.mdx

Lines changed: 104 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,15 @@ Save and reload Windsurf.
222222

223223
If you're connecting to a self-hosted Comp AI deployment instead of the hosted Comp AI service, you must include the `--server-url` argument in your MCP server configuration.
224224

225-
Hosted Comp AI users do not need to specify --server-url.
225+
Hosted Comp AI users do not need to specify `--server-url`.
226226

227-
### Example
227+
Choose your AI client below and update its configuration by adding the `--server-url` argument.
228+
229+
<Tabs>
230+
231+
<Tab title="Claude Desktop">
232+
233+
Update the manual JSON configuration by adding the `--server-url` argument.
228234

229235
```json
230236
{
@@ -244,14 +250,106 @@ Hosted Comp AI users do not need to specify --server-url.
244250
}
245251
}
246252
```
253+
</Tab>
254+
255+
<Tab title="Cursor">
256+
257+
Update the manual JSON configuration by adding the `--server-url` argument.
258+
259+
```json
260+
{
261+
"command": "npx",
262+
"args": [
263+
"-y",
264+
"@trycompai/mcp-server",
265+
"start",
266+
"--apikey",
267+
"comp_your_api_key_here",
268+
"--server-url",
269+
"https://your-self-hosted-comp-api.example.com"
270+
]
271+
}
272+
```
273+
</Tab>
274+
275+
<Tab title="VS Code">
276+
277+
Update your MCP configuration by adding the `--server-url` argument.
278+
279+
```json
280+
{
281+
"command": "npx",
282+
"args": [
283+
"-y",
284+
"@trycompai/mcp-server",
285+
"start",
286+
"--apikey",
287+
"comp_your_api_key_here",
288+
"--server-url",
289+
"https://your-self-hosted-comp-api.example.com"
290+
]
291+
}
292+
```
293+
</Tab>
294+
295+
<Tab title="Claude Code (CLI)">
296+
297+
Append the `--server-url` argument to your existing installation command.
298+
299+
```bash
300+
claude mcp add CompAI -- npx -y @trycompai/mcp-server start \
301+
--apikey comp_your_api_key_here \
302+
--server-url https://your-self-hosted-comp-api.example.com
303+
```
304+
</Tab>
305+
306+
<Tab title="Codex CLI">
307+
308+
Append the `--server-url` argument to your existing installation command.
309+
310+
```bash
311+
codex mcp add comp-ai -- npx -y @trycompai/mcp-server start \
312+
--apikey comp_your_api_key_here \
313+
--server-url https://your-self-hosted-comp-api.example.com
314+
```
315+
</Tab>
316+
317+
<Tab title="Gemini CLI">
318+
319+
Append the `--server-url` argument to your existing installation command.
320+
321+
```bash
322+
gemini mcp add CompAI -- npx -y @trycompai/mcp-server start \
323+
--apikey comp_your_api_key_here \
324+
--server-url https://your-self-hosted-comp-api.example.com
325+
```
326+
</Tab>
327+
328+
<Tab title="Windsurf">
247329

248-
For CLI-based clients, append:
330+
Update your MCP configuration by adding the `--server-url` argument.
249331

250-
```text
251-
--server-url https://your-self-hosted-comp-api.example.com
332+
```json
333+
{
334+
"mcpServers": {
335+
"comp-ai": {
336+
"command": "npx",
337+
"args": [
338+
"-y",
339+
"@trycompai/mcp-server",
340+
"start",
341+
"--apikey",
342+
"comp_your_api_key_here",
343+
"--server-url",
344+
"https://your-self-hosted-comp-api.example.com"
345+
]
346+
}
347+
}
348+
}
252349
```
350+
</Tab>
253351

254-
to the existing installation command.
352+
</Tabs>
255353

256354
That's it. The first time you start a chat in your AI client after install, the assistant will discover the Comp AI tools and start using them.
257355

0 commit comments

Comments
 (0)