The Responses API accepts MCP servers as first-class tools.
Minimal request shape:
curl https://api.openai.com/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1",
"input": "Where does my son live?",
"tools": [
{
"type": "mcp",
"server_label": "ownsona",
"server_url": "https://ownsona.example.com/mcp",
"headers": { "Authorization": "Bearer <OWNSONA_API_TOKEN>" },
"require_approval": "never"
}
]
}'
require_approval: "never" tells the API to call tools without
prompting the user. Suitable for backend services where there’s no
human in the loop.
A walk through one full interaction:
recall tool in the MCP server list and
decides the question needs it.
POST /mcp with bearer auth.
All of this happens server-side in OpenAI’s infrastructure — your code makes one HTTP call.