원클릭으로
mcp-audit
Use when the user wants to measure MCP token waste, rank high-cost servers, or choose between project scoping and skill conversion
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when the user wants to measure MCP token waste, rank high-cost servers, or choose between project scoping and skill conversion
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | mcp-audit |
| description | Use when the user wants to measure MCP token waste, rank high-cost servers, or choose between project scoping and skill conversion |
Analyze the user's Claude Code session history (JSONL) to:
Infer scope from the user's request. Mirror the explicit command /mcp-optimizer:mcp-audit. Default is project.
--scope project : analyze sessions for the current project only--scope all : analyze sessions across all projectsSession data can be large, so always use the Agent tool to delegate analysis and report generation. Only the final report text should remain in the main context.
Use the following prompt when invoking the Agent tool:
Perform an MCP token waste analysis.
1. Run the following command to get the analysis JSON:
python3 "${CLAUDE_SKILL_DIR}/scripts/session_analyzer.py" --scope <scope>
(Actual path for ${CLAUDE_SKILL_DIR}: <absolute path to this skill directory>)
2. Format the JSON result into the report template below and return it:
MCP Token Waste Analysis Report
================================
Scope: {scope} ({sessions_analyzed} sessions, {date_range})
| MCP Server | Tools | Used | Est. Wasted Tokens | Cost/Session | Priority |
|------------|-------|------|--------------------|-------------|----------|
| {name} | {total} | {used} ({ratio}%) | ~{waste} | {per_session} | {priority} |
Total estimated waste: ~{total_waste} tokens
Recommended Actions:
(list each item from the recommendations array, ranked by priority)
Unmatched Tools:
(show unmatched_mcp_tools if any exist)
Report rules:
- Priority indicators: HIGH = RED, MEDIUM = YELLOW, LOW = GREEN
- Use thousand separators for token counts (e.g., 126,000)
- Show ratios as percentages
- If 0 sessions found, output "No session data available for analysis"
- Include convert_command from recommendations
- Return only the final report text. Do NOT return the raw JSON.
Output the report returned by the sub-agent directly to the user.
If the report contains recommended actions, present two optimization paths:
Option A: /mcp-optimizer:mcp-optimize — Keep MCP, reduce scope
.mcp.json with only relevant servers.mcp.json to revert)Option B: /mcp-optimizer:mcp-to-skills — Convert to on-demand skills
Present the options like this:
/mcp-optimizer:mcp-to-skills/mcp-optimizer:mcp-optimize/mcp-optimizer:mcp-optimize/mcp-optimizer:mcp-to-skills for the recommended servers/mcp-optimizer:mcp-optimize first, then /mcp-optimizer:mcp-to-skills for remaining high-waste serversUse when the user wants to health-check MCP servers, diagnose broken connections, or find duplicate tools and missing credentials
Use when the user wants to keep MCP but scope it to the current project with a smaller .mcp.json
Use when the user wants to convert expensive MCP tools into on-demand Claude Code skills