MCP Inspector as MCP Server
A lean MCP server that enables LLMs to inspect and test other MCP servers. This is a self-contained implementation that uses the MCP SDK directly, without shelling out to external CLIs.
Features
Direct SDK integration: Uses
@modelcontextprotocol/sdkdirectly for both server and client operationsAll transport types: Supports stdio, SSE, and HTTP (streamable) transports
Minimal footprint: Single dependency (
@modelcontextprotocol/sdk), ~300 lines of codeFull MCP inspection: List tools, call tools, list resources, read resources, list prompts, get prompts
Installation
Usage
As an MCP Server
Add to your MCP config. While there are slight variances between different harnesses, the general format is the same:
Available Tools
Tool | Description |
| List all tools exposed by an MCP server |
| Call a tool on an MCP server |
| List all resources exposed by an MCP server |
| Read a specific resource |
| List resource templates |
| List all prompts |
| Get a specific prompt |
Connection Parameters
All tools accept the following connection parameters:
For stdio transport (local commands):
command: Command to run (e.g.,"node","python")args: Array of arguments (e.g.,["path/to/server.js"])
For SSE/HTTP transport (remote servers):
url: Server URL (e.g.,"http://localhost:3000/sse")headers: Optional HTTP headers object
Common:
transport: Force transport type ("stdio","sse", or"http"). Auto-detected if not specified.
Examples
List tools from a local MCP server:
Call a tool on a remote server:
Architecture
Why This Exists
The original MCP Inspector is a web-based UI + CLI combo spread across multiple projects. This consolidates the core functionality into a single, lean MCP server that an LLM can use to:
Develop and debug MCP servers iteratively
Test MCP server functionality without leaving the conversation
Explore what tools/resources/prompts an MCP server exposes
License
MIT