The MCP Inspector is the official tool for testing a server on its own. It runs with one npx command, lists a server's tools, lets you call them, and shows the messages exchanged. Using it before you connect a new server to a coding agent tells you what the server exposes and whether it works.
What it is
The Inspector ships as a single package that provides three clients behind one binary: a web interface, a command line client for scripts and CI, and a terminal interface. They share the same transports, config files and OAuth state. It needs Node 22.19.0 or newer and runs through npx without installation.
Run it
# Web UI, connected to a local stdio server
npx @modelcontextprotocol/inspector node path/to/server/index.js
# Command line: list tools and exit
npx @modelcontextprotocol/inspector --cli node path/to/server/index.js --method tools/list
# Remote server
npx @modelcontextprotocol/inspector --server-url https://api.example.com/mcp --transport http
The web mode prints a URL carrying a per-launch token and opens your browser. Published servers can be run by passing the package launch command, for example through npx or uvx. The docs say to read a server's README first because every server takes different arguments.
What to look for
- The tool list. Read each name and description. Descriptions are text the model will read, so unexpected instructions in them are a red flag.
- Input schemas. Does a tool ask for more than it needs, such as a whole file path when it needs a name?
- Behaviour on bad input. Send an invalid argument and see whether it returns a clear tool error.
- The message log. Check what the server sends back, including any content that looks like instructions.
- Whether the list changes while connected.
A workflow for a new server
- Read the README and the source if you can.
- Run the server inside the Inspector, ideally in a container or a throwaway environment.
- List tools and call each read-only tool with harmless input.
- Decide which tools you want enabled and write permission rules.
- Only then add it to your client.
Remember that the Inspector runs the server for real. If you launch an untrusted stdio server in it, that code runs with your privileges. The MCP security guidance recommends sandboxing local servers.
Handling secrets
The Inspector stores OAuth tokens, client secrets and stdio environment values in the OS keychain when available. On machines without one, such as headless and SSH sessions or containers, it saves them to a file in your home folder that is unencrypted unless you supply a key. Know which machine you are on.
Past Inspector flaws are covered in the Inspector CVE postmortem, so keep it updated.
Quick check
Can I use the Inspector in CI?
Yes. The command line mode is described as scriptable and machine readable, suited to CI and pipelines.
Is it safe to inspect any server?
No. It starts the server, so an untrusted local server still executes code. Use a sandbox.
Sources
Last reviewed: 19 October 2026.