Skip to content

Commit 33ab8db

Browse files
authored
Merge pull request modelcontextprotocol#65 from modelcontextprotocol/ashwin/startup
improve inspector startup message
2 parents 676de45 + f684d2e commit 33ab8db

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

bin/cli.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ const serverCommand = [
3434
.filter(Boolean)
3535
.join(" ");
3636

37-
console.log(serverCommand);
37+
const CLIENT_PORT = process.env.CLIENT_PORT ?? "";
38+
const SERVER_PORT = process.env.SERVER_PORT ?? "";
3839

3940
const { result } = concurrently(
4041
[
4142
{
42-
command: serverCommand,
43+
command: `PORT=${SERVER_PORT} ${serverCommand}`,
4344
name: "server",
4445
},
4546
{
46-
command: `node ${inspectorClientPath}`,
47+
command: `PORT=${CLIENT_PORT} node ${inspectorClientPath}`,
4748
name: "client",
4849
},
4950
],
@@ -54,6 +55,10 @@ const { result } = concurrently(
5455
},
5556
);
5657

58+
console.log(
59+
`\n🔍 MCP Inspector is up and running at http://localhost:${CLIENT_PORT || 5173} 🚀`,
60+
);
61+
5762
result.catch((err) => {
5863
console.error("An error occurred:", err);
5964
process.exit(1);

client/bin/cli.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ const server = http.createServer((request, response) => {
1313
});
1414

1515
const port = process.env.PORT || 5173;
16-
server.listen(port, () => {
17-
console.log(`MCP inspector client running at http://localhost:${port}`);
18-
});
16+
server.listen(port, () => {});

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.1.5",
3+
"version": "0.1.7",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-server",
3-
"version": "0.1.5",
3+
"version": "0.1.7",
44
"description": "Server-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

server/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,4 @@ app.get("/config", (req, res) => {
121121
});
122122

123123
const PORT = process.env.PORT || 3000;
124-
app.listen(PORT, () => {
125-
console.log(`Server is running on port ${PORT}`);
126-
});
124+
app.listen(PORT, () => {});

0 commit comments

Comments
 (0)