@mcp-use/inspector 0.4.11-canary.0 → 0.4.11
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/dist/cli.js +87 -40
- package/dist/client/assets/{chunk-VL2OQCWN-BE4txAap.js → chunk-VL2OQCWN-Ce71Oujn.js} +1 -1
- package/dist/client/assets/{embeddings-D0mnwVrX.js → embeddings-x1-vu32M.js} +1 -1
- package/dist/client/assets/{index-Ba21hizt.css → index-BrUPorMz.css} +1 -1
- package/dist/client/assets/{index-B0MYHYe6.js → index-ByN-8efJ.js} +1 -1
- package/dist/client/assets/{index-mBO7pd_t.js → index-C1F6bSOH.js} +1 -1
- package/dist/client/assets/{index-BEMSyME5.js → index-CLrmeqJ5.js} +1 -1
- package/dist/client/assets/{index-CQ9XIRcv.js → index-CynUsoYY.js} +1 -1
- package/dist/client/assets/{index-BgupETL3.js → index-D56cgcLQ.js} +1 -1
- package/dist/client/assets/{index-DrYUC3_O.js → index-SVv-Z-Et.js} +4 -4
- package/dist/client/assets/{index-wkxN17B9.js → index-Z5HYU3am.js} +1 -1
- package/dist/client/assets/{langfuse-MO3AMDBE-DYoZ4Kwk.js → langfuse-LCJ6VJEP-B8zS6koH.js} +3 -3
- package/dist/client/index.html +33 -13
- package/dist/server/{chunk-AFTM3F6I.js → chunk-222XA5JA.js} +7 -3
- package/dist/server/{chunk-RK4WSNY7.js → chunk-76XNP4ZB.js} +41 -17
- package/dist/server/{chunk-XJDEAO7Y.js → chunk-JCLAFMDT.js} +3 -1
- package/dist/server/{chunk-VMVT3HVZ.js → chunk-TIYOH5C4.js} +53 -21
- package/dist/server/{chunk-5JZ2RXUR.js → chunk-YGCKPAWJ.js} +9 -5
- package/dist/server/{chunk-JTBAUVJ3.js → chunk-ZFMPIRVB.js} +36 -21
- package/dist/server/cli.js +11 -7
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +6 -6
- package/dist/server/middleware.d.ts +2 -2
- package/dist/server/middleware.d.ts.map +1 -1
- package/dist/server/middleware.js +6 -6
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +20 -10
- package/dist/server/shared-routes.d.ts +1 -1
- package/dist/server/shared-routes.d.ts.map +1 -1
- package/dist/server/shared-routes.js +3 -3
- package/dist/server/shared-static.d.ts +1 -1
- package/dist/server/shared-static.d.ts.map +1 -1
- package/dist/server/shared-static.js +2 -2
- package/dist/server/shared-utils-browser.d.ts +3 -3
- package/dist/server/shared-utils-browser.d.ts.map +1 -1
- package/dist/server/shared-utils-browser.js +1 -1
- package/dist/server/shared-utils.d.ts +3 -3
- package/dist/server/shared-utils.d.ts.map +1 -1
- package/dist/server/shared-utils.js +1 -1
- package/dist/server/utils.d.ts.map +1 -1
- package/dist/server/utils.js +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerInspectorRoutes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZFMPIRVB.js";
|
|
4
4
|
import {
|
|
5
5
|
registerStaticRoutes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-222XA5JA.js";
|
|
7
7
|
import {
|
|
8
8
|
checkClientFiles,
|
|
9
9
|
getClientDistPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TIYOH5C4.js";
|
|
11
11
|
|
|
12
12
|
// src/server/middleware.ts
|
|
13
13
|
import { Hono } from "hono";
|
|
14
14
|
function mountInspector(app) {
|
|
15
15
|
const clientDistPath = getClientDistPath();
|
|
16
16
|
if (!checkClientFiles(clientDistPath)) {
|
|
17
|
-
console.warn(
|
|
18
|
-
|
|
17
|
+
console.warn(
|
|
18
|
+
`\u26A0\uFE0F MCP Inspector client files not found at ${clientDistPath}`
|
|
19
|
+
);
|
|
20
|
+
console.warn(
|
|
21
|
+
` Run 'yarn build' in the inspector package to build the UI`
|
|
22
|
+
);
|
|
19
23
|
}
|
|
20
24
|
if (app instanceof Hono) {
|
|
21
25
|
registerInspectorRoutes(app);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatErrorResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JCLAFMDT.js";
|
|
4
4
|
import {
|
|
5
5
|
generateWidgetContainerHtml,
|
|
6
6
|
generateWidgetContentHtml,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
handleChatRequest,
|
|
10
10
|
handleChatRequestStream,
|
|
11
11
|
storeWidgetData
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-76XNP4ZB.js";
|
|
13
13
|
|
|
14
14
|
// src/server/shared-routes.ts
|
|
15
15
|
import { logger } from "hono/logger";
|
|
@@ -78,7 +78,9 @@ function registerInspectorRoutes(app, config) {
|
|
|
78
78
|
} catch (error) {
|
|
79
79
|
const errorMsg = `${JSON.stringify({
|
|
80
80
|
type: "error",
|
|
81
|
-
data: {
|
|
81
|
+
data: {
|
|
82
|
+
message: error instanceof Error ? error.message : "Unknown error"
|
|
83
|
+
}
|
|
82
84
|
})}
|
|
83
85
|
`;
|
|
84
86
|
await writer.write(encoder.encode(errorMsg));
|
|
@@ -90,7 +92,7 @@ function registerInspectorRoutes(app, config) {
|
|
|
90
92
|
headers: {
|
|
91
93
|
"Content-Type": "text/event-stream",
|
|
92
94
|
"Cache-Control": "no-cache",
|
|
93
|
-
|
|
95
|
+
Connection: "keep-alive"
|
|
94
96
|
}
|
|
95
97
|
});
|
|
96
98
|
} catch (error) {
|
|
@@ -116,7 +118,10 @@ function registerInspectorRoutes(app, config) {
|
|
|
116
118
|
return c.json(result);
|
|
117
119
|
} catch (error) {
|
|
118
120
|
console.error("[Widget Store] Error:", error);
|
|
119
|
-
console.error(
|
|
121
|
+
console.error(
|
|
122
|
+
"[Widget Store] Stack:",
|
|
123
|
+
error instanceof Error ? error.stack : ""
|
|
124
|
+
);
|
|
120
125
|
return c.json(formatErrorResponse(error, "storeWidgetData"), 500);
|
|
121
126
|
}
|
|
122
127
|
});
|
|
@@ -136,7 +141,10 @@ function registerInspectorRoutes(app, config) {
|
|
|
136
141
|
const toolId = c.req.param("toolId");
|
|
137
142
|
const widgetData = getWidgetData(toolId);
|
|
138
143
|
if (!widgetData) {
|
|
139
|
-
console.error(
|
|
144
|
+
console.error(
|
|
145
|
+
"[Widget Content] Widget data not found for toolId:",
|
|
146
|
+
toolId
|
|
147
|
+
);
|
|
140
148
|
return c.html(
|
|
141
149
|
"<html><body>Error: Widget data not found or expired</body></html>",
|
|
142
150
|
404
|
|
@@ -156,10 +164,7 @@ function registerInspectorRoutes(app, config) {
|
|
|
156
164
|
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
157
165
|
const errorStack = error instanceof Error ? error.stack : "";
|
|
158
166
|
console.error("[Widget Content] Stack:", errorStack);
|
|
159
|
-
return c.html(
|
|
160
|
-
`<html><body>Error: ${errorMessage}</body></html>`,
|
|
161
|
-
500
|
|
162
|
-
);
|
|
167
|
+
return c.html(`<html><body>Error: ${errorMessage}</body></html>`, 500);
|
|
163
168
|
}
|
|
164
169
|
});
|
|
165
170
|
app.get("/inspector/config.json", (c) => {
|
|
@@ -175,9 +180,12 @@ function registerInspectorRoutes(app, config) {
|
|
|
175
180
|
return c.json({ success: false, error: "Missing event name" }, 400);
|
|
176
181
|
}
|
|
177
182
|
const { PostHog } = await import("posthog-node");
|
|
178
|
-
const posthog = new PostHog(
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
const posthog = new PostHog(
|
|
184
|
+
"phc_lyTtbYwvkdSbrcMQNPiKiiRWrrM1seyKIMjycSvItEI",
|
|
185
|
+
{
|
|
186
|
+
host: "https://eu.i.posthog.com"
|
|
187
|
+
}
|
|
188
|
+
);
|
|
181
189
|
const distinctId = user_id || "anonymous";
|
|
182
190
|
posthog.capture({
|
|
183
191
|
distinctId,
|
|
@@ -194,16 +202,23 @@ function registerInspectorRoutes(app, config) {
|
|
|
194
202
|
app.post("/inspector/api/tel/scarf", async (c) => {
|
|
195
203
|
try {
|
|
196
204
|
const body = await c.req.json();
|
|
197
|
-
const response = await fetch(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
const response = await fetch(
|
|
206
|
+
"https://mcpuse.gateway.scarf.sh/events-inspector",
|
|
207
|
+
{
|
|
208
|
+
method: "POST",
|
|
209
|
+
headers: {
|
|
210
|
+
"Content-Type": "application/json"
|
|
211
|
+
},
|
|
212
|
+
body: JSON.stringify(body)
|
|
213
|
+
}
|
|
214
|
+
);
|
|
204
215
|
if (!response.ok) {
|
|
205
216
|
console.error("[Telemetry] Scarf request failed:", response.status);
|
|
206
|
-
return c.json({
|
|
217
|
+
return c.json({
|
|
218
|
+
success: false,
|
|
219
|
+
status: response.status,
|
|
220
|
+
error: response.statusText
|
|
221
|
+
});
|
|
207
222
|
}
|
|
208
223
|
return c.json({ success: true });
|
|
209
224
|
} catch (error) {
|
package/dist/server/cli.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
registerInspectorRoutes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZFMPIRVB.js";
|
|
5
5
|
import {
|
|
6
6
|
findAvailablePort,
|
|
7
7
|
isValidUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JCLAFMDT.js";
|
|
9
9
|
import {
|
|
10
10
|
registerStaticRoutes
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-222XA5JA.js";
|
|
12
|
+
import "./chunk-76XNP4ZB.js";
|
|
13
|
+
import "./chunk-TIYOH5C4.js";
|
|
14
14
|
|
|
15
15
|
// src/server/cli.ts
|
|
16
16
|
import { serve } from "@hono/node-server";
|
|
@@ -34,7 +34,9 @@ for (let i = 0; i < args.length; i++) {
|
|
|
34
34
|
} else if (args[i] === "--port" && i + 1 < args.length) {
|
|
35
35
|
const parsedPort = Number.parseInt(args[i + 1], 10);
|
|
36
36
|
if (Number.isNaN(parsedPort) || parsedPort < 1 || parsedPort > 65535) {
|
|
37
|
-
console.error(
|
|
37
|
+
console.error(
|
|
38
|
+
`Error: Port must be a number between 1 and 65535, got: ${args[i + 1]}`
|
|
39
|
+
);
|
|
38
40
|
process.exit(1);
|
|
39
41
|
}
|
|
40
42
|
startPort = parsedPort;
|
|
@@ -84,7 +86,9 @@ async function startServer() {
|
|
|
84
86
|
await open(`http://localhost:${port}/inspector`);
|
|
85
87
|
console.log(`\u{1F310} Browser opened`);
|
|
86
88
|
} catch {
|
|
87
|
-
console.log(
|
|
89
|
+
console.log(
|
|
90
|
+
`\u{1F310} Please open http://localhost:${port}/inspector in your browser`
|
|
91
|
+
);
|
|
88
92
|
}
|
|
89
93
|
return { port, fetch: app.fetch };
|
|
90
94
|
} catch (error) {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This is the main entry point for importing the inspector as a library.
|
|
5
5
|
* For standalone server usage, see standalone.ts
|
|
6
6
|
*/
|
|
7
|
-
export { mountInspector } from
|
|
8
|
-
export { handleChatRequest, handleChatRequestStream } from
|
|
7
|
+
export { mountInspector } from "./middleware.js";
|
|
8
|
+
export { handleChatRequest, handleChatRequestStream, } from "./shared-utils-browser.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mountInspector
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YGCKPAWJ.js";
|
|
4
|
+
import "./chunk-ZFMPIRVB.js";
|
|
5
|
+
import "./chunk-JCLAFMDT.js";
|
|
6
|
+
import "./chunk-222XA5JA.js";
|
|
7
7
|
import {
|
|
8
8
|
handleChatRequest,
|
|
9
9
|
handleChatRequestStream
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-76XNP4ZB.js";
|
|
11
|
+
import "./chunk-TIYOH5C4.js";
|
|
12
12
|
export {
|
|
13
13
|
handleChatRequest,
|
|
14
14
|
handleChatRequestStream,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Express } from
|
|
2
|
-
import { Hono } from
|
|
1
|
+
import type { Express } from "express";
|
|
2
|
+
import { Hono } from "hono";
|
|
3
3
|
/**
|
|
4
4
|
* Mount the MCP Inspector UI at a specified path on an Express or Hono app
|
|
5
5
|
* Similar to how FastAPI mounts Swagger UI at /docs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAmC,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAmC,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAoExD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mountInspector
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YGCKPAWJ.js";
|
|
4
|
+
import "./chunk-ZFMPIRVB.js";
|
|
5
|
+
import "./chunk-JCLAFMDT.js";
|
|
6
|
+
import "./chunk-222XA5JA.js";
|
|
7
|
+
import "./chunk-76XNP4ZB.js";
|
|
8
|
+
import "./chunk-TIYOH5C4.js";
|
|
9
9
|
export {
|
|
10
10
|
mountInspector
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAuBA,iBAAe,WAAW;;;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAuBA,iBAAe,WAAW;;;GA8EzB;;;;AAOD,wBAA+B"}
|
package/dist/server/server.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerInspectorRoutes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZFMPIRVB.js";
|
|
4
4
|
import {
|
|
5
5
|
isPortAvailable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JCLAFMDT.js";
|
|
7
7
|
import {
|
|
8
8
|
registerStaticRoutesWithDevProxy
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-222XA5JA.js";
|
|
10
|
+
import "./chunk-76XNP4ZB.js";
|
|
11
|
+
import "./chunk-TIYOH5C4.js";
|
|
12
12
|
|
|
13
13
|
// src/server/server.ts
|
|
14
14
|
import { exec } from "child_process";
|
|
@@ -28,14 +28,20 @@ async function startServer() {
|
|
|
28
28
|
const available = await isPortAvailable(port);
|
|
29
29
|
if (!available) {
|
|
30
30
|
if (isDev) {
|
|
31
|
-
console.error(
|
|
31
|
+
console.error(
|
|
32
|
+
`\u274C\u274C\u274C Port ${port} is not available (probably used by Vite dev server as fallback so you should stop port 3000). Please stop the process using this port and try again.`
|
|
33
|
+
);
|
|
32
34
|
process.exit(1);
|
|
33
35
|
} else {
|
|
34
36
|
const fallbackPort = 3002;
|
|
35
|
-
console.warn(
|
|
37
|
+
console.warn(
|
|
38
|
+
`\u26A0\uFE0F Port ${port} is not available, trying ${fallbackPort}`
|
|
39
|
+
);
|
|
36
40
|
const fallbackAvailable = await isPortAvailable(fallbackPort);
|
|
37
41
|
if (!fallbackAvailable) {
|
|
38
|
-
console.error(
|
|
42
|
+
console.error(
|
|
43
|
+
`\u274C Neither port ${port} nor ${fallbackPort} is available. Please stop the processes using these ports and try again.`
|
|
44
|
+
);
|
|
39
45
|
process.exit(1);
|
|
40
46
|
}
|
|
41
47
|
port = fallbackPort;
|
|
@@ -46,8 +52,12 @@ async function startServer() {
|
|
|
46
52
|
port
|
|
47
53
|
});
|
|
48
54
|
if (isDev) {
|
|
49
|
-
console.warn(
|
|
50
|
-
|
|
55
|
+
console.warn(
|
|
56
|
+
`\u{1F680} MCP Inspector API server running on http://localhost:${port}`
|
|
57
|
+
);
|
|
58
|
+
console.warn(
|
|
59
|
+
`\u{1F310} Vite dev server should be running on http://localhost:3000`
|
|
60
|
+
);
|
|
51
61
|
} else {
|
|
52
62
|
console.warn(`\u{1F680} MCP Inspector running on http://localhost:${port}`);
|
|
53
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-routes.d.ts","sourceRoot":"","sources":["../../src/server/shared-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"shared-routes.d.ts","sourceRoot":"","sources":["../../src/server/shared-routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAajC;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,IAAI,EACT,MAAM,CAAC,EAAE;IAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,QA8S5C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerInspectorRoutes
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZFMPIRVB.js";
|
|
4
|
+
import "./chunk-JCLAFMDT.js";
|
|
5
|
+
import "./chunk-76XNP4ZB.js";
|
|
6
6
|
export {
|
|
7
7
|
registerInspectorRoutes
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-static.d.ts","sourceRoot":"","sources":["../../src/server/shared-static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"shared-static.d.ts","sourceRoot":"","sources":["../../src/server/shared-static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AASjC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,QAkEtE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,IAAI,EACT,cAAc,CAAC,EAAE,MAAM,QA+DxB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerStaticRoutes,
|
|
3
3
|
registerStaticRoutesWithDevProxy
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-222XA5JA.js";
|
|
5
|
+
import "./chunk-TIYOH5C4.js";
|
|
6
6
|
export {
|
|
7
7
|
registerStaticRoutes,
|
|
8
8
|
registerStaticRoutesWithDevProxy
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Works in both Node.js and browser environments without Node.js-specific APIs
|
|
4
4
|
*/
|
|
5
5
|
interface LLMConfig {
|
|
6
|
-
provider:
|
|
6
|
+
provider: "openai" | "anthropic" | "google";
|
|
7
7
|
model: string;
|
|
8
8
|
apiKey: string;
|
|
9
9
|
temperature?: number;
|
|
@@ -25,7 +25,7 @@ interface AuthConfig {
|
|
|
25
25
|
[key: string]: unknown;
|
|
26
26
|
}
|
|
27
27
|
interface ChatMessage {
|
|
28
|
-
role:
|
|
28
|
+
role: "system" | "user" | "assistant";
|
|
29
29
|
content: string;
|
|
30
30
|
}
|
|
31
31
|
interface ToolCall {
|
|
@@ -73,7 +73,7 @@ export interface WidgetData {
|
|
|
73
73
|
/**
|
|
74
74
|
* Store widget data for rendering
|
|
75
75
|
*/
|
|
76
|
-
export declare function storeWidgetData(data: Omit<WidgetData,
|
|
76
|
+
export declare function storeWidgetData(data: Omit<WidgetData, "timestamp">): {
|
|
77
77
|
success: boolean;
|
|
78
78
|
error?: string;
|
|
79
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-utils-browser.d.ts","sourceRoot":"","sources":["../../src/server/shared-utils-browser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,SAAS;IACjB,QAAQ,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"shared-utils-browser.d.ts","sourceRoot":"","sources":["../../src/server/shared-utils-browser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,SAAS;IACjB,QAAQ,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC5C,KAAK,EAAE,MAAM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C,MAAM,EAAE,MAAM,CAAC,CA2CzB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared utilities for MCP Inspector server functionality
|
|
3
3
|
*/
|
|
4
4
|
interface LLMConfig {
|
|
5
|
-
provider:
|
|
5
|
+
provider: "openai" | "anthropic";
|
|
6
6
|
model: string;
|
|
7
7
|
apiKey: string;
|
|
8
8
|
temperature?: number;
|
|
@@ -24,7 +24,7 @@ interface AuthConfig {
|
|
|
24
24
|
[key: string]: unknown;
|
|
25
25
|
}
|
|
26
26
|
interface ChatMessage {
|
|
27
|
-
role:
|
|
27
|
+
role: "system" | "user" | "assistant";
|
|
28
28
|
content: string;
|
|
29
29
|
}
|
|
30
30
|
interface ToolCall {
|
|
@@ -85,7 +85,7 @@ export interface WidgetData {
|
|
|
85
85
|
/**
|
|
86
86
|
* Store widget data for rendering
|
|
87
87
|
*/
|
|
88
|
-
export declare function storeWidgetData(data: Omit<WidgetData,
|
|
88
|
+
export declare function storeWidgetData(data: Omit<WidgetData, "timestamp">): {
|
|
89
89
|
success: boolean;
|
|
90
90
|
error?: string;
|
|
91
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-utils.d.ts","sourceRoot":"","sources":["../../src/server/shared-utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,UAAU,SAAS;IACjB,QAAQ,EAAE,QAAQ,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"shared-utils.d.ts","sourceRoot":"","sources":["../../src/server/shared-utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,UAAU,SAAS;IACjB,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,WAAW;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GA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AE,CAAC;CAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/server/utils.ts"],"names":[],"mappings":"AACA,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/server/utils.ts"],"names":[],"mappings":"AACA,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAYrD;AAGD,wBAAsB,iBAAiB,CACrC,SAAS,SAAO,EAChB,WAAW,SAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAGD,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;;;;;EAoBlE"}
|
package/dist/server/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/inspector",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.11
|
|
4
|
+
"version": "0.4.11",
|
|
5
5
|
"description": "MCP Inspector - A tool for inspecting and debugging MCP servers",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"sonner": "^2.0.7",
|
|
69
69
|
"tailwind-merge": "^3.3.1",
|
|
70
70
|
"vite-express": "^0.21.1",
|
|
71
|
-
"mcp-use": "1.2.2
|
|
71
|
+
"mcp-use": "1.2.2"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|