Skip to content

OpenAI Responses MCP #6458

Open
Open
@cosbgn

Description

@cosbgn

Description

OpenAI just announced support for MCP like this:

curl https://api.openai.com/v1/responses -i \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-4.1",
    "tools": [
        {
            "type": "mcp",
            "server_label": "gitmcp",
            "server_url": "https://gitmcp.io/openai/tiktoken",
            "allowed_tools": ["search_tiktoken_documentation", "fetch_tiktoken_documentation"],
            "require_approval": "never"
        }
    ],
    "input": "how does tiktoken work?"
}'

I know also the ai-sdk has experimental_createMCPClient but as more API providers will have built in MCP I'm thinking that maybe it would be better to have a provider native way to use MCPs?

similar to openai.tools.webSearchPreview() we could also have openai.tools.mcp({options})

AI SDK Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions