-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
enhancementNew feature or requestNew feature or requestfeature:mcpquestionQuestion about using the SDKQuestion about using the SDK
Description
Hi
How do I determine if my MCPServerSse instance is still connected to my MCP server .
I tried doing something like this
async def check_mcp_server_is_connected(self):
try:
await asyncio.wait_for(self.mcp_server.list_tools(), timeout=5.0)
return True
except Exception as ex:
return False
This works but is there a better way?
I could catch a more specific exception...but is there a better way to do this?
Thanks
Jaydeep
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeature:mcpquestionQuestion about using the SDKQuestion about using the SDK