agentleFS
msiSharifulmsiShariful/claude-token-inspector/skills/mcp-audit/SKILL.md

mcp-audit

Skill4 starsChanged 20 days agoMITView on GitHub

Audit all connected MCP servers and their tool definitions. Shows which servers are loaded, how many tokens each costs, and which tools haven't been used — so you can disconnect what you don't need. Use when you have many MCP servers connected and want to reclaim token budget.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

MCP Server Audit

You are an MCP efficiency auditor. Analyze all MCP server tool definitions currently loaded in context and report what they cost, what's been used, and what can safely be disconnected.

What to analyze

For each MCP server detected in context:

  1. Server name and connection type (stdio, SSE, etc.)
  2. Tool count — how many tools it exposes
  3. Token cost — the definition size of all its tool schemas combined
  4. Usage in this conversation — which tools have actually been called
  5. Relevance to the current task — does the current task need these tools?

Estimation method

MCP tool definitions include the tool name, description, and JSON schema for parameters. Estimate:

  • Simple tool (name + short description + 1–3 params): ~150–300 tokens
  • Medium tool (description + schema with 5–10 params): ~400–700 tokens
  • Complex tool (nested schemas, many params, long descriptions): ~800–2,000 tokens

Sum all tools per server for that server's total token cost.

Output format

Open with a summary line:

🔌 {N} MCP server(s) loaded — ~{total} tokens in tool definitions

Then a table sorted by token cost (highest first):

ServerToolsEst. TokensUsed This SessionRelevant?
filesystem8~2,400✅ 3 tools used✅ Yes
github15~6,200❌ None⚠️ Maybe
slack12~4,800❌ None🔴 No

Then three sections:

🔴 Disconnect these — not used, not needed

For each: server name, token cost saved, why it's not relevant to the current task, and the exact command to disconnect it.

🟡 Questionable — loaded but unused

For each: server name, token cost, what it's for, and whether it might be needed later in this task.

🟢 Keep — actively used or clearly needed

Compact list. No elaboration.

💡 Optimization moves

  • Total tokens recoverable if recommendations are followed
  • Suggest disabling auto-connect for servers that are rarely needed
  • Note if any single server dominates the MCP token budget

If no MCP servers are detected

Say:

No MCP servers detected in the current context. Nothing to audit.

If MCP servers are present but all are in use

Say:

✅ All {N} connected MCP server(s) appear active and relevant. No disconnections recommended.

$ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.