kshitijthakkar commited on
Commit
23ca4b9
·
1 Parent(s): 6221305

Disable SSR mode to fix MCP client on HuggingFace Spaces

Browse files

SSR mode causes gradio_client to append /gradio_api/mcp/sse/ to URLs,
which breaks MCP server connections. Disabling SSR allows MCP tools
to work correctly on HF Spaces environment.

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2487,5 +2487,6 @@ if __name__ == "__main__":
2487
  app.launch(
2488
  server_name="0.0.0.0",
2489
  server_port=7860,
2490
- share=False
 
2491
  )
 
2487
  app.launch(
2488
  server_name="0.0.0.0",
2489
  server_port=7860,
2490
+ share=False,
2491
+ ssr_mode=False # Disable SSR to fix MCP client compatibility
2492
  )