MCP Inspector

An interactive developer tool for testing, debugging, and validating MCP servers with a rich web-based UI.

🔍

Introduction

The MCP Inspector is an official developer tool from the Model Context Protocol team for testing and debugging MCP servers. It provides an interactive web-based interface where developers can connect to MCP servers, inspect available tools and resources, execute tool calls, and validate server behavior — all without writing any client code.

MCP (Model Context Protocol) is an open protocol developed by Anthropic that standardizes how applications provide context and tools to LLMs. The Inspector serves as the primary debugging tool for the MCP ecosystem, allowing both server authors and integrators to verify that MCP servers work correctly before deploying them to production. It is hosted on GitHub at github.com/modelcontextprotocol/inspector.

💻

Installation & Quick Start

The MCP Inspector runs via npx with no prior installation required. The only prerequisite is Node.js 22.7.5 or later.

Quick Start (UI Mode)

npx @modelcontextprotocol/inspector

The server starts and the UI is accessible at http://localhost:6274.

Inspect a Specific Server

npx @modelcontextprotocol/inspector node build/index.js

# With environment variables
npx @modelcontextprotocol/inspector -e API_KEY=sk-... node build/index.js

# Custom ports
CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js

Docker

docker run --rm \
  -p 127.0.0.1:6274:6274 \
  -p 127.0.0.1:6277:6277 \
  -e HOST=0.0.0.0 \
  ghcr.io/modelcontextprotocol/inspector:latest
🏗️

Architecture Overview

The MCP Inspector consists of two main components that work together:

  • MCP Inspector Client (MCPI) — A React-based web UI that provides an interactive interface for testing and debugging MCP servers. Default port: 6274.
  • MCP Proxy (MCPP) — A Node.js server that acts as a protocol bridge, connecting the web UI to MCP servers via various transport methods (stdio, SSE, streamable-http). Default port: 6277.

The proxy acts as both an MCP client (connecting to your MCP server) and an HTTP server (serving the web UI). This dual role enables browser-based interaction with MCP servers that use different transport protocols — including stdio processes, SSE (Server-Sent Events) endpoints, and streamable HTTP connections. The port numbers 6274 and 6277 are derived from the T9 dialpad mapping of MCPI and MCPP respectively.

🛠️

Usage Guide

Once the Inspector is running and connected to your MCP server, the web UI provides several key panels:

PanelFunction
Tools ListView all tools exposed by the MCP server, including descriptions and parameter schemas
Tool Call ConsoleExecute tool calls with custom arguments and see raw JSON responses
Resources PanelBrowse available resources (files, data, endpoints) exposed by the server
Prompt TemplatesView and test prompt templates with parameter substitution
Logs & DiagnosticsReal-time server logs, error messages, and protocol-level diagnostics
Connection ConfigConfigure transport, arguments, environment variables, and auth tokens
🔐

Authentication & Security

The MCP Inspector proxy server requires authentication by default to prevent unauthorized access. When starting the server, a random session token is generated and printed to the console. This token must be included as a Bearer token in the Authorization header for all requests. The Inspector automatically opens your browser with the token pre-filled in the URL.

🔑 Session token: 3a1c267f...
🔗 Open inspector with token pre-filled:
   http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=3a1c267f...

For SSE connections, the Inspector supports bearer token authentication — enter your token in the UI when connecting, and it will be sent in the Authorization header. The proxy server should not be exposed to untrusted networks as it has permissions to spawn local processes.

📤

Exporting Configurations

The MCP Inspector provides convenient export buttons to save server launch configurations for use in clients such as Cursor, Claude Code, or as a standalone mcp.json file. You can copy a single server entry to paste into an existing configuration, or export a complete servers file ready for use.

Supported Transport Formats

  • STDIO — Command + args + environment variables for process-based MCP servers
  • SSE — URL-based configuration for Server-Sent Events transport
  • Streamable HTTP — URL-based configuration for the newer streamable HTTP transport protocol

Exported configurations include the correct command, arguments, environment variables, and transport type. This feature makes it easy to move from testing in the Inspector to production deployment in MCP client applications.