Fix: Disable FastMCP server to resolve conflict with Gradio MCP
Browse files- mcp_server.py +6 -3
mcp_server.py
CHANGED
|
@@ -259,7 +259,10 @@ async def list_documents_for_ui(limit: int = 100, offset: int = 0) -> Dict[str,
|
|
| 259 |
logger.error(f"Error in 'list_documents_for_ui' tool: {str(e)}", exc_info=True)
|
| 260 |
return {"success": False, "error": str(e), "documents": []}
|
| 261 |
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
|
|
|
|
|
|
|
|
|
| 265 |
|
|
|
|
| 259 |
logger.error(f"Error in 'list_documents_for_ui' tool: {str(e)}", exc_info=True)
|
| 260 |
return {"success": False, "error": str(e), "documents": []}
|
| 261 |
|
| 262 |
+
# NOTE: FastMCP server startup disabled to avoid conflict with Gradio MCP
|
| 263 |
+
# Gradio MCP (in app.py) will handle MCP tool exposure via /gradio_api/mcp/sse
|
| 264 |
+
# If you need FastMCP separately, run this file directly with different port
|
| 265 |
+
# if __name__ == "__main__":
|
| 266 |
+
# logger.info("Starting FastMCP server...")
|
| 267 |
+
# asyncio.run(mcp.run(transport="sse", host="0.0.0.0", port=7860))
|
| 268 |
|