MCP Inspector logo

MCP Inspector

by modelcontextprotocol

The MCP inspector is a developer tool for testing and debugging MCP servers. It provides both a UI and CLI mode for interacting with MCP servers.

View on GitHub

Last updated: N/A

What is MCP Inspector?

The MCP Inspector is a tool designed to help developers test and debug MCP (Model Context Protocol) servers. It includes a proxy server and a client UI, and it supports CLI mode for automation.

How to use MCP Inspector?

The inspector can be run from an MCP server repository using npx @modelcontextprotocol/inspector node build/index.js. It offers both a UI (default port 6274) and a CLI mode. Configuration can be adjusted through the UI or using configuration files. CLI mode is enabled with npx @modelcontextprotocol/inspector --cli node build/index.js.

Key features of MCP Inspector

  • UI for interactive testing

  • CLI mode for automation and scripting

  • Proxy server for local MCP processes

  • Configuration settings for request timeouts

  • Support for bearer token authentication

  • Configuration file support

Use cases of MCP Inspector

  • Testing MCP server implementations

  • Debugging MCP servers

  • Scripting interactions with MCP servers

  • Automating MCP server testing in CI/CD pipelines

  • Integrating with coding assistants like Cursor

  • Exploring and understanding MCP server capabilities

FAQ from MCP Inspector

How do I run the inspector?

Use npx @modelcontextprotocol/inspector node build/index.js from your MCP server repository.

How do I configure the inspector?

You can adjust settings in the UI or use a configuration file.

What is CLI mode?

CLI mode allows programmatic interaction with MCP servers from the command line.

What ports does the inspector use?

The MCPI client UI uses port 6274 (default), and the MCPP server uses port 6277 (default).

How do I pass environment variables to my MCP server?

Use the -e flag with npx @modelcontextprotocol/inspector, for example: npx @modelcontextprotocol/inspector -e key=value node build/index.js