MCP Inspector
Official interactive tool to test, inspect and validate MCP servers. Visual testing and real-time debugging.
What is the MCP Inspector?
The MCP Inspector is an official tool developed by Anthropic that provides an interactive web interface to test and debug MCP servers. It allows inspecting JSON-RPC messages, testing resources and tools, and validating that your server works correctly before integrating it with real clients.
Visual
Intuitive web interface to interact with your server without writing code.
Real Time
Observe all JSON-RPC messages as they occur, with timestamps and clear formatting.
Complete
Test resources, tools and prompts from a single interface.
Main Features
The Inspector provides all the tools needed to test and validate MCP servers.
Real-Time Inspection
Visualize all JSON-RPC messages exchanged between client and server in real time.
- Visible Request and Response
- Timestamps for each message
- Formatted JSON format
- Message search and filtering
Resource Testing
List, read and search resources directly from the interface. Validate that your resources work correctly.
- List all resources
- Read resource content
- Search resources by query
- Validate URIs and metadata
Tool Testing
Execute tools with custom parameters and visualize results immediately.
- List available tools
- Execute tools with parameters
- Validate input schemas
- View structured results
Prompt Validation
Test prompts with different arguments and validate that they generate expected messages.
- List available prompts
- Get prompts with arguments
- Validate message structure
- Test different combinations
Installation and Usage
Install the Inspector and start testing your MCP server in minutes.
Installation
Install the Inspector globally or use it as a development dependency
# Global installation npm install -g @modelcontextprotocol/inspector # Or as development dependency npm install -D @modelcontextprotocol/inspector
Basic Usage
Run the Inspector with your MCP server command
# Python server mcp-inspector --server "python -m my_server" # TypeScript/Node.js server mcp-inspector --server "node server.js" # With additional arguments mcp-inspector --server "python -m my_server" --args "--config config.json"
Interactive Mode
The Inspector opens an interactive web interface in your browser
# When running, the Inspector: # 1. Starts the specified MCP server # 2. Opens a web interface at http://localhost:3000 # 3. Allows visual interaction with the server # Navigate to the URL shown in the terminal # Example: http://localhost:3000
Testing and Validation
Common test scenarios to validate that your MCP server works correctly.
Validate Initialization
Verify that the server initializes correctly and reports its capabilities.
Steps:
- 1Run the Inspector with your server
- 2Observe the 'initialize' message in the messages tab
- 3Verify that the response includes correct capabilities
- 4Confirm that 'initialized' is sent correctly
Expected Result:
The server should report its capabilities (resources, tools, prompts) correctly.
Test Tool List
Validate that all tools are available and have valid schemas.
Steps:
- 1Navigate to the 'Tools' section in the Inspector
- 2Click 'List Tools'
- 3Check that all tools appear
- 4Verify that each tool has name, description and inputSchema
Expected Result:
All tools should appear with their complete metadata.
Execute a Tool
Test executing a tool with different parameters.
Steps:
- 1Select a tool from the list
- 2Complete the form with required parameters
- 3Click 'Call Tool'
- 4Review the response in the results panel
Expected Result:
The tool should execute and return a valid result.
Validate Resources
Verify that resources can be listed, read and searched correctly.
Steps:
- 1Go to the 'Resources' section
- 2Click 'List Resources'
- 3Select a resource and click 'Read'
- 4Test search with different queries
Expected Result:
Resources should be accessible and return valid content.
Inspector Interface
Description of the main sections of the Inspector web interface
Message Panel
Shows all JSON-RPC messages exchanged between client and server. You can see requests, responses and errors with timestamps and formatted JSON.
Resources Section
Allows listing all available resources, reading content from specific resources and searching resources using queries. Validates URIs and metadata.
Tools Section
Lists all available tools and allows executing them with custom parameters. Includes schema validation and result visualization.
Prompts Section
Test prompts with different arguments and validate that they generate expected messages. Useful for validating reusable prompt templates.
Best Practices for Testing
Before Integrating
- Test all available resources
- Validate that all tools work
- Verify input schemas
- Check error handling
- Test with invalid parameters
During Development
- Use the Inspector for iterative development
- Validate changes immediately
- Review JSON-RPC messages for debugging
- Test edge cases and boundary conditions
- Document expected behaviors
Ready to test your server?
Install the Inspector and start validating your MCP server. Explore more resources and guides.