MCP Doctor

io.github.Jiansen由 GitHub 帳號 Jiansen 發布v0.1.0更新於 Oct 24, 2026

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

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

MCP Doctor 從六個面向審查任意 MCP 伺服器的契約品質,並給出評分與可執行的改善建議。

可以做什麼
  • 對本機 MCP 伺服器專案執行全部六項契約品質檢查,回傳分數、等級與建議
  • 列出 MCP Doctor 評估的面向,例如任務清晰度、信任與安全、介面品質、token 效率、安裝門檻與跨平台就緒度
  • 在離線規則評分與 LLM 增強的質性審查之間選擇
  • 以終端機文字、供 CI 使用的 JSON 或供報告與徽章使用的 Markdown 輸出結果
適用情境
適合在發布或上架 MCP 伺服器之前,客觀了解其清晰度、安全性、token 效率與平台就緒度。也適合讓代理審查其他伺服器的中繼資料與工具定義。
執行需求
以 pip 安裝的 Python 套件在本機執行,MCP 伺服器透過 python -m mcp_doctor.mcp_server 啟動。規則模式不需網路或金鑰;AI 模式需要 OPENAI_API_KEY 變數,可選用 OPENAI_BASE_URL 與 MCP_DOCTOR_MODEL,並需安裝 ai 附加元件。
安裝前請注意
唯讀:會讀取 server.json、README、LICENSE 及原始碼檔案,但不會修改。AI 模式會把中繼資料摘要(伺服器名稱、工具定義、README 預覽、規則評分)傳送到 OpenAI 相容介面,用於私有專案前請確認摘要內容;文件稱不會傳送原始碼。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MCP Doctor,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:README.md,提交 ebf6da0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分