Skip to main content
Glama

api-dead-ends

test npm MCP server Claude Code plugin UTCP license

Find API endpoints that fail, are never called, or are missing from your OpenAPI spec — using the logs and metrics you already have. CLI, MCP server, UTCP manual and Claude Code plugin.

OpenAPI vs real traffic: compares your spec (or your framework's route list) with request counts from your logs, APM or metrics, and finds unused API endpoints, endpoints not called in production, shadow APIs and zombie APIs — an API inventory from facts. Local, read-only, zero dependencies, any language.

🤖 Don't want to read? Copy this into Claude Code or Cursor

Set up api-dead-ends for me (https://github.com/talikbaku/api-dead-ends) — a read-only CLI and MCP server that compares my OpenAPI spec (or route list) with real traffic and lists endpoints with errors, endpoints not called in the window, and undocumented (shadow) endpoints.
1. Check Node.js >= 20 (22+ recommended); tell me how to install it if missing.
2. Claude Code: /plugin marketplace add talikbaku/api-dead-ends then /plugin install api-dead-ends@api-dead-ends-marketplace
   Cursor or another MCP client: add server "ade" = {"command":"npx","args":["-y","api-dead-ends@0.2.0","mcp"]}
3. Run detect_project, tell me which services, specs and traffic sources you found, and ask what's missing in one block.
4. Rules: never paste raw logs into the chat, never call non-GET endpoints in production, never call an endpoint "dead" — "not called" is only a hint.
Short docs: https://github.com/talikbaku/api-dead-ends/blob/main/llms.txt

Related MCP server: API Debugger MCP

🔍 What it finds

Finding

Example

✖

Broken — share of 5xx per endpoint, plus endpoints with many client errors (4xx)

POST /promo/apply — 23% of calls end in 500

!

Undocumented (shadow) — called in production, missing from the spec

GET /api/v1/products/{id}/reviews — 34,507 calls

○

Not called in the window — with the window length and a confidence level

POST /orders/{id}/repeat — 0 calls in 30 days

↓

Deprecated but still called

GET /legacy/catalog — 6,826 calls

NOTE

"Not called" is a hint, not a verdict: the endpoint may be used monthly, by a partner, by an old app version — or its traffic may not be logged. api-dead-ends recommends; a human decides.

🤔 Why not just Datadog, Sentry or an AI?

  • Spec vs reality. Monitoring shows what is called; it doesn't know what your spec promises. api-dead-ends puts both side by side.

  • Numbers come from code, not from a model. Same input → same report. AI is optional, on top.

  • CI fails only on what's new — a new undocumented endpoint or growing use of a deprecated one. Never on "not called".

Verified on real production data: Elasticsearch / Kibana / OpenSearch. Built from vendor docs, feedback welcome: Datadog APM & Logs · Prometheus / Thanos / Mimir · Loki · App Insights · CloudWatch · Athena · BigQuery · New Relic · Dynatrace · Splunk · nginx / Apache / JSON access logs · any CSV

flowchart LR
  src["Your logs / APM / metrics"] -->|"query → aggregated counts only"| use["usage table<br/>method · path · calls · status"]
  spec["OpenAPI spec<br/>or framework route list"] --> rep
  use --> rep{{"report<br/>by code, not LLM"}}
  rep --> md["report.md / .json"]
  rep --> ci["CI gate"]
  rep --> mcp["MCP → Claude Code, Cursor"]

🚀 Quick start

Node.js 20+ (22+ recommended). No install, no dependencies:

npx api-dead-ends init

init scans your repo (services, languages, frameworks, specs), asks a few questions — Enter accepts the default — and writes .api-dead-ends/NEXT-STEPS.md with the exact commands for each service. It never changes your code.

Already have an export from Kibana, Datadog, Prometheus…? Two commands:

npx api-dead-ends convert elasticsearch kibana-response.json --spec openapi.json -o usage.csv
npx api-dead-ends report --usage usage.csv --spec openapi.json --days 15 --out report/

No logs? Today the tool needs some traffic data — at least nginx/Apache access logs. Options: no logs.

No OpenAPI spec? Ask your framework for its route list (rails routes, flask routes, Spring /actuator/mappings, Gin debug output, Laravel route:list…):

npx api-dead-ends spec from-routes routes.txt -o openapi.json

📊 Example report

From the synthetic demo in examples/ — full report:

## Summary
- 2 endpoints with server errors (5xx ≥ 1% of calls and ≥ 10 responses) — and 1,624 more 5xx on 3 endpoints below that threshold.
- 1 endpoint with many client errors (4xx other than 401/404 ≥ 10%).
- 3 undocumented endpoints called (not in the spec).
- 3 endpoints not called in 30 days, 2 rare, 2 deprecated but still called. Confidence: low.

👥 By role

You are

You ask

Look at

QA / SDET

Which endpoints return 5xx in real traffic? Which have no traffic at all?

Server errors · Client errors · Not called

Backend

What does my API actually serve before I refactor or deprecate?

Not called · Deprecated but still called

DevOps / SRE

Can I get this from the Prometheus / Loki / ES I already run, with no agent?

query prometheus --preset …, query loki

AppSec

Which undocumented endpoints do real clients hit? Any debug paths answering 200?

Undocumented (flags debug/admin paths)

Analyst

Where does the spec differ from reality?

Undocumented · Not called

Product

Which features' endpoints does nobody use?

Not called (with confidence)

Small team, no logs

What can I get today?

Access logs → convert accesslog; see no logs

🤖 AI agents (MCP, UTCP)

A real Claude Code run with the plugin on the synthetic test project; answer abridged.

Claude Code plugin (MCP server + a skill with guardrails):

/plugin marketplace add talikbaku/api-dead-ends
/plugin install api-dead-ends@api-dead-ends-marketplace

Cursor, VS Code, Windsurf, Claude Desktop — any MCP client:

{ "mcpServers": { "ade": { "command": "npx", "args": ["-y", "api-dead-ends@0.2.0", "mcp"] } } }

Five tools, reading only inside the working directory: detect_project, setup_plan, build_query, spec_from_routes, analyze_usage.

UTCP (experimental): no server needed — npx api-dead-ends utcp prints a UTCP manual with the same five tools that call the CLI directly. Register it as a cli call template in any UTCP client.

Any other chat assistant: paste prompts/any-ai.md with your report.json. Details: docs/MCP.md.

🛡️ Safe by default

  • Aggregates only. The tool reads counts per method + path + status. Raw log lines, IPs, tokens and request bodies never enter it; IDs and token-like path segments are folded to {id}, query strings dropped.

  • No network. It prints queries; you run them with your own access. The only exception is fetch elasticsearch with your read-only key.

  • Nothing changes your code. init writes a config and next steps, never overwrites, and keeps raw exports out of git.

  • Traffic is untrusted. Paths from logs are escaped in reports and in MCP output, so they can't inject Markdown or instructions. docs/SECURITY.md

⚙️ CI gate

npx api-dead-ends report --usage usage.csv --spec openapi.json --write-baseline baseline.json   # once
npx api-dead-ends report --usage usage.csv --spec openapi.json --baseline baseline.json --fail-on new-shadow,deprecated-growth

Exit codes: 0 ok · 1 check failed · 2 bad input.

🧪 Try the demo

git clone https://github.com/talikbaku/api-dead-ends.git && cd api-dead-ends
node bin/api-dead-ends.mjs report --usage examples/shop-usage.csv --spec examples/shop.openapi.json --days 30 --out /tmp/report

All data in examples/ is synthetic.

⚠️ Limits

  • Window. Logs often keep 7–30 days; monthly jobs may not show up. Confidence: low < 35 days, medium < 90, high ≥ 90. APM metrics keep months — prefer them for "not called".

  • Coverage. Traffic that bypasses the logged layer, or endpoints that don't log, are invisible.

  • Verified sources. Elasticsearch/Kibana is verified on real production data; the other adapters are built from vendor docs — please report parsing problems.

📚 More

Status: v0.2.0. docs/MORE.md — all flags, thresholds, path templating, framework route lists, no-logs options, FAQ · docs/SOURCES.md — every source · docs/MCP.md · docs/SECURITY.md · CHANGELOG.md

Try it on your traffic and tell me what broke — open an issue. Useful? ⭐ Star the repo.

MIT © 2026 Talat Gurbanbayov · also by the author: curl2k6 — k6 performance regression checks from a curl

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides AI coding agents with accurate OpenAPI contract details to prevent hallucinated API calls, supporting multi-version pinning, endpoint discovery, and request validation.
      42 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to inspect, test, validate, compare, and debug HTTP APIs through a structured toolkit, with features such as secret redaction, response contract validation, regression comparison, health checks, and incident investigation workflows.
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables LLMs to dereference and query OpenAPI/Swagger specifications, search endpoints and schemas, validate payloads, extract security schemes, and generate production-ready integration code in multiple languages.
      8
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to search API documentation, retrieve endpoint details, get SDK snippets, and check changelogs from an OpenAPI spec.
      7
      112 npm
      4
      MIT