mcp-audit

mcp-audit is a skill for Claude Code from msiShariful/claude-token-inspector. It costs 53 tokens per session (643 once invoked), scanned A, original, MIT.

An audit tool for connected MCP servers, which are services that provide extra tools to an AI coding session.

In plain words
What is it for?
Use it to review server connections, estimate their token cost, and identify unused tools that could be disconnected.
Why use it?
It shows which connected services and tools consume context space, which have been used, and which may be unrelated to the current task.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the token-inspector plugin — 8 skills shipped together

Good fit Use it to review server connections, estimate their token cost, and identify unused tools that could be disconnected.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/msishariful/claude-token-inspector/mcp-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add msiShariful/claude-token-inspector --skill mcp-audit
Clone the repo
git clone --depth 1 https://github.com/msiShariful/claude-token-inspector

Made for: Claude Code.

Or install token-inspector, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/msishariful/claude-token-inspector/mcp-audit/github.svg)](https://agentmods.dev/skills/msishariful/claude-token-inspector/mcp-audit)
Your own site
<a href="https://agentmods.dev/skills/msishariful/claude-token-inspector/mcp-audit"><img src="https://agentmods.dev/badge/skills/msishariful/claude-token-inspector/mcp-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/msishariful/claude-token-inspector/mcp-audit"><img src="https://agentmods.dev/badge/skills/msishariful/claude-token-inspector/mcp-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00643
Opus 5 $0.00026 $0.00321
Sonnet 5 $0.00011 $0.00129
Haiku 4.5 $0.00005 $0.00064

Measured 9d ago against content hash 565eb2086cd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

mcp-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mcp-audit/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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):

Server Tools Est. Tokens Used This Session Relevant?
filesystem 8 ~2,400 ✅ 3 tools used ✅ Yes
github 15 ~6,200 ❌ None ⚠️ Maybe
slack 12 ~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

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 75 lines · 53 tokens per session scan A 565eb2086cd6

Subscribe to this mod's changes

mcp-audit is a skill published in the GitHub repository msiShariful/claude-token-inspector (4 stars, last pushed 3mo ago), licensed MIT. It adds 53 tokens to every session and 643 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

docs-drift

Documentation-drift audit for this plugin monorepo. Audit either each scoped plugin's unreleased changelog claims or its latest shipped release from the previous reachable plugin-name--v tag, then verify that plugin READMEs, docs, CLAUDE.md or AGENTS.md files, and root documentation tell the truth for the matching…

gtapps/claude-code-hermit · 170 tokens

cco-tools

Show what tools actually cost in tokens — learned per-tool averages from observed results, replacing the hardcoded MCP/Agent guesses.

egorfedorov/claude-context-optimizer · 27 tokens

github-pr-creation

Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing…

fvadicamo/dev-agent-skills · 75 tokens

test-run

Run plugin test suites in this monorepo and report a concise pass/fail summary. Optional plugin slug arg; without arg, runs all plugins under plugins/.

gtapps/claude-code-hermit · 35 tokens

design-system-reference

Style guides and implementation rules for frontend design. Works with design-discovery agent which handles context gathering and VS-based style recommendations. Contains detailed style guides, anti-patterns, and implementation checklists.

wigtn/wigtn-plugins · 43 tokens

magic-compact

Compact this Claude Code session.

aerovato/magic-compact · 10 tokens