logoalt Hacker News

ameshkovtoday at 3:49 AM2 repliesview on HN

> I couldn’t find a great CLI tool for interactively probing an MCP server

What about mcp-inspector? It’s a nice tool, can be used interactively, can be used as a CLI.

https://github.com/modelcontextprotocol/inspector


Replies

simonwtoday at 5:03 AM

The documentation for the --cli mode is a bit lacking, but I got there in the end:

  npx @modelcontextprotocol/inspector --cli \
    https://agentic-mermaid.dev/mcp \
    --method tools/call \
    --tool-name render_svg \
    --tool-args-json '{"source":"graph TD; A-->B","options":{"padding":24}}'
Equivalent with my mcp-explorer tool:

  uvx mcp-explorer call \
    https://agentic-mermaid.dev/mcp render_svg \
    -a source 'graph TD; A-->B' \
    -a options '{"padding":24}'
So yeah, they're pretty similar.

Then for my list command:

  uvx mcp-explorer list https://agentic-mermaid.dev/mcp
With the inspector one you would do:

  npx @modelcontextprotocol/inspector --cli \
    https://agentic-mermaid.dev/mcp \
    --method tools/list
Mine returns a human-readable list (unless you add --json), the inspector one returns a big dump of raw JSON.
hobofantoday at 5:34 AM

I would generally agree, but a word of caution for anyone trying it out from this thread: Try the latest pre 2.x version. The 2.0.0 that was released last week is highly broken even for some of the most common connection scenarios.