@@ -22,17 +22,14 @@ const clientPort = await getPort({
2222} )
2323
2424const sessionToken = randomBytes ( 32 ) . toString ( 'hex' )
25+ console . log ( 'sessionToken' , sessionToken )
2526// Spawn mcp-inspector as a sidecar process
2627const inspectorProcess = execa ( 'mcp-inspector' , [ ] , {
2728 env : {
2829 ...process . env ,
2930 SERVER_PORT : serverPort ,
3031 CLIENT_PORT : clientPort ,
3132 MCP_PROXY_AUTH_TOKEN : sessionToken ,
32-
33- // TODO: remove this in a couple months https://github.com/modelcontextprotocol/inspector/pull/517
34- MCP_PROXY_TOKEN : sessionToken ,
35-
3633 MCP_AUTO_OPEN_ENABLED : 'false' ,
3734 ALLOWED_ORIGINS : [
3835 `http://localhost:${ clientPort } ` ,
@@ -65,13 +62,15 @@ function waitForInspectorReady() {
6562 const str = data . toString ( )
6663 // Suppress specific logs from inspector
6764 if (
68- str . includes ( 'Proxy server listening on port' ) ||
69- str . includes ( 'MCP Inspector is up and running' )
65+ / s e r v e r l i s t e n i n g / i. test ( str ) ||
66+ / i n s p e c t o r i s u p / i. test ( str ) ||
67+ / s e s s i o n t o k e n / i. test ( str ) ||
68+ / 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+ / l o c a l h o s t / i. test ( str ) ||
71+ / a u t o - o p e n i s d i s a b l e d / i. test ( str )
7072 ) {
71- // Do not print these lines
72- if ( str . includes ( 'MCP Inspector is up and running' ) ) {
73- resolve ( )
74- }
73+ resolve ( )
7574 return
7675 }
7776 process . stdout . write ( str ) // print all other inspector logs
0 commit comments