MCP Doctor MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add mcp-doctor -- npx @wigu/mcp-doctor
README.md

Diagnose, secure, and benchmark your MCP servers.

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.

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

Tools (4)

doctorRun all checks at once including scan, security, and bench.
scanTest all MCP server connections and verify JSON-RPC handshakes.
securityAudit configurations for security issues like leaked secrets or risky patterns.
benchBenchmark server response times and measure JSON-RPC latency.

Configuration

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

Try it

Run a full diagnostic check on all my configured MCP servers.
Scan my MCP server connections to see if any are currently failing.
Perform a security audit on my MCP configurations to check for leaked secrets.
Benchmark the response times of my active MCP servers to identify slow connections.

Frequently Asked Questions

What are the key features of MCP Doctor?

Auto-discovers MCP server configurations across multiple AI tools. Verifies server connectivity via JSON-RPC handshakes. Audits configurations for security vulnerabilities and leaked secrets. Benchmarks server latency to identify performance bottlenecks. Supports JSON output for integration into CI/CD pipelines.

What can I use MCP Doctor for?

Troubleshooting silent failures in AI-assisted development workflows. Ensuring API keys and tokens are not accidentally exposed in configuration files. Optimizing AI tool performance by identifying and replacing slow MCP servers. Automating MCP server health checks within CI/CD environments.

How do I install MCP Doctor?

Install MCP Doctor by running: npx @wigu/mcp-doctor doctor

What MCP clients work with MCP Doctor?

MCP Doctor works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Doctor docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare