npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@craftpipe/deadcode-mcp

v1.0.0

Published

An MCP server that gives AI coding agents dead code detection superpowers — find unused exports, unreferenced functions, orphaned files, and circular dependencies across any JavaScript/TypeScript project. Built with AI by Craftpipe

Downloads

64

Readme

deadcode-mcp

Dead code detection superpowers for AI coding agents — find unused exports, unreferenced functions, orphaned files, and circular dependencies across any JavaScript/TypeScript project.

Note on analysis accuracy: All analysis is performed via regex and AST-based static analysis. This approach works well for the majority of codebases but may have limitations with dynamic imports (import() expressions resolved at runtime), complex re-export patterns (e.g. barrel files with wildcard re-exports), or code that is accessed through reflection. Results should be treated as a helpful guide rather than a guaranteed exhaustive list.

Installation

Quick Start

npx deadcode-mcp

Global Installation

npm install -g deadcode-mcp

MCP Client Configuration

Claude Desktop

Add to claude_desktop_config.json (usually at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "deadcode-mcp": {
      "command": "npx",
      "args": ["-y", "deadcode-mcp"]
    }
  }
}

Cursor

Open Cursor → Settings → MCP (or edit ~/.cursor/mcp.json) and add:

{
  "mcpServers": {
    "deadcode-mcp": {
      "command": "npx",
      "args": ["-y", "deadcode-mcp"]
    }
  }
}

Restart Cursor after saving. The tools will appear in the Composer's tool picker.

Cline (VS Code extension)

Open the Cline sidebar → click the MCP Servers icon → Edit MCP Settings, then add:

{
  "mcpServers": {
    "deadcode-mcp": {
      "command": "npx",
      "args": ["-y", "deadcode-mcp"]
    }
  }
}

Save the file — Cline will connect automatically.

Windsurf

Add to your Windsurf MCP configuration file:

{
  "mcpServers": {
    "deadcode-mcp": {
      "command": "npx",
      "args": ["-y", "deadcode-mcp"]
    }
  }
}

With a Pro license

If you have a PRO_LICENSE key, pass it as an environment variable:

{
  "mcpServers": {
    "deadcode-mcp": {
      "command": "npx",
      "args": ["-y", "deadcode-mcp"],
      "env": {
        "PRO_LICENSE": "your-license-key-here"
      }
    }
  }
}

Tools

find_unused_exports

Identifies exported functions, classes, and variables that are never imported elsewhere in the codebase.

Parameters:

  • directory (string, required) — root directory to scan
  • include_types (boolean, optional) — also report unused TypeScript type/interface exports (default: false)

Example:

Find all unused exports in src/

find_unreferenced_files

Detects orphaned files that aren't imported or required by any other module.

Parameters:

  • directory (string, required) — root directory to scan

Example:

Show me unreferenced files in the project

find_unused_functions

Locates functions and methods that are defined but never called.

Parameters:

  • directory (string, required) — root directory to scan

Example:

Find unused functions in src/utils/

detect_circular_dependencies

Identifies circular dependency chains that can cause module resolution issues.

Parameters:

  • directory (string, required) — root directory to scan

Example:

Detect circular dependencies in src/

get_file_dependencies

Shows all imports and exports for a specific file.

Parameters:

  • file_path (string, required) — path to the file to analyse

Example:

Show dependencies for src/utils/helpers.ts

summarize_codebase_health

Runs all checks and returns a consolidated health report with severity scores.

Parameters:

  • directory (string, required) — root directory to scan

Example:

Give me a full codebase health report

list_premium_features

Lists the premium tools available with a Pro license. Call this tool to discover what additional capabilities are unlocked.

Example:

What premium features are available?

Premium Features

A Pro license unlocks three additional tools:

| Tool | Description | |------|-------------| | batch_process_directory | Run all checks in one call and receive a consolidated report | | configure_analysis_options | Persist per-project ignore patterns and severity thresholds | | extra_insights | Advanced heuristics: barrel-file dead entries, dead type aliases, test-only references |

Get a license at https://craftpipe.gumroad.com and set it via the PRO_LICENSE environment variable (see configuration examples above).

Limitations

  • Dynamic imports resolved at runtime are not tracked.
  • Wildcard re-exports (export * from '...') may cause false positives.
  • Reflection / eval-based access to exports cannot be detected.
  • Results are a helpful guide — always review before deleting code.

License

MIT © Craftpipe