CLI mode hangs when inspecting npx-launched server
Describe the bug
The process does not exit when the inspector is used in CLI mode to inspect an MCP server launched with an npx @example_server command. This is a problem for CI, as test scripts will hang at the inspector step.
To Reproduce Steps to reproduce the behavior:
- For example,
npx @modelcontextprotocol/inspector npx @playwright/mcp@latest --cli --method tools/listwill correctly list the tools, but the process does not exit.
Expected behavior Process should exit after listing tools
@GhostOfGauss will check with this
Hi @kavinkumar807 any luck looking into this issue yet? If you're actively investigating I can assign this to you. Thanks!
@olaservo I’ve not started this yet, please assign this to me. I’ll start looking into this. Thanks!
@GhostOfGauss When I tried to execute the above npx @modelcontextprotocol/inspector npx @playwright/mcp@latest --cli --method tools/list command as mentioned in the description the process exits as expected after listing the tools.
Attaching the video for reference:
https://github.com/user-attachments/assets/83adfb8e-6fbb-4131-9b1a-98e1f7d929f8
Can you provide me with more context to reproduce this ?
cc: @olaservo
@kavinkumar807 Yep, seems that this works now! Thanks for giving it your attention.