calibrate-mcp
Skill1 starsChanged 6 months agoMITView on GitHub
Audits MCP server configuration across every layer Claude Code reads — project `.mcp.json`, user `~/.claude.json`'s `mcpServers` block, and per-agent `mcpServers:` frontmatter inside `.claude/agents/*.md`. Flags literal tokens in committed JSON (the high-impact security finding), servers with no paired wrapper skill (always-on tool-set cost), heuristically over-broad surfaces (50+ tools), dead servers no longer in use, servers used by exactly one subagent that should move into that agent's frontmatter, and invalid JSON. Invoked by the calibration orchestrator (`/calibrate`) and standalone via `/claude-calibration:calibrate-mcp`.
In this repository25 other files it gives its agents.
- agents/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- rules/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- docs-statusSkill
- docs-updateSkill
- plugin-updateSkill
- calibrate-claude-mdSkill
- calibrate-generalSkill
- calibrate-hooksSkill
- calibrate-pluginsSkill
- calibrate-rulesSkill
- calibrate-settingsSkill
- calibrateSkill
- calibrate-skillsSkill
- calibrate-subagentsSkill
- calibration-auditSkill
- calibration-diffSkill
- calibration-doctorSkill
- calibration-flowSkill
- calibration-onboardingSkill
- calibrationSkill
- calibration-trackSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
After every edit, re-run bash <BUNDLE>/scripts/lint.sh <changed path> and record verify: ✓ if the signature no longer fires (or verify: ✗ …
- Very specific: line 86
Never write a literal token into .mcp.json or a committed mcpServers block.
- Distinctive: line 88
Don't move a server into a subagent's frontmatter unless exactly one subagent uses it.
- Very specific: line 89
Don't reformat unrelated keys in a .mcp.json when applying a fix.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
calibrate-mcp — per-feature bundle
You audit and tune MCP configuration. You receive one of two kinds of work:
- Direct invocation (
/claude-calibration:calibrate-mcp) — audit everything, report findings, propose fixes inline. The user drives the conversation. - Dispatch from the calibrator — one approved plan row at a time, applied surgically.
In both cases the workflow is the same; only the framing differs.
1. Enumerate
bash <BUNDLE>/scripts/enumerate.sh "$PROJECT_DIR"Yields TSV scope\tpath. Scopes:
project—<PROJECT_DIR>/.mcp.jsonuser—~/.claude.json(best-effort; themcpServersblock lives inside)agent—.claude/agents/*.mdfiles declaringmcpServers:in frontmatter (user + project)
2. Lint
bash <BUNDLE>/scripts/lint.sh <path …>Yields TSV path\tsignature\tseverity\tdetail. The signatures this bundle owns
(see reference.md):
mcp:invalid-json(HIGH)mcp:secret-in-mcpjson(CRITICAL)mcp:no-skill-pair(LOW)mcp:over-broad-surface(MEDIUM)mcp:dead-server-heuristic(LOW) — best-effort; skipped without transcript accessmcp:subagent-only-in-shared(LOW) — surfaced when a server appears in.mcp.jsonand exactly one subagent's body references it
3. Fix — kind: edit rows
For each finding, the remediation pattern:
mcp:secret-in-mcpjson→ seeexamples/secret-in-mcpjson/{before,after}.md. Replace the literal token with${ENV_VAR}substitution, set the env var locally, rotate the exposed credential.mcp:no-skill-pair→ scaffold a wrapper skill atskills/<server-name>/SKILL.md(4-layer pattern: skill withdisable-model-invocation: truewrapping the MCP server).mcp:over-broad-surface→ audit the server's tool-set; either trim via the server's own config or move it behind adisable-model-invocationwrapper skill so the cost is on-demand.mcp:dead-server-heuristic→ confirm with the user, then remove from the config.mcp:subagent-only-in-shared→ move the server config from.mcp.jsoninto that subagent'smcpServers:frontmatter.mcp:invalid-json→ fix the parse error reported in the detail.
4. Create — kind: create rows
Recurrences this bundle's companion (calibrate-skills) handles (per rules/dispatch.md):
mcp:no-skill-pair×N for the same server → calibrate-skills scaffolds the wrapper skill.
This bundle has no kind: create recurrence of its own.
5. Verify
After every edit, re-run bash <BUNDLE>/scripts/lint.sh <changed path> and record verify: ✓ if
the signature no longer fires (or verify: ✗ <signature> if it still does).
Hard rules
- Never write a literal token into
.mcp.jsonor a committedmcpServersblock. Always use${ENV_VAR}substitution. - Don't move a server into a subagent's frontmatter unless exactly one subagent uses it.
- Don't reformat unrelated keys in a
.mcp.jsonwhen applying a fix.
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
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.

