Labsco
modelcontextprotocol logo

MCP Inspector

βœ“ Officialβ˜… 10,300

from modelcontextprotocol

A developer tool for testing and debugging MCP servers.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

MCP Inspector

The MCP inspector is a developer tool for testing and debugging MCP servers.

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

  • 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)

Note that the proxy is not a network proxy for intercepting traffic. Instead, it functions as both an MCP client (connecting to your MCP server) and an HTTP server (serving the web UI), enabling browser-based interaction with MCP servers that use different transport protocols.

Tool Input Validation Guidelines

When implementing or modifying tool input parameter handling in the Inspector:

  • Omit optional fields with empty values - When processing form inputs, omit empty strings or null values for optional parameters, UNLESS the field has an explicit default value in the schema that matches the current value

  • Preserve explicit default values - If a field schema contains an explicit default (e.g., default: null), and the current value matches that default, include it in the request. This is a meaningful value the tool expects

  • Always include required fields - Preserve required field values even when empty, allowing the MCP server to validate and return appropriate error messages

  • Defer deep validation to the server - Implement basic field presence checking in the Inspector client, but rely on the MCP server for parameter validation according to its schema

These guidelines maintain clean parameter passing and proper separation of concerns between the Inspector client and MCP servers.

License

This project is licensed under the MIT Licenseβ€”see the LICENSE file for details.