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

# OpenAI Responses API

> Connect Sagepilot MCP to OpenAI Responses API.

Use Sagepilot MCP as a remote MCP tool server in the OpenAI Responses API.

The Responses API example below uses an API client token because the request passes authentication directly. For browser-based ChatGPT connector setup, use [Hosted connectors](/mcp/hosted-connectors).

```python theme={null}
from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-5",
    tools=[
        {
            "type": "mcp",
            "server_label": "sagepilot",
            "server_url": "https://app.sagepilot.ai/mcp",
            "authorization": "Bearer sp_your_token",
            "require_approval": "never",
        }
    ],
    input="List the Sagepilot analytics datasets I can query.",
)

print(response.output_text)
```

For EU-hosted workspaces, use:

```text theme={null}
https://eu.sagepilot.ai/mcp
```
