Integration with MCP (Model Context Protocol) servers using OpenAI agents in Temporal workflows.
Adapted from OpenAI Agents SDK MCP examples
Before running these examples, be sure to review the prerequisites and background on the integration.
First, start the worker:
uv run openai_agents/mcp/run_file_system_worker.pyRun the workflow:
uv run openai_agents/mcp/run_file_system_workflow.pyThis sample assumes that the worker and run_file_system_workflow.py are on the same machine.
First, start the worker:
uv run openai_agents/mcp/servers/tools_server.py --transport=streamable-httpThen start the worker:
uv run openai_agents/mcp/run_streamable_http_worker.pyFinally, run the workflow:
uv run openai_agents/mcp/run_streamable_http_workflow.pyFirst, start the MCP server:
uv run openai_agents/mcp/servers/tools_server.py --transport=sseThen start the worker:
uv run openai_agents/mcp/run_sse_worker.pyFinally, run the workflow:
uv run openai_agents/mcp/run_sse_workflow.pyFirst, start the MCP server:
uv run openai_agents/mcp/servers/prompt_server.pyThen start the worker:
uv run openai_agents/mcp/run_prompt_server_worker.pyFinally, run the workflow:
uv run openai_agents/mcp/run_prompt_server_workflow.pyDemonstrates durable note-taking with the Memory MCP server: write seed notes, query by tags, synthesize a brief with citations, then update and delete notes.
Start the worker:
uv run openai_agents/mcp/run_memory_research_scratchpad_worker.pyRun the research scratchpad workflow:
uv run openai_agents/mcp/run_memory_research_scratchpad_workflow.py