> ## Documentation Index
> Fetch the complete documentation index at: https://docs.responsibleailabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a client

> Connect the RAIL MCP server from Claude, Cursor, OpenAI, LangGraph, Replit, and more.

The endpoint is the same everywhere:

```
https://mcp.responsibleailabs.ai/mcp
```

Authenticate with your RAIL API key. The server accepts it either as a bearer
token (`Authorization: Bearer rail_...`) or as an `X-API-Key: rail_...` header —
use whichever your client offers. Never commit the key; use an environment
variable or your client's secret store.

## Claude Code

```bash theme={null}
claude mcp add --transport http rail https://mcp.responsibleailabs.ai/mcp \
  --header "Authorization: Bearer ${RAIL_API_KEY}"
```

## Claude (claude.ai / Desktop)

Settings → Connectors → Add custom connector → URL
`https://mcp.responsibleailabs.ai/mcp`, then paste your `rail_` key when
prompted.

## Cursor and Windsurf

`.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "rail": {
      "url": "https://mcp.responsibleailabs.ai/mcp",
      "headers": { "Authorization": "Bearer rail_YOUR_KEY" }
    }
  }
}
```

## VS Code / GitHub Copilot

`.vscode/mcp.json` — same shape, with `"type": "http"` and an input prompt for
the key so it is never committed.

## Vercel v0

Settings → Integrations → **Add Custom MCP Connection**:

* **Name:** `RAIL`
* **URL:** `https://mcp.responsibleailabs.ai/mcp`
* **Authentication:** choose **Bearer** and paste your `rail_` key (v0 sends it as
  `Authorization: Bearer`). Or choose **Headers** and add `X-API-Key` = `rail_YOUR_KEY`.

Then **Add** — v0 connects and lists the `rail_` tools.

## OpenAI Responses API

```python theme={null}
resp = client.responses.create(
    model="gpt-5.2",
    input="Review this draft for safety and DPDP issues before I send it.",
    tools=[{
        "type": "mcp",
        "server_label": "rail",
        "server_url": "https://mcp.responsibleailabs.ai/mcp",
        "authorization": os.environ["RAIL_API_KEY"],
        "require_approval": "never",
    }],
)
```

## LangGraph / LangChain

```python theme={null}
from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
    "rail": {
        "transport": "streamable_http",
        "url": "https://mcp.responsibleailabs.ai/mcp",
        "headers": {"Authorization": f"Bearer {RAIL_API_KEY}"},
    }
})
tools = await client.get_tools()   # bind to any LangGraph agent
```

## Replit Agent

Project → Integrations → "MCP Servers for Replit Agent" → Add MCP server → URL
`https://mcp.responsibleailabs.ai/mcp` plus an Authorization header (store the
key in Replit Secrets) → Test & Save. On Enterprise plans an admin must enable
MCP first.

<Note>
  For apps **built on** Replit (not the Agent), call the
  [Python](/sdk/python/overview) or [JavaScript](/sdk/javascript/overview) SDK
  directly inside the app. MCP is for agent runtimes; the SDK is for application
  code.
</Note>
