
deadcode-mcp
deadcode-mcp provides MCP access to dead code detection in JavaScript and TypeScript projects. It scans codebases for unused functions, variables, imports, and files using static analysis. Software developers and DevOps teams apply it in refactoring, CI/CD pipelines, and monorepo maintenance to reduce bloat and technical debt.
Overview
deadcode-mcp is an MCP server designed for identifying dead code—unused functions, classes, variables, imports, and files—in JavaScript and TypeScript codebases. Leveraging static analysis similar to the deadcode npm library, it enables programmatic scans without runtime execution, outputting precise locations for cleanup.
Key Capabilities
No specific tools are currently listed as available (N/A). Based on the server name, it supports core functions such as:
- Project-wide scanning for dead exports and imports.
- File-level analysis to flag unused definitions.
- Report generation with line numbers and dependency graphs. These integrate into MCP workflows for AI-assisted code review.
Use Cases
- CI/CD Pipeline Checks: Invoke project scan before merges to detect and reject dead code, enforcing code quality.
- Refactoring Legacy Code: Analyze individual modules to safely remove unused elements during upgrades.
- Monorepo Optimization: Generate reports across large repositories to prioritize dead code removal and shrink bundle sizes.
- Frontend Build Audits: Identify dead imports in React/Vue apps to improve load times and tree-shaking.
Who This Is For
- JavaScript/TypeScript developers maintaining medium-to-large projects.
- DevOps engineers automating code hygiene in pipelines.
- Teams handling monorepos or legacy migrations seeking static analysis tools.