### 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.
### Summary:
1. Add the MCP dep for python 3.10, since it doesn't support 3.9 and below
2. Create MCPServer, which is the agents SDK representation of an MCP server
3. Create implementations for HTTP-SSE and StdIO servers, directly copying the [MCP SDK example](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/clients/simple-chatbot/mcp_simple_chatbot/main.py)
4. Add a util to transform MCP tools into Agent SDK tools
Note: I added optional caching support to the servers. That way, if you happen to know a server's tools don't change, you can just cache them.
### Test Plan:
Checks pass. I added tests at the end of the stack.
Fix circular dependency in voice streamed example by renaming agents.py
to my_workflow.py
Fix circular dependency in voice streamed example by renaming agents
#291
This example shows how you might compose a richer financial research
agent using the Agents SDK. The pattern is similar to the `research_bot`
example, but with more specialized sub‑agents and a verification step.
The flow is:
1. **Planning**: A planner agent turns the end user’s request into a
list of search terms relevant to financial analysis – recent news,
earnings calls, corporate filings, industry commentary, etc.
2. **Search**: A search agent uses the built‑in `WebSearchTool` to
retrieve terse summaries for each search term. (You could also add
`FileSearchTool` if you have indexed PDFs or 10‑Ks.)
3. **Sub‑analysts**: Additional agents (e.g. a fundamentals analyst and
a risk analyst) are exposed as tools so the writer can call them inline
and incorporate their outputs.
4. **Writing**: A writer agent brings together the search snippets and
any sub‑analyst summaries into a long‑form markdown report plus a short
executive summary.
5. **Verification**: A final verifier agent audits the report for
obvious inconsistencies or missing sourcing.