Compare commits

...

4 Commits

Author SHA1 Message Date
Ashwin Bhat
6f62066d34 display inspector version in UI 2024-11-27 10:52:38 -05:00
ashwin-ant
c770d217e7 Merge pull request #86 from modelcontextprotocol/ani/debuggability
Make debugging Inspector easier for users
2024-11-27 10:04:00 -05:00
Ani Betts
98470a12f9 Make stdout/error echo for client and server 2024-11-27 15:57:02 +01:00
Ani Betts
a00564fafa Disable minification on production build, we don't need it here and it makes debugging annoying 2024-11-27 15:55:11 +01:00
6 changed files with 26 additions and 10 deletions

View File

@@ -51,12 +51,17 @@ async function main() {
...(command ? [`--env`, command] : []), ...(command ? [`--env`, command] : []),
...(mcpServerArgs ? ["--args", mcpServerArgs.join(" ")] : []), ...(mcpServerArgs ? ["--args", mcpServerArgs.join(" ")] : []),
], ],
{ env: { ...process.env, PORT: SERVER_PORT }, signal: abort.signal }, {
env: { ...process.env, PORT: SERVER_PORT },
signal: abort.signal,
echoOutput: true,
},
); );
const client = spawnPromise("node", [inspectorClientPath], { const client = spawnPromise("node", [inspectorClientPath], {
env: { ...process.env, PORT: CLIENT_PORT }, env: { ...process.env, PORT: CLIENT_PORT },
signal: abort.signal, signal: abort.signal,
echoOutput: true,
}); });
// Make sure our server/client didn't immediately fail // Make sure our server/client didn't immediately fail

View File

@@ -1,5 +1,4 @@
import { useState } from "react"; import { useState } from "react";
import { Play, ChevronDown, ChevronRight } from "lucide-react"; import { Play, ChevronDown, ChevronRight } from "lucide-react";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
@@ -13,6 +12,7 @@ import {
import { StdErrNotification } from "@/lib/notificationTypes"; import { StdErrNotification } from "@/lib/notificationTypes";
import useTheme from "../lib/useTheme"; import useTheme from "../lib/useTheme";
import { version } from "../../../package.json";
interface SidebarProps { interface SidebarProps {
connectionStatus: "disconnected" | "connected" | "error"; connectionStatus: "disconnected" | "connected" | "error";
@@ -52,7 +52,9 @@ const Sidebar = ({
<div className="w-80 bg-card border-r border-border flex flex-col h-full"> <div className="w-80 bg-card border-r border-border flex flex-col h-full">
<div className="flex items-center justify-between p-4 border-b border-gray-200"> <div className="flex items-center justify-between p-4 border-b border-gray-200">
<div className="flex items-center"> <div className="flex items-center">
<h1 className="ml-2 text-lg font-semibold">MCP Inspector</h1> <h1 className="ml-2 text-lg font-semibold">
MCP Inspector v{version}
</h1>
</div> </div>
</div> </div>

View File

@@ -23,7 +23,8 @@
"strict": true, "strict": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true,
"resolveJsonModule": true
}, },
"include": ["src"] "include": ["src"]
} }

View File

@@ -10,4 +10,12 @@ export default defineConfig({
"@": path.resolve(__dirname, "./src"), "@": path.resolve(__dirname, "./src"),
}, },
}, },
build: {
minify: false,
rollupOptions: {
output: {
manualChunks: undefined
}
}
}
}); });

8
package-lock.json generated
View File

@@ -16,7 +16,7 @@
"@modelcontextprotocol/inspector-client": "0.2.4", "@modelcontextprotocol/inspector-client": "0.2.4",
"@modelcontextprotocol/inspector-server": "0.2.4", "@modelcontextprotocol/inspector-server": "0.2.4",
"concurrently": "^9.0.1", "concurrently": "^9.0.1",
"spawn-rx": "^5.0.4", "spawn-rx": "^5.1.0",
"ts-node": "^10.9.2" "ts-node": "^10.9.2"
}, },
"bin": { "bin": {
@@ -5737,9 +5737,9 @@
} }
}, },
"node_modules/spawn-rx": { "node_modules/spawn-rx": {
"version": "5.0.4", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-5.0.4.tgz", "resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-5.1.0.tgz",
"integrity": "sha512-Do11ahkHLlqN9G/J6fs10gdx25BU33NrpkyN3/DFXIIUVojBiJysl12nC0iGUkE+msJAPflzyfpLWWHGHw/6Xg==", "integrity": "sha512-b4HX44hI0usMiHu6LNaZUVg0BGqHuBcl+81iEhZwhvKHz1efTqD/CHBcUbm/uIe5TARy9pJolxU2NMfh6GuQBA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"debug": "^4.3.7", "debug": "^4.3.7",

View File

@@ -36,11 +36,11 @@
"@modelcontextprotocol/inspector-client": "0.2.4", "@modelcontextprotocol/inspector-client": "0.2.4",
"@modelcontextprotocol/inspector-server": "0.2.4", "@modelcontextprotocol/inspector-server": "0.2.4",
"concurrently": "^9.0.1", "concurrently": "^9.0.1",
"spawn-rx": "^5.0.4", "spawn-rx": "^5.1.0",
"ts-node": "^10.9.2" "ts-node": "^10.9.2"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.7.5", "@types/node": "^22.7.5",
"prettier": "3.3.3" "prettier": "3.3.3"
} }
} }