MCP Doctor

平台与服务

by jiansen

检查并提升任意 MCP server 的接口契约质量,适用于人类、agents 和各类平台。

什么是 MCP Doctor

检查并提升任意 MCP server 的接口契约质量,适用于人类、agents 和各类平台。

README

<!-- mcp-name: io.github.Jiansen/mcp-doctor --> <p align="center"> <img src="assets/avatar-512.png" width="120" alt="mcp-doctor logo"> </p> <h1 align="center">MCP Doctor</h1> <p align="center"> <a href="https://pypi.org/project/mcp-doctor/"><img src="https://img.shields.io/pypi/v/mcp-doctor" alt="PyPI"></a> <a href="https://github.com/Jiansen/mcp-doctor/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="License"></a> <a href="https://pypi.org/project/mcp-doctor/"><img src="https://img.shields.io/pypi/pyversions/mcp-doctor" alt="Python"></a> <a href="https://github.com/Jiansen/mcp-doctor/stargazers"><img src="https://img.shields.io/github/stars/Jiansen/mcp-doctor?style=social" alt="GitHub Stars"></a> </p> <p align="center">Check and improve the contract quality of any MCP server — for humans, agents, and platforms.</p>

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-doctor
mcp-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 model
mcp-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.git
cd mcp-doctor
pip 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

常见问题

MCP Doctor 是什么?

检查并提升任意 MCP server 的接口契约质量,适用于人类、agents 和各类平台。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描171.4k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描171.4k

接口测试套件

by alirezarezvani

Universal
热门

扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。

帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。

平台与服务
未扫描24.9k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
89.7k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
80.0k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
72.9k

评论