{"_id":"mcp-graveyard","_rev":"4-8daa41820d7523a9873604b87b1fb7f4","name":"mcp-graveyard","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"mcp-graveyard","version":"0.1.0","keywords":["claude-code","claude","mcp","audit","cli","anthropic"],"license":"MIT","_id":"mcp-graveyard@0.1.0","maintainers":[{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"}],"homepage":"https://sfrangulov.github.io/skill-graveyard/","bugs":{"url":"https://github.com/sfrangulov/skill-graveyard/issues"},"bin":{"mcp-graveyard":"dist/cli.js"},"dist":{"shasum":"02e561ebf9b62db700a2d8ea171069c88596523f","tarball":"https://registry.npmjs.org/mcp-graveyard/-/mcp-graveyard-0.1.0.tgz","fileCount":14,"integrity":"sha512-4EjSa1mgDTldY2iDbPW82RV8EZvDZvIDz1G+L3dESLtwPk1RbfKZ9uJN575nQvsG7tiNKG/vw9pa5Yepl13Cig==","signatures":[{"sig":"MEUCIQCTqnZPXr7HbKGyfp7ENG/67x7CLgF2PgT21+3Uun5z6QIgeJnaxzxdxcg9nfoK/hqaZp6fBF9BgieIiEH91qWZ/Po=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34858},"type":"module","engines":{"node":">=18"},"gitHead":"d417392a8265c2a810efc430a5fe0d9014a4aa27","scripts":{"dev":"tsx src/cli.ts","test":"node --import tsx --test src/*.test.ts","build":"tsc","postbuild":"chmod +x dist/cli.js","typecheck":"tsc --noEmit","prepublishOnly":"npm -w mcp-graveyard run typecheck && npm -w mcp-graveyard run test && npm -w mcp-graveyard run build"},"_npmUser":{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"},"repository":{"url":"git+https://github.com/sfrangulov/skill-graveyard.git","type":"git","directory":"packages/mcp-graveyard"},"_npmVersion":"11.6.2","description":"Audit which MCP server tools your Claude Code sessions actually invoke. Server-first, surfaces dead servers and hallucinated calls.","directories":{},"_nodeVersion":"24.13.0","dependencies":{"@skill-graveyard/core":"^0.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-graveyard_0.1.0_1777538319427_0.0788428859913406","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"mcp-graveyard","version":"0.2.0","keywords":["claude-code","claude","mcp","audit","cli","anthropic"],"license":"MIT","_id":"mcp-graveyard@0.2.0","maintainers":[{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"}],"homepage":"https://sfrangulov.github.io/skill-graveyard/","bugs":{"url":"https://github.com/sfrangulov/skill-graveyard/issues"},"bin":{"mcp-graveyard":"dist/cli.js"},"dist":{"shasum":"6e8c2ab1509b9aa0375516588b6ef61cdff116f8","tarball":"https://registry.npmjs.org/mcp-graveyard/-/mcp-graveyard-0.2.0.tgz","fileCount":15,"integrity":"sha512-NCrr1rxZ1cDyTv59QpZ/Gz4/HLZX/Sf/53MGfvbTaSbmSxREgIo7DkVPOX9HZmKus54JWM6JMTVAhCRFyN7hUA==","signatures":[{"sig":"MEQCICA71Pf5liS5uANaFC5JplVMU0ug2XVB5fnl3BLyLIQ+AiAjmkEBWLedy3fIJWTGslorspFy7GEtEyQBhU82en2J0A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35806},"type":"module","engines":{"node":">=18"},"gitHead":"eea4140ac868b7d7e0a600f14227aab116fd84cc","scripts":{"dev":"tsx src/cli.ts","test":"node --import tsx --test src/*.test.ts","build":"tsc","postbuild":"chmod +x dist/cli.js","typecheck":"tsc --noEmit","prepublishOnly":"npm -w mcp-graveyard run typecheck && npm -w mcp-graveyard run test && npm -w mcp-graveyard run build"},"_npmUser":{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"},"repository":{"url":"git+https://github.com/sfrangulov/skill-graveyard.git","type":"git","directory":"packages/mcp-graveyard"},"_npmVersion":"11.6.2","description":"Audit which MCP server tools your Claude Code sessions actually invoke. Server-first, surfaces dead servers and hallucinated calls.","directories":{},"_nodeVersion":"24.13.0","dependencies":{"@skill-graveyard/core":"^0.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-graveyard_0.2.0_1777556484526_0.6353842104170071","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"mcp-graveyard","version":"0.3.0","keywords":["claude-code","claude","mcp","audit","cli","anthropic"],"license":"MIT","_id":"mcp-graveyard@0.3.0","maintainers":[{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"}],"homepage":"https://sfrangulov.github.io/skill-graveyard/","bugs":{"url":"https://github.com/sfrangulov/skill-graveyard/issues"},"bin":{"mcp-graveyard":"dist/cli.js"},"dist":{"shasum":"d0f4226f69df62395da97e7ce830de12153a1742","tarball":"https://registry.npmjs.org/mcp-graveyard/-/mcp-graveyard-0.3.0.tgz","fileCount":12,"integrity":"sha512-vqErVPj/VH7lKqymtZOc27eU5MWbqjWSHW1wondAqVeo7tAQ5ZIj1g7L33npGVoFtrazFYvsrok5nowccurLhw==","signatures":[{"sig":"MEYCIQDTx2Cv7PAcGeEGZIfqzbBSyriWrCLJiEhITFUoTBgfxQIhAOl/7dDtUTkYTlqeVNLoD3g7NH/+HvXxWrkA9vfW6iKR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34638},"type":"module","engines":{"node":">=18"},"gitHead":"b99926bbf5863c96dd882293017e365aa1b4079e","scripts":{"dev":"tsx src/cli.ts","test":"node --import tsx --test src/*.test.ts","build":"tsc","postbuild":"chmod +x dist/cli.js","typecheck":"tsc --noEmit","prepublishOnly":"npm -w mcp-graveyard run typecheck && npm -w mcp-graveyard run test && npm -w mcp-graveyard run build"},"_npmUser":{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"},"repository":{"url":"git+https://github.com/sfrangulov/skill-graveyard.git","type":"git","directory":"packages/mcp-graveyard"},"_npmVersion":"11.6.2","description":"Audit which MCP server tools your Claude Code sessions actually invoke. Server-first, surfaces dead servers and hallucinated calls.","directories":{},"_nodeVersion":"24.13.0","dependencies":{"@skill-graveyard/core":"^0.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-graveyard_0.3.0_1777610868958_0.5289509715388299","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"mcp-graveyard","version":"0.4.1","description":"Audit which MCP server tools your Claude Code sessions actually invoke. Server-first, surfaces dead servers and hallucinated calls.","type":"module","bin":{"mcp-graveyard":"dist/cli.js"},"engines":{"node":">=18"},"scripts":{"dev":"tsx src/cli.ts","build":"tsc","postbuild":"chmod +x dist/cli.js","prepublishOnly":"npm -w mcp-graveyard run typecheck && npm -w mcp-graveyard run test && npm -w mcp-graveyard run build","typecheck":"tsc --noEmit","test":"node --import tsx --test src/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/sfrangulov/skill-graveyard.git","directory":"packages/mcp-graveyard"},"bugs":{"url":"https://github.com/sfrangulov/skill-graveyard/issues"},"homepage":"https://sfrangulov.github.io/skill-graveyard/","keywords":["claude-code","claude","mcp","audit","cli","anthropic"],"license":"MIT","dependencies":{"@skill-graveyard/core":"^0.3.0"},"_id":"mcp-graveyard@0.4.1","gitHead":"ad162dfe348548fd253cdd01e9cc0984c98eab14","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-s7aWRGHOxe/4tm+g7fSXtHmCPdn02L99y8x5m4TWwNZkIwI3nsWlbxdsPYiimfm+itr7lN7dUxwrsYR9nBRUqg==","shasum":"c46463511b6cc56d95e7aa655838deec353daab4","tarball":"https://registry.npmjs.org/mcp-graveyard/-/mcp-graveyard-0.4.1.tgz","fileCount":12,"unpackedSize":36348,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/mcp-graveyard@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDm/80HG9i2r3AjxZTqf1pnCku8kYB4fx6JOB8TVq4fywIgCXsFuURXBVvc093CjmwTgD2ILON4cellDycyUUKxWgs="}]},"_npmUser":{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"},"directories":{},"maintainers":[{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-graveyard_0.4.1_1777884492698_0.31799686413338435"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-30T08:38:39.426Z","modified":"2026-05-04T08:48:13.040Z","0.1.0":"2026-04-30T08:38:39.562Z","0.2.0":"2026-04-30T13:41:24.691Z","0.3.0":"2026-05-01T04:47:49.133Z","0.4.1":"2026-05-04T08:48:12.811Z"},"bugs":{"url":"https://github.com/sfrangulov/skill-graveyard/issues"},"license":"MIT","homepage":"https://sfrangulov.github.io/skill-graveyard/","keywords":["claude-code","claude","mcp","audit","cli","anthropic"],"repository":{"type":"git","url":"git+https://github.com/sfrangulov/skill-graveyard.git","directory":"packages/mcp-graveyard"},"description":"Audit which MCP server tools your Claude Code sessions actually invoke. Server-first, surfaces dead servers and hallucinated calls.","maintainers":[{"name":"sfrangulov","email":"sergey.frangulov@gmail.com"}],"readme":"# mcp-graveyard\n\n[![npm version](https://img.shields.io/npm/v/mcp-graveyard.svg)](https://www.npmjs.com/package/mcp-graveyard)\n[![license](https://img.shields.io/npm/l/mcp-graveyard.svg)](LICENSE)\n[![node](https://img.shields.io/node/v/mcp-graveyard.svg)](package.json)\n\nAudit which MCP server tools your Claude Code sessions actually invoke. Parses your local session logs and cross-references the servers configured in `~/.claude.json` to surface two signals from one parser:\n\n1. **Dead servers** — configured in `~/.claude.json` but Claude never invokes any of their tools → safe to remove.\n2. **Hallucinated tool calls** — Claude invokes tool names that fail with `InputValidationError` (typos, wrong server, server removed since session) → surface for awareness.\n\nSame four-bucket model as `skill-graveyard` (active / dead / missing / hallucinated), applied to MCP servers instead of skills.\n\n## Why this exists\n\nA single MCP server can advertise 50 tools with full JSON schemas, each adding hundreds of tokens to every API request whether or not Claude calls them. A user who connects `supabase`, `playwright`, `pencil`, and `figma` \"just in case\" pays for tens of thousands of tokens of unused tool definitions on every turn. After parsing 30 days of sessions, many of those servers had never been called once. This tool surfaces the gap — and flags a second signal: Claude regularly calls tool names that don't exist on the connected server, resulting in `InputValidationError` responses.\n\n## Install\n\n```sh\nnpx mcp-graveyard\n```\n\nOr globally:\n\n```sh\nnpm i -g mcp-graveyard\nmcp-graveyard\n```\n\nOr as a Claude Code Agent Skill (auto-discovered by Claude in any session, via [skills.sh](https://skills.sh/)):\n\n```sh\nnpx skills add sfrangulov/skill-graveyard\n```\n\nThe skills.sh install adds a `SKILL.md` to your Claude Code skills directory; Claude picks it up automatically when you ask MCP-shaped questions (\"which MCP servers don't I use?\", \"clean up MCP config\") and runs the same `npx mcp-graveyard` binary under the hood. The same command also installs the sister `skill-graveyard` skill from this repo. Compatible with the npm install — they don't conflict.\n\nRequires Node 18+.\n\n## Usage\n\nFour subcommands. `audit` is the default and is what you usually run.\n\n```sh\nmcp-graveyard                         # 30-day audit, pretty table\nmcp-graveyard --days 14               # narrower window\nmcp-graveyard --only dead             # filter to removal candidates\nmcp-graveyard --json                  # machine-readable\n\nmcp-graveyard prune                   # plan: print every claude mcp remove command for dead servers\nmcp-graveyard prune --apply           # execute removals (backup is automatic)\n\nmcp-graveyard suggest                 # classify hallucinated/missing into actionable buckets\nmcp-graveyard projects                # break down server usage per project (from session cwds)\n```\n\n### `audit`\n\nSorts every configured server into four buckets and lists per-tool usage for active servers. Filter to one bucket with `--only active|dead|missing|hallucinated`.\n\n```\nmcp-graveyard — 30 days · 8 servers configured · 143 calls · 112 succeeded · 31 errored\n\nACTIVE (3)\n  plugin_supabase_supabase     47 tools, 5 invoked, 89 calls  last 2026-04-28\n  plugin_playwright_playwright  3 tools, 3 invoked, 34 calls  last 2026-04-27\n  plugin_claude-mem_mcp-search  4 tools, 4 invoked, 12 calls  last 2026-04-29\n\nDEAD (3)\n  pencil                     0 tools, 0 invoked, 0 calls  —\n  plugin_figma_figma         0 tools, 0 invoked, 0 calls  —\n  claude_ai_Gmail            0 tools, 0 invoked, 0 calls  —\n\nHALLUCINATED (1)\n  plugin_supabase_supabase  0 tools, 0 invoked, 2 calls  last 2026-04-22\n\nMISSING (1)\n  old-analytics-server  1 tools, 1 invoked, 3 calls  last 2026-04-16\n\n→ run: mcp-graveyard prune  to clear DEAD servers\n```\n\n`tools` = distinct `mcp__<server>__*` names seen in the window. `invoked` = how many of those got at least one successful call.\n\nPipe to `jq` for custom queries:\n\n```sh\nmcp-graveyard --json | jq '.rows[] | select(.category==\"dead\") | .server'\n```\n\n### `prune`\n\nReads the audit and emits a removal plan. Dry-run by default:\n\n```\nmcp-graveyard prune — plan: 3 servers to remove (0 successful calls in 30 days)\n\n  pencil                                    claude mcp remove pencil\n  plugin_figma_figma                        claude mcp remove plugin_figma_figma\n  claude_ai_Gmail                           claude mcp remove claude_ai_Gmail\n\nre-run with --apply to execute (backup is automatic)\n```\n\nWith `--apply`, `prune` first writes a backup of all servers being removed to `~/.claude/mcp-graveyard-backup/<ISO-timestamp>.json` (mode 0o600), then runs `claude mcp remove <server>` for each. If the backup write fails, it bails before removing anything. If an individual removal fails it prints the error and continues with the rest.\n\n`--only <server-name>` restricts to a single named server.\n\n### `suggest`\n\nClassifies the `MISSING` and `HALLUCINATED` rows into actionable buckets:\n\n- **TYPO** — server name is within Levenshtein distance 2 of a configured server. Worth reviewing the call sites.\n- **REMOVED SERVER** — server name that was once configured but no longer is; Claude may be recalling it from older context.\n- **TOOL/SERVER CONFUSION** — Claude called a built-in CC tool name as an MCP server (e.g. `mcp__Bash__execute`). Known model failure mode; not actionable on your side.\n- **UNCLASSIFIED** — no pattern matched. Manual review.\n\n### `projects`\n\nGroups every server invocation by the `cwd` recorded in your session logs. Surfaces servers that are configured globally but only called in one project (a signal to consider moving them to `<project>/.mcp.json`).\n\n```\n~/projects/client-analytics  17 ses, 39 calls, 2 servers\n    plugin_supabase_supabase    31×\n    plugin_claude-mem_mcp-search 8×\n\n~/projects/clientco/web-platform  2 ses, 2 calls, 1 server\n  ✗ plugin_supabase_supabase  2× (2 hallucinated)\n```\n\n`✗` marks servers with hallucinated tool names (input validation errors). The `(N hallucinated)` tag distinguishes these from runtime errors, which are filtered out at parse time.\n\n## What it reads\n\n- `~/.claude.json` (`mcpServers`) — source of configured servers; target for `prune --apply`\n- `~/.claude/projects/**/*.jsonl` — session logs (tool invocations with `cwd` and timestamps)\n\nPass `--claude-dir` to override the Claude home location.\n\n## What it does NOT do\n\n- **Does not subprocess to MCP servers.** All analysis is local file parsing; no servers are started.\n- **Does not parse `<project>/.mcp.json`.** Per-project MCP configs are intentional per-project artifacts; they are out of scope for v1.\n- **Does not phone home.** No telemetry, no network calls anywhere in the runtime.\n- **Does not have a `restore` subcommand.** Backup files are written on `prune --apply` — restoring is a manual operation using the backup JSON.\n\n## Backup format note\n\n`prune --apply` writes a backup at `~/.claude/mcp-graveyard-backup/<ISO>.json` with mode `0o600` (owner-only read/write). The backup mirrors the `mcpServers` block of `~/.claude.json` for each removed server, including `env` values — which may contain API keys. Clean up old backups yourself. There is no `restore` subcommand in v1; to re-add a server, run `claude mcp add <name> <command> [args...]` using the values in the backup.\n\n## Companion tool: skill-graveyard\n\nThe same dual-signal audit for Claude Code **skills** (SKILL.md installs) rather than MCP servers:\n\n```sh\nnpx skill-graveyard\n```\n\nSix subcommands including `cost` (token cost of skill metadata) and `outdated` (upstream version check). See [packages/skill-graveyard](../skill-graveyard/) or [npm](https://www.npmjs.com/package/skill-graveyard).\n\n## Companion tools\n\n- [`skill-graveyard`](https://www.npmjs.com/package/skill-graveyard) — same pattern for Claude Code skills (SKILL.md installs).\n- [`memory-graveyard`](https://www.npmjs.com/package/memory-graveyard) — same pattern for per-project `MEMORY.md` entries.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}