openai-agents-python/examples/mcp/sse_example
Rohan Mehta bd47a41d0b
MCP example for SSE (#354)
Simple example with a local SSE server.
2025-03-26 12:56:35 -04:00
..
main.py MCP example for SSE (#354) 2025-03-26 12:56:35 -04:00
README.md MCP example for SSE (#354) 2025-03-26 12:56:35 -04:00
server.py MCP example for SSE (#354) 2025-03-26 12:56:35 -04:00

MCP SSE Example

This example uses a local SSE server in server.py.

Run the example via:

uv run python  python examples/mcp/sse_example/main.py

Details

The example uses the MCPServerSse class from agents.mcp. The server runs in a sub-process at https://localhost:8000/sse.