Loading

When building MCP servers, you need a way to test your functionality without connecting to a full application. The Python MCP SDK includes a built-in browser-based inspector that lets you debug and test your server in real-time.

Starting the Inspector

First, make sure your Python environment is activated (check your project's README for the exact command). Then run the inspector with:

bash
mcp dev mcp_server.py

This starts a development server and gives you a local URL (typically on port 6277) to access the inspector in your browser.

Terminal output: proxy server listening on port 6277 and MCP Inspector is up and running at http://127.0.0.1:6274.

Using the Inspector Interface

The MCP inspector is actively being developed, so the interface may look different when you use it. However, the core functionality remains consistent.

The MCP inspector before connecting, with standard input/output transport, a "Connect" button and status "Disconnected".

After clicking "Connect" to start your MCP server, you'll see a navigation bar with sections for:

  • Resources
  • Prompts
  • Tools
  • Other server capabilities

Testing Your Tools

The Tools section is where you'll spend most of your debugging time. Click "List Tools" to see all the tools your server provides.

MCP Inspector Tools tab after clicking "List Tools", listing read_doc_contents and edit_document with a description of each.

When you select a tool, the right panel shows its details and provides input fields for testing. For example, to test the read_doc_contents tool:

  1. Select the tool from the list
  2. Enter a document ID (like "deposition.md")
  3. Click "Run Tool"
  4. Check the results for success and expected output

MCP Inspector Tools tab listing the read_doc_contents and edit_document tools, with a doc_id field and Run Tool button.

Testing Tool Interactions

You can test multiple tools in sequence to verify they work together correctly. For instance, after using the edit_document tool to modify content:

MCP Inspector edit_document form with doc_id deposition.md, old_str "This" and new_str "A report", and Tool Result: Success.

Run the read_doc_contents tool again with the same document ID to confirm your changes were applied:

MCP inspector: read_doc_contents on "deposition.md" shows Tool Result Success and text starting "A report deposition covers".

Development Workflow

The inspector creates an efficient development loop:

  • Make changes to your MCP server code
  • Test individual tools with various inputs
  • Verify tool interactions work as expected
  • Debug issues without needing a full application setup

This browser-based testing environment is essential for MCP server development. It saves time by letting you catch issues early and verify functionality before integrating with Claude or other applications.