@mcpjam/inspector 0.2.3 → 0.2.4
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/client/bin/start.js +28 -4
- package/client/dist/assets/{OAuthCallback-CfsBsNUt.js → OAuthCallback-DkLMDxkx.js} +1 -1
- package/client/dist/assets/{OAuthDebugCallback-DuorYCq_.js → OAuthDebugCallback-DaNmVTKt.js} +1 -1
- package/client/dist/assets/{index-CHsLKjnG.js → index-CLxTHffA.js} +1469 -279
- package/client/dist/assets/{index-C5Ywrn22.css → index-ebsMqCvj.css} +31 -0
- package/client/dist/index.html +2 -2
- package/package.json +1 -1
- package/server/build/index.js +25 -35
package/client/bin/start.js
CHANGED
|
@@ -7,11 +7,25 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
|
|
10
|
+
const MCP_BANNER = `
|
|
11
|
+
███╗ ███╗ ██████╗██████╗ ██╗ █████╗ ███╗ ███╗
|
|
12
|
+
████╗ ████║██╔════╝██╔══██╗ ██║██╔══██╗████╗ ████║
|
|
13
|
+
██╔████╔██║██║ ██████╔╝ ██║███████║██╔████╔██║
|
|
14
|
+
██║╚██╔╝██║██║ ██╔═══╝██ ██║██╔══██║██║╚██╔╝██║
|
|
15
|
+
██║ ╚═╝ ██║╚██████╗██║ ╚█████╔╝██║ ██║██║ ╚═╝ ██║
|
|
16
|
+
╚═╝ ╚═╝ ╚═════╝╚═╝ ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
|
17
|
+
`;
|
|
18
|
+
|
|
10
19
|
function delay(ms) {
|
|
11
20
|
return new Promise((resolve) => setTimeout(resolve, ms, true));
|
|
12
21
|
}
|
|
13
22
|
|
|
14
23
|
async function main() {
|
|
24
|
+
// Clear console and display banner
|
|
25
|
+
console.clear();
|
|
26
|
+
console.log("\x1b[36m%s\x1b[0m", MCP_BANNER); // Cyan color
|
|
27
|
+
console.log("\x1b[33m%s\x1b[0m", "🚀 Launching MCP Inspector...\n"); // Yellow color
|
|
28
|
+
|
|
15
29
|
// Parse command line arguments
|
|
16
30
|
const args = process.argv.slice(2);
|
|
17
31
|
const envVars = {};
|
|
@@ -65,14 +79,13 @@ async function main() {
|
|
|
65
79
|
const CLIENT_PORT = process.env.CLIENT_PORT ?? "6274";
|
|
66
80
|
const SERVER_PORT = process.env.SERVER_PORT ?? "6277";
|
|
67
81
|
|
|
68
|
-
console.log("Starting MCP inspector...");
|
|
69
|
-
|
|
70
82
|
const abort = new AbortController();
|
|
71
83
|
|
|
72
84
|
let cancelled = false;
|
|
73
85
|
process.on("SIGINT", () => {
|
|
74
86
|
cancelled = true;
|
|
75
87
|
abort.abort();
|
|
88
|
+
console.log("\n\x1b[31m%s\x1b[0m", "⚠️ Shutting down MCP Inspector..."); // Red color
|
|
76
89
|
});
|
|
77
90
|
let server, serverOk;
|
|
78
91
|
try {
|
|
@@ -96,13 +109,24 @@ async function main() {
|
|
|
96
109
|
|
|
97
110
|
// Make sure server started before starting client
|
|
98
111
|
serverOk = await Promise.race([server, delay(2 * 1000)]);
|
|
99
|
-
} catch (error) {
|
|
112
|
+
} catch (error) {
|
|
113
|
+
console.log("\x1b[31m%s\x1b[0m", "❌ Server initialization failed"); // Red color
|
|
114
|
+
}
|
|
100
115
|
|
|
101
116
|
if (serverOk) {
|
|
102
117
|
try {
|
|
118
|
+
console.log("\x1b[32m%s\x1b[0m", "✅ Server initialized successfully"); // Green color
|
|
119
|
+
console.log(
|
|
120
|
+
"\x1b[36m%s\x1b[0m",
|
|
121
|
+
`🌐 Opening browser at http://127.0.0.1:${CLIENT_PORT}`,
|
|
122
|
+
);
|
|
123
|
+
|
|
103
124
|
if (process.env.MCP_AUTO_OPEN_ENABLED !== "false") {
|
|
104
125
|
open(`http://127.0.0.1:${CLIENT_PORT}`);
|
|
105
126
|
}
|
|
127
|
+
|
|
128
|
+
console.log("\x1b[33m%s\x1b[0m", "🖥️ Starting client interface...");
|
|
129
|
+
|
|
106
130
|
await spawnPromise("node", [inspectorClientPath], {
|
|
107
131
|
env: { ...process.env, PORT: CLIENT_PORT },
|
|
108
132
|
signal: abort.signal,
|
|
@@ -119,6 +143,6 @@ async function main() {
|
|
|
119
143
|
main()
|
|
120
144
|
.then((_) => process.exit(0))
|
|
121
145
|
.catch((e) => {
|
|
122
|
-
console.error(e);
|
|
146
|
+
console.error("\x1b[31m%s\x1b[0m", "❌ Error:", e); // Red color
|
|
123
147
|
process.exit(1);
|
|
124
148
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-
|
|
1
|
+
import { u as useToast, r as reactExports, j as jsxRuntimeExports, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-CLxTHffA.js";
|
|
2
2
|
import { p as parseOAuthCallbackParams, g as generateOAuthErrorDescription } from "./oauthUtils-DTcoXpSP.js";
|
|
3
3
|
const OAuthCallback = ({ onConnect }) => {
|
|
4
4
|
const { toast } = useToast();
|
package/client/dist/assets/{OAuthDebugCallback-DuorYCq_.js → OAuthDebugCallback-DaNmVTKt.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-
|
|
1
|
+
import { r as reactExports, S as SESSION_KEYS, j as jsxRuntimeExports } from "./index-CLxTHffA.js";
|
|
2
2
|
import { p as parseOAuthCallbackParams, g as generateOAuthErrorDescription } from "./oauthUtils-DTcoXpSP.js";
|
|
3
3
|
const OAuthDebugCallback = ({ onConnect }) => {
|
|
4
4
|
reactExports.useEffect(() => {
|