inspector icon indicating copy to clipboard operation
inspector copied to clipboard

CLI mode hangs when inspecting npx-launched server

Open GhostOfGauss opened this issue 8 months ago • 1 comments

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:

  1. For example, npx @modelcontextprotocol/inspector npx @playwright/mcp@latest --cli --method tools/list will correctly list the tools, but the process does not exit.

Expected behavior Process should exit after listing tools

GhostOfGauss avatar Apr 25 '25 16:04 GhostOfGauss

@GhostOfGauss will check with this

kavinkumar807 avatar May 06 '25 03:05 kavinkumar807

Hi @kavinkumar807 any luck looking into this issue yet? If you're actively investigating I can assign this to you. Thanks!

olaservo avatar May 18 '25 18:05 olaservo

@olaservo I’ve not started this yet, please assign this to me. I’ll start looking into this. Thanks!

kavinkumar807 avatar May 18 '25 19:05 kavinkumar807

@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 avatar May 19 '25 19:05 kavinkumar807

@kavinkumar807 Yep, seems that this works now! Thanks for giving it your attention.

GhostOfGauss avatar May 20 '25 16:05 GhostOfGauss