# Dead Code & Export Auditor MCP

> Dead Code & Export Auditor MCP helps you clean up your codebase and find unused exports or unreachable code paths. It uses AST-driven reference counting to pinpoint exactly where your project's structural integrity is is at risk due to dead code. Perfect for developers enough to care about a clean, lean, and maintainableableableableableableableableableableableableableableableableableableableableableableableableableableableableableableable

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_TxIzYbCp1iyHDcCz3zJR5XnB3PAwZPONj74FPfOZ/mcp
- **Tags:** ast, dead-code, typescript, auditor, refactoring

## Tools

### get_symbol_metadata
Retrieves usage statistics for a specific identifier

### audit_file
Analyzes a single file for unused exports and unreachable code

### audit_project
Performs a global audit across an entire directory

## Prompt Examples

**Prompt:** 
```
Check if there is any dead code in my current directory.
```

**Response:** 
```
The audit of the current directory found 3 unused exports and 2 unreachable blocks, resulting in a dead code density ratio of 0.05.
```

**Prompt:** 
```
Analyze src/utils/math.ts for unused symbols.
```

**Response:** 
```
In src/utils/math.ts, the symbol `calculateInternalSum` is unused (line 42) and there is an unreachable block starting at line 55.
```

**Prompt:** 
```
What is the reference count for the 'Config' class in src/config.ts?
```

**Response:** 
```
The symbol `Config` in src/config.ts has a reference count of 12 and is not marked as an entry point.
```

## Frequently Asked Questions

**How does the auditor detect unused exports?**
The tool performs an AST traversal to build a symbol table and increments reference counts whenever a symbol is encountered. If `audit_project` finds a symbol with zero references, it is flagged as unused.

**Can I audit specific file extensions?**
Yes, when using `audit_project`, you can provide an optional list of extensions like ['.ts', '.js'] to narrow the scope of the scan.

**Does it identify unreachable code?**
Yes, the `audit_file` tool identifies code blocks located after terminal statements like return, throw, or break.