Debugging
MCP Inspector CLI: list tools and call one from the terminal
Use MCP Inspector's CLI mode to list a server's tools and call one in two commands, for local stdio servers and remote servers with a bearer header.
Published
This article was drafted with AI assistance from the sources listed below and edited and published by Teneo Labs. Disclosure: this site is run by Teneo Labs, the company behind Live Web Data API, which this article mentions.
- 1List the tools--method tools/list against the same URL and header your client uses.
- 2Call the cheapest tool--method tools/call --tool-name with a tool that does no real work.
- 3Read the answerWorks here but not in the client: the client config is the problem.
MCP Inspector is the MCP project's own test client. Most people know its web UI, but it also has a CLI mode: add --cli, name one method, and it prints the result and exits. That makes it the fastest way to answer one question when a client shows a red dot or "failed": is the server broken, or is my client config?
The commands below were checked against the Inspector README as of this post's date. Flags change between versions, so run npx @modelcontextprotocol/inspector --help if one is rejected.
List the tools of a local server
For a server your client starts over stdio, give Inspector the same command and arguments:
npx @modelcontextprotocol/inspector --cli uvx mcp-server-fetch \
--method tools/list
Inspector starts the process, runs the MCP handshake and prints the tool list as JSON. If this fails, the command itself is wrong or the runtime is missing, and no client config will fix it.
List the tools of a remote server
For a Streamable HTTP server, pass the URL, the transport and the header your client sends:
npx @modelcontextprotocol/inspector --cli https://fetchmcp.net/mcp \
--transport http --method tools/list \
--header "Authorization: Bearer $LIVE_WEB_DATA_API_KEY"
Use the exact URL from your client config, including the path. A server that answers here but not in your client is fine; the problem is in the client entry, often the transport type or a variable that was never expanded.
Call one tool
Listing tools proves the connection. Calling one proves the key and the account. Pick a tool that does no real work:
npx @modelcontextprotocol/inspector --cli https://fetchmcp.net/mcp \
--transport http --header "Authorization: Bearer $LIVE_WEB_DATA_API_KEY" \
--method tools/call --tool-name get_account_status
Arguments go in as --tool-arg key=value, one flag per argument, for example --tool-arg url=https://example.com for a fetch tool. Start with the defaults before you add size or format options.
What each result tells you
| Inspector result | Broken layer | Next step |
|---|---|---|
| Connection refused, DNS or TLS error | Network | Check the host, VPN or proxy |
401 or 403 | Key or account | See the authentication guide |
404 | Path | Check the URL path, often /mcp |
| Tool list prints, client still fails | Client config | Compare the client entry with the command above |
| Tool call returns an error result | The tool, not the connection | See the errors guide |
The full order of checks, from curl to client logs, is in the debugging runbook.
Try it against a real server
Live Web Data API, made by Teneo Labs, runs a remote Streamable HTTP server whose get_account_status tool costs nothing, so the tool call above is a free smoke test once you have a key. The current URL and client configs are in the MCP docs.
Frequently asked questions
Does MCP Inspector need to be installed?
No. npx downloads and runs it on demand. It needs a recent Node.js; the README states the supported version.
Can MCP Inspector send an Authorization header?
Yes. In CLI mode, add --header "Authorization: Bearer $YOUR_VAR" to the command. Let your shell expand the variable so the key never appears in a file.
Sources
- MCP Inspector README (Documentation)
- Debugging (Model Context Protocol docs) (Documentation)