inspector icon indicating copy to clipboard operation
inspector copied to clipboard

CLI: Arguments cannot be passed to a URL-based MCP server.

Open hemanth opened this issue 3 months ago • 3 comments

Here’s a clear bug description you can use:


Bug Title: npx @modelcontextprotocol/inspector fails with "Arguments cannot be passed to a URL-based MCP server" when invoking PayPal MCP

Description: When attempting to inspect the PayPal MCP server using the @modelcontextprotocol/inspector CLI with a URL endpoint and headers, the command fails with the following error:

Arguments cannot be passed to a URL-based MCP server.
Arguments cannot be passed to a URL-based MCP server.

Failed with exit code: 1

This prevents usage of the MCP inspector against remote URL-based MCP servers that require headers (e.g., Authorization).

Steps to Reproduce:

  1. Run the following command:

    npx @modelcontextprotocol/inspector --cli https://mcp.paypal.com/http --transport http --method tools/list --header "Authorization: Bearer <token>"
    
  2. Observe the error output.

Expected Behavior: The inspector should allow passing headers and arguments when connecting to a URL-based MCP server, enabling authenticated inspection.

Actual Behavior: Fails immediately with Arguments cannot be passed to a URL-based MCP server.

Environment:

  • @modelcontextprotocol/inspector (latest via npx)
  • Node.js version: [add your version]
  • OS: [add OS/version]

Notes:

  • The issue appears to be a limitation or bug in how the inspector handles URL-based servers combined with CLI arguments.
  • This blocks inspection of MCP servers that require authentication.

Environment (please complete the following information):

  • OS: OSX
  • Browser: ANY (CLI)

hemanth avatar Sep 08 '25 22:09 hemanth

Could you try this with the latest version of the Inspector AND use the correct endpoint: (/mcp not /http)

npx -y @modelcontextprotocol/inspector@latest --cli https://mcp.paypal.com/mcp --transport http --method tools/list --header "Authorization: Bearer <token>"

What I get (because I have no actual bearer token is:

Image

cliffhall avatar Sep 11 '25 18:09 cliffhall

I ran into this today, latest version. Testing on my local mcp-go server:

npm view @modelcontextprotocol/inspector version
0.16.8

npx @modelcontextprotocol/inspector --cli http://localhost:8080/mcp --transport http --method tools/list --header "X-API-Key: <...>"
Arguments cannot be passed to a URL-based MCP server.
Arguments cannot be passed to a URL-based MCP server.

Failed with exit code: 1

If I launch the web UI, I can log in (token or bearer auth) and query the mcp-go server just fine at the URL specified.

kmott avatar Sep 23 '25 01:09 kmott

This PR should fix it. It's been merged and will be in the next release. I can run locally, invoking the same entry point that npx @modelcontextprotocol/inspector does:

Image

cliffhall avatar Oct 11 '25 22:10 cliffhall