Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 821 Bytes

File metadata and controls

34 lines (24 loc) · 821 Bytes

MCP v2 Example

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_v2

First, start the MCP server:

uv run tools_server.py

Then start the Temporal worker:

uv run run_worker.py

Finally, run the workflow:

uv run run_workflow.py