MCPcopy Create free account
hub / github.com/openai/openai-agents-python / _start_mcp_server

Function _start_mcp_server

examples/mcp/manager_example/smoke_test.py:59–71  ·  view source on GitHub ↗
(port: int)

Source from the content-addressed store, hash-verified

57
58
59def _start_mcp_server(port: int) -> subprocess.Popen[str]:
60 env = {
61 **os.environ,
62 "STREAMABLE_HTTP_HOST": HOST,
63 "STREAMABLE_HTTP_PORT": str(port),
64 }
65 return subprocess.Popen(
66 [sys.executable, "-u", "-m", "examples.mcp.manager_example.mcp_server"],
67 env=env,
68 stdout=subprocess.PIPE,
69 stderr=subprocess.STDOUT,
70 text=True,
71 )
72
73
74def _load_app_module(mcp_port: int) -> Any:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected