# Connect AI clients

Add your project's MCP server to Claude Code, Claude, ChatGPT, Cursor, VS Code, Gemini CLI, the OpenAI API or the xAI API.

Replace the URL below with your project's — the **Connect** button in the project shows ready-to-copy snippets with your URL filled in.

```text
https://my-api.fn.wispfn.com/_mcp
```

Use the published URL for anything long-lived. Use `/_mcp?test` to try the draft.

## Claude Code

```bash
claude mcp add --transport http my-api https://my-api.fn.wispfn.com/_mcp
```

With API keys required, add `--header "Authorization: Bearer wpk_..."`. Start Claude Code and check with `/mcp`.

## Claude (web and desktop)

1. Open **Settings → Connectors** (on Team and Enterprise, an owner adds it in **Organization settings → Connectors**).
2. Choose **Add custom connector**, give it a name and paste the URL.

Claude connects from its cloud, so use a deployed URL, not localhost. Custom connectors can't send headers.

## ChatGPT

1. Open **Settings → Apps & Connectors → Advanced settings** and turn on **Developer mode**.
2. In **Apps & Connectors**, choose **Create**, name it, paste the URL and choose **No authentication**.
3. In a chat, enable the connector from the tools menu.

Availability depends on your ChatGPT plan.

## Cursor

Add to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one repository):

```json
{
  "mcpServers": {
    "my-api": {
      "url": "https://my-api.fn.wispfn.com/_mcp",
      "headers": { "Authorization": "Bearer wpk_..." }
    }
  }
}
```

Leave out `headers` if the project doesn't require API keys.

## VS Code

Add to `.vscode/mcp.json`, then start the server from the file or the MCP view and use it in Copilot agent mode:

```json
{
  "servers": {
    "my-api": { "type": "http", "url": "https://my-api.fn.wispfn.com/_mcp" }
  }
}
```

## Gemini CLI

Add to `~/.gemini/settings.json` — note `httpUrl`, not `url` — then restart and check with `/mcp`:

```json
{
  "mcpServers": {
    "my-api": { "httpUrl": "https://my-api.fn.wispfn.com/_mcp" }
  }
}
```

## OpenAI API

Pass the server as a remote MCP tool in the Responses API:

```python
from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="gpt-5",
    tools=[{
        "type": "mcp",
        "server_label": "my_api",
        "server_url": "https://my-api.fn.wispfn.com/_mcp",
        "require_approval": "never",
    }],
    input="What's the status of order 1042?",
)
print(response.output_text)
```

## xAI API (Grok)

The xAI API is compatible with the same Responses format:

```python
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.x.ai/v1", api_key=os.environ["XAI_API_KEY"])
response = client.responses.create(
    model="grok-4.3",
    tools=[{"type": "mcp", "server_label": "my_api", "server_url": "https://my-api.fn.wispfn.com/_mcp"}],
    input="What's the status of order 1042?",
)
```

## Other clients

Any MCP client that supports remote servers over Streamable HTTP can connect to the URL, with the `Authorization` header if the project requires API keys.
