Skip to content

Commit 9ad7f72

Browse files
committed
update dev server
1 parent f4fb472 commit 9ad7f72

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

epicshop/mcp-dev/dev.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const clientPort = await getPort({
2222
})
2323

2424
const sessionToken = randomBytes(32).toString('hex')
25-
console.log('sessionToken', sessionToken)
2625
// Spawn mcp-inspector as a sidecar process
2726
const inspectorProcess = execa('mcp-inspector', [], {
2827
env: {
@@ -44,14 +43,14 @@ const inspectorProcess = execa('mcp-inspector', [], {
4443
/*
4544
Starting MCP inspector...
4645
47-
⚙️ Proxy server listening on 127.0.0.1:10000
46+
⚙️ Proxy server listening on localhost:10039
4847
49-
🔑 Session token: 5c96a97c78de97283c838754ea89a74283d5ce87692dbe4a4903c416ae64fc6b
50-
Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth
48+
🔑 Session token: 27d8e2e73dfdc8051ba0c1cc38e07a0623680184167543ccfd33c61f2d3819b3
49+
Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth
5150
52-
🔗 Open inspector with token pre-filled:
53-
http://localhost:9000/?MCP_PROXY_AUTH_TOKEN=5c96a97c78de97283c838754ea89a74283d5ce87692dbe4a4903c416ae64fc6b
54-
(Auto-open is disabled when authentication is enabled)
51+
52+
🚀 MCP Inspector is up and running at:
53+
http://localhost:9038/?MCP_PROXY_PORT=10039&MCP_PROXY_AUTH_TOKEN=27d8e2e73dfdc8051ba0c1cc38e07a0623680184167543ccfd33c61f2d3819b3
5554
5655
*/
5756

@@ -60,17 +59,18 @@ function waitForInspectorReady() {
6059
return new Promise((resolve) => {
6160
inspectorProcess.stdout.on('data', (data) => {
6261
const str = data.toString()
62+
if (str.includes(clientPort)) resolve()
63+
6364
// Suppress specific logs from inspector
6465
if (
6566
/server listening/i.test(str) ||
6667
/inspector is up/i.test(str) ||
6768
/session token/i.test(str) ||
6869
/DANGEROUSLY_OMIT_AUTH/i.test(str) ||
69-
/open inspector/i.test(str) ||
70+
/up and running/i.test(str) ||
7071
/localhost/i.test(str) ||
7172
/auto-open is disabled/i.test(str)
7273
) {
73-
resolve()
7474
return
7575
}
7676
process.stdout.write(str) // print all other inspector logs

0 commit comments

Comments
 (0)