CLI: Arguments cannot be passed to a URL-based MCP server.
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:
-
Run the following command:
npx @modelcontextprotocol/inspector --cli https://mcp.paypal.com/http --transport http --method tools/list --header "Authorization: Bearer <token>" -
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 vianpx)- 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)
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:
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.
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: