mcp-prune

Audit installed MCP servers by token cost and failure rate, then disable worst offenders with confirmation and reversible recovery record.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill mcp-prune
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-prune
Source: https://github.com/ElvinOuyang/claude-skill-collection/tree/main/plugins/environment-toolkit/skills/mcp-prune
Command: npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill mcp-prune

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill audits installed Model Context Protocol (MCP) servers and helps you disable the ones that are failing, flaky, or disproportionately expensive in tokens so Claude Code becomes faster, less noisy, and more reliable.

Core Features & Use Cases

  • Evidence-based MCP inventory: Collects status/failure signals, tool counts (as a cost proxy), last successful use, and an estimated token cost from tool descriptions.
  • Triage with clear capability impact: Categorizes MCPs into safe/consider/keep and explicitly lists the capability lost plus a fallback path for each candidate.
  • Safe, reversible cleanup: Disables only after explicit confirmation and writes a reversible record/log so you can undo the changes later.

Quick Start

Ask for an MCP cleanup such as: "prune MCPs and disable the failing ones, but wait for my confirmation first."

Frequently Asked Questions about mcp-prune

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I disable failing MCP servers in Claude Code without losing my configuration?

Disable failing MCP servers by auditing token cost, failure rate, and recent usage, then mutating the config after explicit confirmation. This process creates a backup and a full restore snippet so you can safely rollback if needed.

Why does Claude Code slow down or time out when too many MCP tools are installed?

Claude Code slows down when installed MCP servers fail or bloat token usage through heavy tool descriptions. Pruning these high-cost, flaky servers reduces tool noise, restores performance, and lowers suspicious token consumption.

Can I recover an MCP server configuration after pruning disabled servers?

You can recover MCP server configurations using a reversible recovery record written during pruning. The log preserves a full restore snippet, and the safe-write mechanism supports rollback on failure through post-write validation.

How do I identify which MCP servers are consuming the most tokens before disabling them?

Identify token-heavy MCP servers by collecting tool counts as a cost proxy and estimating token cost from tool descriptions. The triage categorizes servers into safe, consider, and keep tiers based on failure signals and recent usage.

What is the safest way to clean up flaky MCP servers and prevent capability loss?

The safest cleanup method explicitly lists the capability lost and a fallback path for each disabled server. It enforces backup-before-mutate, temp-file atomic replacement, and post-write validation to ensure a reversible process.