mcp-doctor

mcp-doctor

Diagnose, secure, and benchmark your MCP servers. Zero-config CLI for Claude Code, Cursor, VS Code, and Windsurf.

Category
Visit Server

README

MIT License Node >= 18 npm npm downloads

mcp-doctor

Diagnose, secure, and benchmark your MCP servers.

Zero-config CLI that auto-discovers MCP server configs across Claude Code, Cursor, VS Code, Windsurf, and Claude Desktop — then tests connections, flags security issues, and benchmarks latency in seconds.

<p align="center"> <img src="assets/demo-doctor.svg" alt="mcp-doctor doctor" width="820"> </p>

Why?

MCP servers are becoming the backbone of AI-assisted development. But as you add more servers across more tools, things break silently:

  • Servers go down and you don't notice until a tool call fails mid-conversation
  • Secrets leak — API keys hardcoded in config files, tokens visible in process args
  • Slow servers drag down your entire AI workflow without you realizing it
  • Configs drift between tools — what works in Cursor might be broken in Claude Desktop

mcp-doctor gives you a single command to check everything, across every tool, in seconds.

Quick Start

npx @wigu/mcp-doctor doctor

That's it. No config needed — it finds your servers automatically.

Commands

Command Description
doctor Run all checks at once (scan + security + bench)
scan Test all MCP server connections
security Audit configs for security issues
bench Benchmark server response times
serve Run as an MCP server (stdio transport)

All commands support --json for machine-readable output.

doctor — Full checkup (recommended)

Runs scan, security, and bench in one go and prints a summary.

mcp-doctor doctor

# JSON output for CI/scripts
mcp-doctor doctor --json

scan — Test all MCP server connections

Discovers configs and verifies each server responds to a JSON-RPC handshake.

$ mcp-doctor scan

  ┌─────────────────────────────────────────┐
  │           mcp-doctor v0.3.0             │
  │   Diagnose · Secure · Benchmark         │
  └─────────────────────────────────────────┘

  ✔ Found 3 server(s)

  ┌──────────────┬────────────┬─────────┐
  │ Server       │ Source     │ Status  │
  ├──────────────┼────────────┼─────────┤
  │ filesystem   │ Claude     │ ✔ OK    │
  │ postgres     │ Cursor     │ ✔ OK    │
  │ slack        │ VS Code    │ ✘ FAIL  │
  └──────────────┴────────────┴─────────┘

security — Audit configs for security issues

Checks for leaked secrets, overly broad permissions, and risky command patterns.

$ mcp-doctor security

  ⚠  2 issues found

  ┌──────────┬──────────┬───────────────────────────────┐
  │ Severity │ Server   │ Issue                         │
  ├──────────┼──────────┼───────────────────────────────┤
  │ HIGH     │ postgres │ Plaintext password in config  │
  │ MEDIUM   │ slack    │ Token visible in args         │
  └──────────┴──────────┴───────────────────────────────┘

bench — Benchmark server response times

Measures JSON-RPC round-trip latency for every configured server.

$ mcp-doctor bench

  ┌──────────────┬──────────┬────────┐
  │ Server       │ Latency  │ Rating │
  ├──────────────┼──────────┼────────┤
  │ filesystem   │ 12ms     │ fast   │
  │ postgres     │ 87ms     │ ok     │
  │ slack        │ timeout  │ —      │
  └──────────────┴──────────┴────────┘

MCP Server Mode

mcp-doctor can also run as an MCP server itself, exposing scan, security, bench, and doctor as tools your AI assistant can call directly.

{
  "mcpServers": {
    "mcp-doctor": {
      "command": "npx",
      "args": ["@wigu/mcp-doctor"]
    }
  }
}

When invoked without arguments and stdin is piped, it automatically starts in server mode using stdio transport. You can also explicitly run:

mcp-doctor serve

This means your AI assistant can diagnose its own MCP infrastructure on demand.

GitHub Action

Use mcp-doctor in CI to catch broken servers and leaked secrets automatically:

- name: Check MCP servers
  uses: realwigu/mcp-doctor@main
  with:
    command: doctor
    fail-on-error: "true"

The action outputs JSON via ${{ steps.mcp-doctor.outputs.result }} for downstream processing.

JSON Output

All commands support --json for structured output — useful for CI pipelines, dashboards, or scripting:

mcp-doctor doctor --json | jq '.summary'
{
  "servers": 3,
  "healthy": 2,
  "securityIssues": 1,
  "avgLatencyMs": 45
}

Supported Tools

Tool Config Auto-Detected
Claude Code
Claude Desktop
Cursor
VS Code
Windsurf

mcp-doctor reads each tool's config file from its standard location and merges all discovered servers into a single view.

What It Checks

  • Connection health — JSON-RPC initialize handshake against every server
  • Security issues — plaintext secrets, tokens in args, dangerous shell commands
  • Latency benchmarks — round-trip timing with fast / ok / slow ratings

Install

# Run directly (no install needed)
npx @wigu/mcp-doctor scan

# Or install globally
npm install -g @wigu/mcp-doctor
mcp-doctor scan

Requires Node.js 18+.

Contributing

Contributions are welcome! Open an issue or submit a pull request.

  1. Fork the repo
  2. Create a feature branch (git checkout -b my-feature)
  3. Commit your changes
  4. Open a PR

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured