improve inspector startup message

This commit is contained in:
Ashwin Bhat
2024-11-19 16:57:02 -08:00
parent 676de45bab
commit f684d2e891
6 changed files with 13 additions and 12 deletions

View File

@@ -34,16 +34,17 @@ const serverCommand = [
.filter(Boolean) .filter(Boolean)
.join(" "); .join(" ");
console.log(serverCommand); const CLIENT_PORT = process.env.CLIENT_PORT ?? "";
const SERVER_PORT = process.env.SERVER_PORT ?? "";
const { result } = concurrently( const { result } = concurrently(
[ [
{ {
command: serverCommand, command: `PORT=${SERVER_PORT} ${serverCommand}`,
name: "server", name: "server",
}, },
{ {
command: `node ${inspectorClientPath}`, command: `PORT=${CLIENT_PORT} node ${inspectorClientPath}`,
name: "client", name: "client",
}, },
], ],
@@ -54,6 +55,10 @@ const { result } = concurrently(
}, },
); );
console.log(
`\n🔍 MCP Inspector is up and running at http://localhost:${CLIENT_PORT || 5173} 🚀`,
);
result.catch((err) => { result.catch((err) => {
console.error("An error occurred:", err); console.error("An error occurred:", err);
process.exit(1); process.exit(1);

View File

@@ -13,6 +13,4 @@ const server = http.createServer((request, response) => {
}); });
const port = process.env.PORT || 5173; const port = process.env.PORT || 5173;
server.listen(port, () => { server.listen(port, () => {});
console.log(`MCP inspector client running at http://localhost:${port}`);
});

View File

@@ -1,6 +1,6 @@
{ {
"name": "@modelcontextprotocol/inspector-client", "name": "@modelcontextprotocol/inspector-client",
"version": "0.1.5", "version": "0.1.7",
"description": "Client-side application for the Model Context Protocol inspector", "description": "Client-side application for the Model Context Protocol inspector",
"license": "MIT", "license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)", "author": "Anthropic, PBC (https://anthropic.com)",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@modelcontextprotocol/inspector", "name": "@modelcontextprotocol/inspector",
"version": "0.1.6", "version": "0.1.7",
"description": "Model Context Protocol inspector", "description": "Model Context Protocol inspector",
"license": "MIT", "license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)", "author": "Anthropic, PBC (https://anthropic.com)",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@modelcontextprotocol/inspector-server", "name": "@modelcontextprotocol/inspector-server",
"version": "0.1.5", "version": "0.1.7",
"description": "Server-side application for the Model Context Protocol inspector", "description": "Server-side application for the Model Context Protocol inspector",
"license": "MIT", "license": "MIT",
"author": "Anthropic, PBC (https://anthropic.com)", "author": "Anthropic, PBC (https://anthropic.com)",

View File

@@ -121,6 +121,4 @@ app.get("/config", (req, res) => {
}); });
const PORT = process.env.PORT || 3000; const PORT = process.env.PORT || 3000;
app.listen(PORT, () => { app.listen(PORT, () => {});
console.log(`Server is running on port ${PORT}`);
});