
dr-mcp
io.github.Inferensys由 GitHub 帳號 Inferensys 發布v0.3.0更新於 Oct 25, 2026
Audits MCP configs, scores risk, and creates reversible repair plans.
概覽
本機 MCP 稽核工具,掃描 MCP 用戶端設定、評估風險與上下文負擔,並產生可回復的修復方案。
- 可以做什麼
- 掃描並評分 Claude、Codex、Cursor、Windsurf、Copilot、VS Code、Cline、Roo Code、Continue 與 Zed 的 MCP 設定,輸出脫敏報告與附來源路徑的問題清單(dr_mcp_scan、scan_mcp_setup)。解釋單一問題,並為重複項目、失效條目、過期套件、已廢棄或佔用上下文的伺服器產生修補方案(explain_issue、generate_patch_plan)。審閱後套用方案,寫入前建立含時間戳的備份與差異,或匯出報告(apply_patch_plan、export_report)。執行更深入的清理掃描,檢查 npm 與 GitHub 新鮮度並可選擇記錄本機使用帳本(dr_mcp_cleanup)。
- 適用情境
- 當你的 MCP 設定在多個編碼代理與專案間不斷累積,想在手動改設定前釐清哪些伺服器帶來工具噪音、過期相依、重複項目或風險權限時適用。
- 執行需求
- 以本機 stdio 程序執行,通常透過 npx 使用 @inferensys/dr-mcp 套件,因此需要 Node.js。未宣告帳號、API 金鑰或環境變數。套件與儲存庫新鮮度檢查需要網路存取;僅本機模式可略過。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 dr-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
dr-mcp
Clean your MCPs.
dr-mcp is a local-first MCP audit and cleanup tool for developers who use agentic coding every day. It scans the Model Context Protocol configs your tools load, finds stale servers, abandoned packages, duplicate entries, context-heavy tools, risky permissions, and major upgrades, then generates reversible patch plans.
If you use Claude Code, OpenAI Codex, Cursor, Windsurf, GitHub Copilot, VS Code, Cline, Roo Code, Continue, or Zed across multiple projects, your MCP setup can grow quietly: old demo servers, duplicate GitHub tools, broad filesystem access, package pins behind npm latest, abandoned repositories, and large tool surfaces your agent has to consider before it writes code.
dr-mcp shows what to clean up without deleting anything during scan.
That starts a local cleanup scan in the current project. You get a redacted report, a ranked list of context-heavy MCPs, package and repository freshness signals, and patch plans you can apply after review.
For the full cleanup scan with package/repo checks and local install-history tracking:
Inside Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, or any MCP client that exposes server prompts/tools, use dr_mcp_scan or dr_mcp_cleanup. If your client maps MCP prompts into slash commands, use /dr-mcp scan.
Why Clean Your MCPs?
MCP servers are powerful because they put tools directly into an agent's loop. That also means every extra server can add tool-selection noise, context-window pressure, startup failures, stale dependencies, or permissions you no longer intend to grant.
dr-mcp helps with:
- MCP audit: one report across global and project MCP configs.
- MCP cleanup: review candidates for duplicates, dead entries, abandoned packages, long-lived installs, and heavy tool surfaces.
- MCP context hygiene: estimated tool counts and context weight for servers that do not belong in every coding session.
- MCP security review: broad filesystem access, inline secrets, secret-looking args, and broken environment references.
- MCP upgrade planning: semver drift against npm latest, including major upgrades that deserve review.
- MCP repair plans: explicit operations with backups and diffs before writing.
What It Helps You Fix
- Reclaim context. See which MCPs add the biggest tool lists to your agent's prompt.
- Cut unwanted tool calls. Remove old servers your agent keeps considering even when the project does not need them.
- Ditch abandoned MCPs. With
--registry, check npm metadata and GitHub activity for archived or stale projects. - See major upgrades. Find MCP packages pinned far behind npm latest and review upgrade plans.
- Find leftovers. Turn on
--track-usageand build a local ledger of MCPs that keep showing up across scans. - Remove duplicates. Spot the same MCP registered in Claude, Cursor, VS Code, Codex, Windsurf, or project files.
- Fix risky configs. Flag broad filesystem access, inline secrets, secret-looking args, missing commands, dead paths, and broken env refs.
- Stop floating installs. Catch
npxpackages usinglatestor no version.
How The Audit Works
dr-mcp uses practical static analysis and package metadata checks:
- Discover config files for Claude Desktop, Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, VS Code, Cline, Roo Code, Continue, Zed, and
.mcp.json. - Parse and normalize JSON, TOML, and YAML config shapes into one internal MCP server model.
- Score the setup across reliability, security, context hygiene, and maintainability.
- Check package freshness with npm metadata, semver classification,
dist-tags.latest, and optional official registry matching. - Estimate context weight with tool-cardinality heuristics for high-surface MCPs such as GitHub, browser automation, Slack, Jira, filesystem, and databases.
- Review maintenance signals from GitHub archive status and recent push activity when repository metadata is available.
- Generate patch plans with JSON Pointer targets, idempotent operations, timestamped backups, and diffs.
Commands
Report Sections
- Score: reliability, security, context hygiene, maintainability.
- Package upgrades: MCP package pins behind npm latest, including major upgrades.
- Context weight: MCPs ranked by estimated tool load.
- Install history: long-lived servers from the local usage ledger.
- Findings: concrete issues with source config paths.
- Patch plans: safe edits such as removing duplicates, dead entries, abandoned servers, or context-heavy servers.
Cleanup Plans
dr-mcp separates findings from action. A finding tells you what looks wrong; a patch plan tells you the exact config edit it can make.
remove-duplicate-servers: remove duplicate MCP server entries while keeping the first enabled definition.remove-dead-servers: remove entries that cannot launch or packages missing from npm.upgrade-stale-packages: update MCP package refs to npm latest.remove-abandoned-servers: remove servers from archived or abandoned repositories.remove-heavy-context-servers: remove servers estimated to load many tools into every session.remove-long-lived-servers: remove servers that have stayed installed across multiple tracked scans after you confirm they are no longer useful.
Supported Tools
Add dr-mcp To Your Agent
Once added, start from the shortest in-session action:
For cleanup candidates, upgrades, abandoned servers, and long-lived installs:
Clients that expose MCP prompts as slash commands may show these as dr_mcp_scan, dr_mcp_cleanup, or a prompt such as /dr-mcp scan.
Codex
Claude Code
JSON config clients
Use this for Claude Desktop, Cursor, Windsurf, Cline, Roo Code, VS Code, and GitHub Copilot in VS Code:
VS Code and GitHub Copilot may use servers:
Zed
Continue
MCP Tools
When running as a server, dr-mcp exposes:
dr_mcp_scandr_mcp_cleanupscan_mcp_setupexplain_issuegenerate_patch_planapply_patch_planexport_report
MCP Prompts
dr_mcpwithaction=scanoraction=cleanupdr_mcp_scandr_mcp_cleanup
Safety
Scans never edit MCP client configs.
Patch plans create timestamped backups before writing. Reports redact secrets, tokens, emails, home paths, and private GitHub repo URLs.
Usage tracking is opt-in. --track-usage writes a local ledger at ~/.dr-mcp/usage-ledger.json. It tracks what remains installed across scans; it does not claim true per-tool usage unless a client exposes that data.
dr-mcp does not auto-install, uninstall, upgrade packages, or run destructive cleanup.
Development
Registry name: io.github.Inferensys/dr-mcp
Package: @inferensys/dr-mcp
來源:README.md,提交 ed6e00d
工具
0版本歷史
1- v0.3.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分