Hi, I'm Nicholas 👋
I'm a Senior Platform Engineer

Buy Me A Coffee

Testing MCP servers with MCP Inspector

Date published:

If you’re building tools, resources, or prompts with the Model Context Protocol (MCP), the fastest feedback loop is MCP Inspector. It connects to your server over stdio or WebSocket, lets you invoke tools, fetch resources, and preview prompts—without writing any client code.

This post shows a practical, end‑to‑end workflow I use to validate an MCP server (Python or Node.js), plus common pitfalls and fixes.

What you’ll test

Use your own server or drop in a minimal example. The goal is to prove the contract works before wiring it into apps and agents.

Why MCP Inspector

Install or launch MCP Inspector

https://github.com/modelcontextprotocol/inspector

Connect a stdio server

  1. In Inspector, click Add Server → Transport: stdio
  2. Command: the executable that starts your server
  3. Args: any arguments your server needs
  4. Working Directory: folder where your server expects to run
  5. Save → Connect

Inspector will start your process and stream stderr for visibility. If your server speaks MCP over stdio, you’ll see Tools, Resources, and Prompts populate.

Connect a WebSocket server

  1. Add Server → Transport: WebSocket
  2. URL: ws://localhost:PORT (or wss:// for TLS)
  3. Save → Connect

If your server requires auth headers or query params, add them as needed.

Using the Inspector

Below gist contains a tiny Python server with one tool, one resource

Wrap‑up

MCP Inspector is the quickest way to validate an MCP server contract: wire up stdio/WebSocket, run a few calls, and iterate fast with live logs. Once everything looks good, plug the same server into your app with confidence.

References