MCP Doctor

io.github.JiansenPublished by GitHub account Jiansenv0.1.0Updated Oct 24, 2026

Check and improve the contract quality of any MCP server — for humans, agents, and platforms.

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

MCP Doctor audits any MCP server's contract quality across six dimensions and returns scored, actionable recommendations.

What you can do
  • Run all six contract-quality checks on a local MCP server repository and get scores with grades and recommendations
  • List the dimensions MCP Doctor evaluates, such as task clarity, trust and safety, interface quality, token efficiency, install friction and cross-platform readiness
  • Choose rule-based offline scoring or an LLM-enhanced qualitative review
  • Return results as terminal text, JSON for CI pipelines, or Markdown for reports and badges
When to use it
Useful when you build or maintain an MCP server and want an objective read on how clear, safe, token-efficient and platform-ready it is before publishing or listing it. Also handy for agents asked to review another server's metadata and tool definitions.
Requirements
Runs locally as a Python package installed with pip; the MCP server is started with python -m mcp_doctor.mcp_server. Rule-based mode needs no network or keys. AI mode needs the OPENAI_API_KEY variable, optionally OPENAI_BASE_URL and MCP_DOCTOR_MODEL, plus the ai extra installed.
Before you install
Read-only: it inspects files such as server.json, README, LICENSE and source files but does not modify them. AI mode sends a metadata summary (server name, tool definitions, README preview, rule-based scores) to an OpenAI-compatible API, so review what that summary contains before using it on private repositories; it states no source code is sent.

Installation

In SourceWeft

  1. Open MCP Doctor in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[mcp-doctor logo]

MCP Doctor

[PyPI] [License] [Python] [GitHub Stars]

Check and improve the contract quality of any MCP server — for humans, agents, and platforms.

Problem

Most MCP servers are built with only one audience in mind (usually human developers reading a README). But a successful MCP server needs to satisfy three audiences simultaneously:

  • Distribution platforms (Registry, Smithery, PulseMCP, Glama) need structured metadata
  • Human users need clear purpose, trust signals, and low install friction
  • AI agents need unambiguous tool descriptions, declared side effects, and token-efficient responses

MCP Doctor checks all six dimensions of "contract quality" and gives you actionable recommendations.

Quick Start

bash
pip install mcp-doctormcp-doctor check /path/to/your-mcp-server

What It Checks

DimensionQuestion
Task ClarityIs the server's purpose immediately clear?
Trust & SafetyAre side effects, permissions, and safety boundaries declared?
Interface QualityAre tools well-named, well-described, and well-typed?
Token EfficiencyWill tool responses fit an agent's context budget?
Install FrictionHow fast can someone go from discovery to first use?
Cross-platform ReadinessIs metadata complete for Registry, Smithery, PulseMCP, Glama?

Usage

CLI

bash
# Terminal output (default, rule-based)mcp-doctor check /path/to/server
# JSON output (for CI/CD)mcp-doctor check /path/to/server --format json
# Markdown output (for README badges or reports)mcp-doctor check /path/to/server --format markdown
# AI-enhanced evaluation (requires OPENAI_API_KEY)mcp-doctor check /path/to/server --mode ai
# AI mode with a specific modelmcp-doctor check /path/to/server --mode ai --model gpt-4o

As an MCP Server

MCP Doctor is also an MCP server, so AI agents can use it to check other servers:

json
{  "mcpServers": {    "mcp-doctor": {      "command": "python",      "args": ["-m", "mcp_doctor.mcp_server"]    }  }}

Tools:

  • check_server(path, format, mode, model) — Run all 6 checks. Use mode="ai" for LLM-enhanced review.
  • list_dimensions() — List what MCP Doctor evaluates

For AI Agents: Quick Install

One-liner (paste this to your AI agent):

Install mcp-doctor (pip install mcp-doctor) and add it to your MCP config with command python -m mcp_doctor.mcp_server. Then use the check_server tool to check any MCP server's quality.

Step by step:

  1. Install: pip install mcp-doctor
  2. Add to your MCP configuration:
    json
    {  "mcpServers": {    "mcp-doctor": {      "command": "python",      "args": ["-m", "mcp_doctor.mcp_server"]    }  }}
  3. Use the check_server tool with a path to any MCP server repo
  4. If MCP is not available, fall back to CLI: mcp-doctor check /path/to/server --format json

Agent workflow: check server -> review scores -> identify lowest dimensions -> follow recommendations

Scoring

Each dimension is scored 0-100 and graded A/B/C/D:

  • A (90+): Exemplary
  • B (75-89): Good, minor gaps
  • C (55-74): Adequate, notable gaps
  • D (<55): Needs significant improvement

Theoretical Foundation

MCP Doctor is based on the Contract Quality Framework — the principle that a successful MCP product's promises (what it does, what it costs, what risks it carries) should be equally parseable by platforms, humans, and agents.

The framework draws from:

  • Anthropic's "Writing effective tools for agents" (tool description engineering, namespacing, token efficiency)
  • Official MCP Registry requirements (server.json schema, namespace verification)
  • Cross-platform analysis of Smithery, PulseMCP, Glama ranking signals

Evaluation Modes

ModeFlagDeterministicNetworkAPI Key
Rule-based (default)--mode ruleYesNoNo
AI-enhanced--mode aiNoYes (LLM API)OPENAI_API_KEY

Rule-based mode is fully offline and deterministic. No network calls, no LLM, no API keys needed.

AI mode sends a metadata summary (server name, tool definitions, README preview, rule-based scores) to an OpenAI-compatible API for qualitative review. No source code is sent. Reports include model name and version for reproducibility.

AI mode supports any OpenAI-compatible provider:

  • OPENAI_API_KEY — API key (required for AI mode)
  • OPENAI_BASE_URL — Custom endpoint (for Ollama, vLLM, LM Studio, Azure, etc.)
  • MCP_DOCTOR_MODEL — Model name (default: gpt-4o-mini)

Install AI support: pip install mcp-doctor[ai]

Trust & Permissions

MCP Doctor is read-only. It never modifies, deletes, or creates files.

What it accessesWhy
server.jsonParse MCP metadata
README.mdCheck documentation quality
LICENSEVerify license presence
*.py, *.json in src/Detect tool definitions

All MCP tools have readOnlyHint: true and destructiveHint: false annotations.

Feedback

Found a bug? Have a suggestion? We'd love to hear from you:

If you're an agent, include the JSON output of check_server in your report for context.

Contributing

bash
git clone https://github.com/Jiansen/mcp-doctor.gitcd mcp-doctorpip install -e ".[dev,ai]"ruff check src/ tests/pytest tests/ -v

If MCP Doctor helped you improve your server, consider giving it a star on GitHub — it helps others discover the tool.

[Star on GitHub]

License

MIT

Source: README.md at commit ebf6da0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts