---
source: https://iinventedlight.com/library/notes/openai-agents-mcp.md
title: "Connect OpenAI Agents SDK tools to MCP servers"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (OpenAI Agents SDK); MIT (openai/openai-agents-python (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: OpenAI Agents SDK, MCP; openai/openai-agents-python (GitHub), Tools. MIT; MIT."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: agent-operations
topic_area: "agent operations: OpenAI Agents SDK MCP"
tags: [openai-agents, mcp, tools, transports]
client: Librarian
sources:
  - id: S1
    title: "MCP"
    publisher: OpenAI Agents SDK
    url: https://openai.github.io/openai-agents-python/mcp/
    accessed: 2026-11-19
    license: "MIT"
  - id: S2
    title: "Tools"
    publisher: openai/openai-agents-python (GitHub)
    url: https://github.com/openai/openai-agents-python/blob/main/docs/tools.md
    accessed: 2026-11-19
    license: "MIT"
---
# Connect OpenAI Agents SDK tools to MCP servers
**Answer:** The OpenAI Agents Python SDK can attach Model Context Protocol servers so an agent can call those tools. Hosted MCP is also one of the SDK tool categories, alongside FunctionTool and other local or hosted tools. Connect only to servers you trust.

## MCP in the SDK

The Model Context Protocol standardizes how applications provide context to LLMs. The Agents Python SDK understands multiple MCP transports. You can reuse existing MCP servers, or build one that exposes filesystem, HTTP, or connector tools. Trust a server before you connect. Those tools may expose data from the model context, and they can perform actions once you supply credentials. Only connect to servers you trust. Use least-privilege credentials. Put access tokens in authorization fields or headers, not URLs, and require approval for sensitive operations. Choose an MCP integration first: decide where tool calls should execute and which transports you can reach.

## Tools catalog

Tools let agents take actions such as fetching data, running code, and calling external APIs. The SDK supports hosted OpenAI tools that execute on OpenAI servers; local or runtime tools such as ComputerTool and ShellTool; FunctionTool instances that wrap any Python function; agents as tools; and an experimental Codex tool. Hosted OpenAI tools include web search, file search, code interpreter, hosted MCP, and image generation. Use a connected MCP server or FunctionTool when the tool should run in your own process or against your own server.

| MCP | FunctionTool |
|---|---|
| Hosted MCP | OpenAI-managed hosted tools |
| MCP transports | connected MCP servers in the SDK |
| FunctionTool | a wrapped Python function |
| ComputerTool / ShellTool | local or runtime execution |

## See also

- [ao-mcp](https://iinventedlight.com/library/notes/ao-mcp/)
- [otel-genai-mcp](https://iinventedlight.com/library/notes/otel-genai-mcp/)
- [pydantic-ai-mcp](https://iinventedlight.com/library/notes/pydantic-ai-mcp/)

## Claims

- id: C1
  claim: The Agents SDK understands multiple MCP transports so you can reuse or build MCP servers.
  source: S1
  evidence: "The Agents Python SDK understands multiple MCP transports"

- id: C2
  claim: Connect only to MCP servers you trust and use least-privilege credentials.
  source: S1
  evidence: "Connect only to servers you trust"

- id: C3
  claim: Hosted MCP is listed among the SDK hosted OpenAI tools, alongside FunctionTool and local runtime tools.
  source: S2
  evidence: "web search, file search, code interpreter, hosted MCP"

## Sources

- [S1] MCP. OpenAI Agents SDK. https://openai.github.io/openai-agents-python/mcp/ . License: MIT. Accessed 2026-11-19.

- [S2] Tools. openai/openai-agents-python (GitHub). https://github.com/openai/openai-agents-python/blob/main/docs/tools.md . License: MIT. Accessed 2026-11-19.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: OpenAI Agents SDK, MCP; openai/openai-agents-python (GitHub), Tools. MIT; MIT. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
