Model Context Protocol describes MCP Inspector as a developer tool for testing and debugging MCP servers. Inspector can connect to stdio and Streamable HTTP servers. It can make calls for tools, prompts, and resources and display the notification stream.
Inspector provides web, CLI, and TUI clients in a single package. The web client opens a graphical interface in your browser. The CLI runs from the command line and produces machine-readable output. The TUI provides an interactive terminal interface. Model Context Protocol recommends using Inspector to test the server independently when troubleshooting connection issues.
Launch Inspector
You can run Inspector directly with npx. To open the web interface and add a server from there, use the command provided by Model Context Protocol.
npx @modelcontextprotocol/inspector
The command prints a URL containing an API token for that launch and opens the browser. Use MCP_AUTO_OPEN_ENABLED=false to disable automatic browser opening. To launch Inspector with a local stdio server, use this command.
npx @modelcontextprotocol/inspector node path/to/server/index.js
When inspecting a published server, Model Context Protocol says you can pass the command that starts the server as an argument to Inspector. You can also point Inspector to a remote server with --server-url. The required command and arguments vary by server, so Model Context Protocol directs you to the server’s README.
To open an interactive interface in your terminal, use the TUI.
npx @modelcontextprotocol/inspector --tui node path/to/server/index.js
The three clients share a common core. According to Model Context Protocol, they handle connection transports, configuration files, and OAuth state on disk in the same way. Each client defines its own set of flags.
The Inspector launcher accepts at most one of the mode flags --web, --cli, or --tui. It recognizes mode flags at the start of the command line. From the first token that is not a mode flag onward, arguments pass to the client unchanged. The behavior of --help also depends on the mode flag. Without one, it shows launcher help. With one, it shows help for the selected client.
List tools and try a tool call
The Inspector CLI can list a server’s tools and then exit. Model Context Protocol provides this example.
npx @modelcontextprotocol/inspector --cli node path/to/server/index.js --method tools/list
Model Context Protocol also provides an example of a tool call that uses HTTP transport and pipes the result to 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
You can also make a tool call from the web client. Model Context Protocol notes that the monitoring sidebar can display the JSON-RPC exchange. Inspector’s interactive test interface also lets you monitor the notification stream.
The Model Context Protocol debugging workflow uses Inspector for basic tests and rapid iteration during development. During integration, the workflow includes testing in the target MCP client, monitoring logs, and reviewing error handling.
Model Context Protocol directs you to restart the MCP client after changing its configuration or the server code. The guide also calls for adding logging during development.
If the server fails to start or connect
The Model Context Protocol debugging guide groups startup issues into three categories covering paths, configuration, and the environment. An incorrect path to the server executable, missing files, or permission issues can prevent startup. One troubleshooting step in the guide is to use an absolute path for command.
Invalid JSON syntax, missing required fields, or type mismatches in the configuration can also cause startup issues. Possible environment issues include missing environment variables, incorrect values, and permission restrictions.
When a client launches a stdio server from its configuration, the server’s working directory may be undefined. When you test the server directly from the command line, its working directory is where you run the command. Model Context Protocol directs you to use absolute paths in configuration and .env files.
MCP servers launched over stdio automatically inherit only a limited subset of environment variables. The subset varies by platform. Model Context Protocol notes that you can use the env key in the client configuration to override default variables or supply your own values.
If the connection fails, the guide recommends checking the client logs and verifying that the server process is running. The same workflow includes testing the server independently with Inspector and checking protocol compatibility.