fix(mcp): update server parameters to resolve SSE connection error

pull/819/head
Pavan Kumar 3 months ago committed by ascender1729
parent 1f549175be
commit 8fd41d24aa

@ -21,16 +21,13 @@ logger.add(sys.stdout,
def get_server_params(): def get_server_params():
"""Get the MCP server connection parameters.""" """Get the MCP server connection parameters."""
return MCPServerSseParams( return MCPServerSseParams(
url="http://0.0.0.0:8000", # Using 0.0.0.0 to be accessible url="http://0.0.0.0:8000", # Use 0.0.0.0 to be accessible
sse_path="/sse", # Specify SSE endpoint
messages_path="/messages", # Specify messages endpoint
headers={ headers={
"Content-Type": "application/json", "Content-Type": "application/json",
"Accept": "text/event-stream" "Accept": "text/event-stream"
}, },
timeout=15.0, # Longer timeout timeout=15.0, # Longer timeout
sse_read_timeout=60.0, # Longer read timeout sse_read_timeout=60.0 # Longer read timeout
require_session_id=False # Match server configuration
) )

Loading…
Cancel
Save