mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-31 20:00:00 -05:00
feat: add health check endpoint to monitor MCP server status (#264)
This commit is contained in:
@@ -114,9 +114,11 @@ const cleanInputSchema = (schema: any): any => {
|
||||
// Store all server information
|
||||
let serverInfos: ServerInfo[] = [];
|
||||
|
||||
// Returns true if all servers are connected
|
||||
// Returns true if all enabled servers are connected
|
||||
export const connected = (): boolean => {
|
||||
return serverInfos.every((serverInfo) => serverInfo.status === 'connected');
|
||||
return serverInfos
|
||||
.filter((serverInfo) => serverInfo.enabled !== false)
|
||||
.every((serverInfo) => serverInfo.status === 'connected');
|
||||
};
|
||||
|
||||
// Global cleanup function to close all connections
|
||||
|
||||
Reference in New Issue
Block a user