Official MCP testing tool

MCP Inspector: test any MCP server before you install it

The MCP Inspector is the reference developer tool for testing and debugging Model Context Protocol servers. One package, @modelcontextprotocol/inspector, gives you three clients behind one binary: a browser web UI, a scriptable CLI, and a terminal TUI. All three share the same core, so a connection behaves identically across them.

This page collects the commands worth knowing before you paste an unknown MCP server into Claude Desktop, VS Code, or any other client.

Last reviewed on 2026-08-23 against the official MCP Inspector documentation.

What the Inspector actually is

The MCP Inspector is maintained as the reference developer tool in the modelcontextprotocol/inspector repository. It ships as a single package, @modelcontextprotocol/inspector, providing three clients behind one binary.

  • Web: npx @modelcontextprotocol/inspector launches the full graphical inspector in the browser. This is the default and richest surface.
  • CLI: npx @modelcontextprotocol/inspector --cli is a scriptable, machine-readable client for CI, shell pipelines, and coding agents.
  • TUI: npx @modelcontextprotocol/inspector --tui is an interactive terminal UI for when a browser is unavailable or unwanted.
  • All three are built on the same shared core: the same transports, the same configuration files, and the same OAuth state on disk.

Launch the web UI against a local server

Pass the command that launches your server as the Inspector's arguments, or launch with no target and add servers from the UI. The command prints a URL containing a one-time session token; open that URL in your browser.

web quickstart
# Launch the web UI connected to a local stdio server npx @modelcontextprotocol/inspector node path/to/server/index.js # Or launch with no target and add servers from the UI npx @modelcontextprotocol/inspector

No installation step is needed; npx runs the package directly. Node 22.19.0+ is required.

Inspect already-published servers

For packaged servers, pass their normal launch command after the inspector invocation, or point at a remote URL with --server-url. Always read the server's own README first, since every server requires different commands and arguments.

published server examples
# npm package npx -y @modelcontextprotocol/inspector npx @modelcontextprotocol/server-filesystem ~/Desktop # PyPI package launched with uvx npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/mcp/servers.git # Remote HTTP server npx @modelcontextprotocol/inspector --server-url https://api.example.com/mcp --transport http

The first example scopes a filesystem server to a single folder. Keep scopes narrow while you are only testing.

Script single calls with the CLI

CLI mode answers one method and exits, which makes it usable in CI, shell pipelines, and coding agents. Machine-readable output is controlled with flags such as --format json.

cli mode
# List a server's tools and exit npx @modelcontextprotocol/inspector --cli node path/to/server/index.js --method tools/list # Call one tool and pipe the result into jq npx @modelcontextprotocol/inspector --cli https://api.example.com/mcp --transport http \ --method tools/call --tool-name get_weather --tool-arg city=Boston --format json | jq .result

Run --method tools/list first to see real tool names before calling anything.

Launcher flags vs client flags

mcp-inspector, the binary behind npx @modelcontextprotocol/inspector, is a thin launcher. It owns only two things: the mode flag (--web by default, --cli, or --tui) and -h/--help. Everything else, including --catalog, --config, --server-url, --transport, --method, and the OAuth flags, belongs to the client you selected, and clients do not all define the same set.

Mode flags are recognized only at the front of the command line: the first token that is not --web, --cli, or --tui ends launcher parsing, and everything after it is forwarded unchanged. That is why a literal --cli can still appear later as one of your server's own arguments.

  • Bare mcp-inspector --help prints the launcher help and exits.
  • With a mode flag, --help is forwarded instead, so mcp-inspector --cli --help prints the CLI's full flag reference.
parsing example
# Mode is CLI; the trailing --cli goes to server.js mcp-inspector --cli node server.js --cli

Passing two mode flags errors with: Specify at most one of --web, --cli, or --tui.

Safety notes before connecting a real server

  • The web UI URL carries a one-time session token. Do not share it, and do not host the Inspector openly on a network without reviewing the authorization documentation.
  • Read the server's own README before launching it; every server requires different commands and arguments.
  • When testing filesystem servers, scope them to one throwaway directory instead of a broad root such as an entire home folder.
  • Treat remote URLs as untrusted until you have verified who operates them, then re-check with the security checklist linked below.

FAQ

What is the MCP Inspector?

It is the reference developer tool for testing and debugging MCP servers. The single package @modelcontextprotocol/inspector provides three clients behind one binary: a browser web UI, a scriptable CLI, and a terminal TUI, all built on the same shared core.

What does the MCP Inspector require to run?

Node 22.19.0 or newer. It runs directly through npx with no installation step.

Can the Inspector test remote HTTP servers?

Yes. Pass --server-url plus a transport, for example npx @modelcontextprotocol/inspector --server-url https://api.example.com/mcp --transport http.

How do I call one tool without opening the browser?

Use CLI mode: add --cli, then --method tools/call with --tool-name and --tool-arg key=value pairs, and --format json for machine-readable output you can pipe into jq.

Why did my extra flags end up in the wrong place?

Only leading --web/--cli/--tui and -h belong to the launcher. The first non-mode token ends launcher parsing, and everything after it is forwarded to the selected client or server command.

Related guides