dr-mcp
About
Clean and audit messy MCP setups: stale servers, unused tools, context-heavy MCPs, outdated packages, and safe repair plans.
Details
- Author
- inferensys
- Categories
- Developer Tools, Infrastructure, Automation, Knowledge Base
Jump to
Setup
Install dr-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/inferensys/dr-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
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:
npx @inferensys/dr-mcp cleanup --registry --track-usage
Inside Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, or any MCP client that exposes server prompts/tools, usedr_mcp_scanordr_mcp_cleanup. If your client maps MCP prompts into slash commands, use/dr-mcp scan.
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.
- 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.
- 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.Catchnpxpackages usinglatestor no version.
dr-mcp uses practical static analysis and package metadata checks:
- Discover config filesfor Claude Desktop, Claude Code, Codex, Cursor, Windsurf, GitHub Copilot, VS Code, Cline, Roo Code, Continue, Zed, and.mcp.json.
- Parse and normalizeJSON, TOML, and YAML config shapes into one internal MCP server model.
- Score the setupacross reliability, security, context hygiene, and maintainability.
- Check package freshnesswith npm metadata, semver classification,dist-tags.latest, and optional official registry matching.
- Estimate context weightwith tool-cardinality heuristics for high-surface MCPs such as GitHub, browser automation, Slack, Jira, filesystem, and databases.
- Review maintenance signalsfrom GitHub archive status and recent push activity when repository metadata is available.
- Generate patch planswith JSON Pointer targets, idempotent operations, timestamped backups, and diffs.
# Local audit in the current project npx @inferensys/dr-mcp # Deeper cleanup report with package/repo checks and local install history npx @inferensys/dr-mcp cleanup # Full scan alias for agent workflows npx @inferensys/dr-mcp scan --deep # Local-only cleanup flow with no network checks or usage ledger writes npx @inferensys/dr-mcp cleanup --local # JSON for scripts or CI npx @inferensys/dr-mcp scan --workspace . --json --registry # Shareable cleanup report npx @inferensys/dr-mcp report --workspace . --format html > dr-mcp-report.html # Preview a repair plan npx @inferensys/dr-mcp patch --workspace . --plan remove-duplicate-servers npx @inferensys/dr-mcp patch --workspace . --plan upgrade-stale-packages # Apply a reviewed repair plan with backups npx @inferensys/dr-mcp patch --workspace . --plan remove-duplicate-servers --apply # Run as an MCP server npx @inferensys/dr-mcp server
- 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.
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.
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 asdr_mcp_scan,dr_mcp_cleanup, or a prompt such as/dr-mcp scan.
codex mcp add dr-mcp -- npx -y @inferensys/dr-mcp server
claude mcp add dr-mcp -- npx -y @inferensys/dr-mcp server
Use this for Claude Desktop, Cursor, Windsurf, Cline, Roo Code, VS Code, and GitHub Copilot in VS Code:
{ "mcpServers": { "dr-mcp": { "command": "npx", "args": ["-y", "@inferensys/dr-mcp", "server"] } } }
VS Code and GitHub Copilot may useservers:
{ "servers": { "dr-mcp": { "type": "stdio", "command": "npx", "args": ["-y", "@inferensys/dr-mcp", "server"] } } }
{ "context_servers": { "dr-mcp": { "command": "npx", "args": ["-y", "@inferensys/dr-mcp", "server"] } } }
mcpServers: dr-mcp: command: npx args: - -y - @inferensys/dr-mcp - server
When running as a server, dr-mcp exposes:
- dr_mcp_scan
- dr_mcp_cleanup
- scan_mcp_setup
- explain_issue
- generate_patch_plan
- apply_patch_plan
- export_report
- dr_mcpwithaction=scanoraction=cleanup
- dr_mcp_scan
- dr_mcp_cleanup
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-usagewrites 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.
npm install npm run check node dist/cli.js scan --workspace tests/fixtures/mixed --json
Registry name:io.github.Inferensys/dr-mcp
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Paid remote MCP for CLI tool MCP, structured receipts, usage logs, and audit-ready evidence for agent and CI workflows.
The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.
Understand, develop, and debug authorization policies in Oso Cloud.
Structured .aide spec files that give AI agents progressive disclosure into your codebase architecture. 6 MCP tools, 8 slash commands, TUI wizard, multi-IDE support.
Paid remote MCP for Codex run ledgers, changed-file evidence, scope summaries, missing proof checks, and client-ready handoff receipts.
An MCP service that equips your workspace with a complete set of AI-accessible development tools for reading, editing, executing, and managing code.
A flexible MCP server that executes arbitrary command-line tools defined in a configuration file.
Extract, govern, and ship structured content from your codebase.
A context management system designed for software development teams with customizable data storage.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


