@@ -22,7 +22,6 @@ const clientPort = await getPort({
2222} )
2323
2424const sessionToken = randomBytes ( 32 ) . toString ( 'hex' )
25- console . log ( 'sessionToken' , sessionToken )
2625// Spawn mcp-inspector as a sidecar process
2726const inspectorProcess = execa ( 'mcp-inspector' , [ ] , {
2827 env : {
@@ -44,14 +43,14 @@ const inspectorProcess = execa('mcp-inspector', [], {
4443/*
4544Starting 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 / s e r v e r l i s t e n i n g / i. test ( str ) ||
6667 / i n s p e c t o r i s u p / i. test ( str ) ||
6768 / s e s s i o n t o k e n / i. test ( str ) ||
6869 / D A N G E R O U S L Y _ O M I T _ A U T H / i. test ( str ) ||
69- / o p e n i n s p e c t o r / i. test ( str ) ||
70+ / u p a n d r u n n i n g / i. test ( str ) ||
7071 / l o c a l h o s t / i. test ( str ) ||
7172 / a u t o - o p e n i s d i s a b l e d / i. test ( str )
7273 ) {
73- resolve ( )
7474 return
7575 }
7676 process . stdout . write ( str ) // print all other inspector logs
0 commit comments