Skip to content

Commit 2908ba3

Browse files
committed
Refactor transport endpoint setup in server.py; add comments for clarity on SSE and HTTP protocols
1 parent 258d948 commit 2908ba3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/sandbox_api_mcp_server/server.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,12 @@ def run():
126126
)
127127

128128
# Mount MCP transports - support both for maximum compatibility
129-
130-
# SSE transport for backward compatibility with existing clients
131129
sse_app = mcp.sse_app()
132130
app.mount("/sse", sse_app)
133131

134-
# Streamable HTTP transport for modern clients (recommended for production)
135-
streamable_app = mcp.streamable_http_app()
136-
app.mount("/mcp", streamable_app)
132+
# HTTP transport for modern clients (recommended for production)
133+
http_app = mcp.http_app()
134+
app.mount("", http_app)
137135

138136
logger.info("MCP server available at multiple transports:")
139137
logger.info(" - /sse (SSE transport - legacy, backward compatible)")

0 commit comments

Comments
 (0)