@mcp-shark/mcp-shark 1.5.5 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-shark/mcp-shark",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "Aggregate multiple Model Context Protocol (MCP) servers into a single unified interface with a powerful monitoring UI. Prov deep visibility into every request and response.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./bin/mcp-shark.js",
|
|
@@ -109,6 +109,26 @@ export class ServerManagementController {
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* GET /api/mcp-server/status
|
|
114
|
+
* Check if the MCP server (gateway) is running
|
|
115
|
+
* This endpoint specifically indicates whether the MCP gateway server is active
|
|
116
|
+
* so users can know if they should focus on the traffic page
|
|
117
|
+
*/
|
|
118
|
+
getMcpServerStatus = (_req, res) => {
|
|
119
|
+
try {
|
|
120
|
+
const status = this.serverManagementService.getServerStatus();
|
|
121
|
+
res.json({
|
|
122
|
+
running: status.running,
|
|
123
|
+
message: status.running
|
|
124
|
+
? 'MCP server (gateway) is running and ready to receive traffic'
|
|
125
|
+
: 'MCP server (gateway) is not running. Start the server to begin capturing traffic.',
|
|
126
|
+
});
|
|
127
|
+
} catch (error) {
|
|
128
|
+
handleError(error, res, this.logger, 'Error getting MCP server status');
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
112
132
|
shutdown = async (_req, res) => {
|
|
113
133
|
try {
|
|
114
134
|
if (!this.cleanup) {
|
|
@@ -69,6 +69,7 @@ export function createCompositeRoutes(
|
|
|
69
69
|
router.setup = serverManagementController.setup;
|
|
70
70
|
router.stop = serverManagementController.stop;
|
|
71
71
|
router.getStatus = serverManagementController.getStatus;
|
|
72
|
+
router.getMcpServerStatus = serverManagementController.getMcpServerStatus;
|
|
72
73
|
router.shutdown = serverManagementController.shutdown;
|
|
73
74
|
router.getServers = getServers(container);
|
|
74
75
|
|
package/ui/server/setup.js
CHANGED
|
@@ -114,6 +114,7 @@ export function createUIServer() {
|
|
|
114
114
|
compositeRoutes.stop(req, res, () => restoreConfig(container));
|
|
115
115
|
});
|
|
116
116
|
app.get('/api/composite/status', compositeRoutes.getStatus);
|
|
117
|
+
app.get('/api/mcp-server/status', compositeRoutes.getMcpServerStatus);
|
|
117
118
|
app.post('/api/composite/shutdown', compositeRoutes.shutdown);
|
|
118
119
|
app.get('/api/composite/servers', compositeRoutes.getServers);
|
|
119
120
|
|
|
@@ -112,6 +112,42 @@ export const serverManagementPaths = {
|
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
114
|
},
|
|
115
|
+
'/api/mcp-server/status': {
|
|
116
|
+
get: {
|
|
117
|
+
tags: ['Server Management'],
|
|
118
|
+
summary: 'Check MCP server (gateway) status',
|
|
119
|
+
description:
|
|
120
|
+
'Check if the MCP server (gateway) is running. This endpoint specifically indicates whether the MCP gateway server is active, so users can know if they should focus on the traffic page.',
|
|
121
|
+
responses: {
|
|
122
|
+
200: {
|
|
123
|
+
description: 'MCP server status',
|
|
124
|
+
content: {
|
|
125
|
+
'application/json': {
|
|
126
|
+
schema: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
running: {
|
|
130
|
+
type: 'boolean',
|
|
131
|
+
description: 'Whether the MCP server (gateway) is running',
|
|
132
|
+
example: true,
|
|
133
|
+
},
|
|
134
|
+
message: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'Human-readable status message',
|
|
137
|
+
example: 'MCP server (gateway) is running and ready to receive traffic',
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ['running', 'message'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
500: {
|
|
146
|
+
description: 'Internal server error',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
115
151
|
'/api/composite/shutdown': {
|
|
116
152
|
post: {
|
|
117
153
|
tags: ['Server Management'],
|