openai-agents-python/src/agents
Rohan Mehta 68c800d2a3 [2/n] Add MCP support to Runner
### Summary:
This enables users to **use** MCP inside the SDK.
1. You add a list of MCP servers to `Agent`, via `mcp_server=[...]`
2. When an agent runs, we look up its MCP tools and add them to the list of tools.
3. When a tool call occurs, we call the relevant MCP server.

Notes:
1. There's some refactoring to make sure we send the full list of tools to the Runner/Model etc.
2. Right now, you could have a locally defined tool that conflicts with an MCP defined tool. I didn't add errors for that, will do in a followup.

### Test Plan:
See unit tests. Also has an end to end example next PR.
2025-03-24 15:08:02 -04:00
..
extensions Merge pull request #8 from openai/repo/gitignore 2025-03-11 11:17:37 -07:00
mcp [1/n] Add MCP types to the SDK 2025-03-24 15:08:02 -04:00
models feat: add voice pipeline support 2025-03-20 09:43:13 -07:00
tracing Read tracing API data lazily 2025-03-21 15:32:37 -04:00
util Pretty print result classes 2025-03-17 11:11:39 -04:00
voice Make the optional dependency installation compatible with zsh 2025-03-21 10:01:24 +09:00
__init__.py update tests 2025-03-20 13:08:38 -04:00
_config.py Add examples and documentation for using custom model providers 2025-03-12 17:34:38 -07:00
_debug.py Initial commit 2025-03-11 09:42:28 -07:00
_run_impl.py [2/n] Add MCP support to Runner 2025-03-24 15:08:02 -04:00
agent.py [2/n] Add MCP support to Runner 2025-03-24 15:08:02 -04:00
agent_output.py utils directory 2025-03-16 18:48:45 -04:00
computer.py Initial commit 2025-03-11 09:42:28 -07:00
exceptions.py Initial commit 2025-03-11 09:42:28 -07:00
function_schema.py fix: resolve linting issues 2025-03-12 16:00:20 +05:30
guardrail.py utils directory 2025-03-16 18:48:45 -04:00
handoffs.py utils directory 2025-03-16 18:48:45 -04:00
items.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
lifecycle.py Initial commit 2025-03-11 09:42:28 -07:00
logger.py Initial commit 2025-03-11 09:42:28 -07:00
model_settings.py Add max_tokens and documentation to model settings 2025-03-12 13:35:10 -07:00
py.typed Create py.typed 2025-03-21 11:16:24 -04:00
result.py Pretty print result classes 2025-03-17 11:11:39 -04:00
run.py [2/n] Add MCP support to Runner 2025-03-24 15:08:02 -04:00
run_context.py Initial commit 2025-03-11 09:42:28 -07:00
stream_events.py Initial commit 2025-03-11 09:42:28 -07:00
strict_schema.py Initial commit 2025-03-11 09:42:28 -07:00
tool.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
usage.py Initial commit 2025-03-11 09:42:28 -07:00
version.py Initial commit 2025-03-11 09:42:28 -07:00