Skip to main content
Watch: I Built an AI App Without Leaving Databricks

MCP client - OpenAI - verified

How to add an MCP server to OpenAI Agents SDK

Where to add MCP servers in OpenAI Agents SDK: In code: pass MCPServerStdio, MCPServerStreamableHttp or MCPServerSse instances to Agent(mcp_servers=[...]), or add a HostedMCPTool to the agent's tools. Its docs list support for stdio, Streamable HTTP and SSE. Its docs do not say whether it handles OAuth for remote servers.

OpenAI Agents SDK homepage - OpenAI Agents SDK in our tools directory - Compare all MCP clients

Kind
SDK or framework
stdio
Yes
Streamable HTTP
Yes
SSE
Yes

Add a server

Where the config lives
In code: pass MCPServerStdio, MCPServerStreamableHttp or MCPServerSse instances to Agent(mcp_servers=[...]), or add a HostedMCPTool to the agent's tools

The OpenAI Agents SDK docs publish no copyable config example; servers are added through the steps above. The full walkthrough is in the official docs (openai.github.io).

Which server?

Pick a server from the verified directory of official MCP servers. Each one lists its transport, auth and the setup snippets its vendor publishes, so you can match it to what OpenAI Agents SDK supports.

MCP support

What the OpenAI Agents SDK docs say it supports. Not stated means the docs do not say either way.

OpenAI Agents SDK MCP features, transports and OAuth, each with its source
FeatureValueSource
ToolsCalls the functions a server exposes.Yesopenai.github.io/openai-agents-python/mcp
ResourcesReads data and files a server exposes as resources.Yesopenai.github.io/openai-agents-python/mcp
PromptsOffers a server's prompt templates to the user.Yesopenai.github.io/openai-agents-python/mcp
SamplingLets a server ask the client's model for a completion.Not statedDocs do not say
RootsTells a server which directories it may work in.Not statedDocs do not say
ElicitationLets a server ask the user for input mid-task.Not statedDocs do not say
DiscoveryPicks up tools, prompts or resources a server adds or removes while connected.Not statedDocs do not say
InstructionsUses the instructions a server sends when it connects.Not statedDocs do not say
stdioStarts a local server as a subprocess.Yesopenai.github.io/openai-agents-python/mcp
Streamable HTTPConnects to a remote server over the current HTTP transport.Yesopenai.github.io/openai-agents-python/mcp
SSEConnects over the older HTTP+SSE transport.Yesopenai.github.io/openai-agents-python/mcp
OAuthSigns in to remote servers with OAuth.Not statedDocs do not say

Worth knowing

Besides local server classes, HostedMCPTool lets the OpenAI Responses API list and call a remote MCP server's tools on the model's behalf.

FAQ

Where is the OpenAI Agents SDK MCP config?

In code: pass MCPServerStdio, MCPServerStreamableHttp or MCPServerSse instances to Agent(mcp_servers=[...]), or add a HostedMCPTool to the agent's tools. Its docs publish no copyable config example; setup steps are at https://openai.github.io/openai-agents-python/mcp/

Does OpenAI Agents SDK support remote MCP servers over Streamable HTTP?

Yes, per https://openai.github.io/openai-agents-python/mcp/. Its docs list support for stdio, Streamable HTTP and SSE.

Does OpenAI Agents SDK support OAuth for MCP servers?

Its docs do not say whether it handles OAuth for remote servers.

Which MCP features does OpenAI Agents SDK support?

Its docs list Tools, Resources and Prompts. They do not state Sampling, Roots, Elicitation, Discovery and Instructions.

Sources

Last verified from the pages below.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.