This sample integrates an MCP SDK v2 streamable HTTP server with an OpenAI
agent running in a Temporal workflow. The worker registers a named server
factory with OpenAIAgentsPlugin(mcp_servers=...), and the workflow creates a
durable proxy with temporal_mcp_server(...).
Review the integration prerequisites, including a
running Temporal dev server and an OPENAI_API_KEY, before running the sample.
The sample has its own uv project because other samples still require MCP SDK v1. Change to the sample directory before running it:
cd openai_agents/mcp_v2First, start the MCP server:
uv run tools_server.pyThen start the Temporal worker:
uv run run_worker.pyFinally, run the workflow:
uv run run_workflow.py