# scopewalker-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/timohaa/scopewalker-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 1084  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/scopewalker-mcp

## Description
Codebase analysis tools for AI agents: complexity, prop drilling, doc coverage, code smells.

## Tools
Capabilities this server exposes over MCP:

- **get_line_counts** — Returns file line counts (code/blank/comment). Use extensions to filter.
- **get_functions** — Returns function/method info. Use detail=lines for line counts per function.
- **check_thresholds** — Finds files/functions exceeding size thresholds. Use limit to control output.
- **get_code_inventory** — Lists classes, functions, methods, and exports. Use extensions to filter.
- **get_code_smells** — Finds TODO/FIXME/HACK/BUG markers and unsafe casts in code.
- **get_complexity_metrics** — Returns complexity metrics (nesting, params, cognitive, per-function cyclomatic). Use limit/summary_only to control output.
- **get_documentation_coverage** — Finds undocumented functions/classes. Use limit/summary_only to control output.
- **get_prop_drilling** — Detects parameter threading (prop drilling) by finding parameter names passed through chains of functions. Use limit/summary_only to control output.
- **find_dead_code** — Finds declared symbols that nothing references. dead_code is proven unreachable within the scan; unreferenced_exports may be used outside it.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "scopewalker-mcp": {
    "command": "npx",
    "args": ["-y","scopewalker-mcp"]
  }
}
```

## Documentation

## What scopewalker-mcp does

scopewalker-mcp gives AI agents a read-only view of codebase quality and structure. Its tools report file and function sizes, nesting and parameter complexity, imports, cognitive and cyclomatic complexity, documentation coverage, code inventory, comment-based markers, prop drilling, and potentially unused code.

The server is intended for local repository analysis rather than editing files or applying fixes. It can identify oversized files and functions, undocumented symbols, high-complexity hotspots, parameters forwarded through multiple layers, and symbols that appear to be unreferenced. Findings can support code reviews, refactoring decisions, and standards checks.

AST-based analysis supports TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, and Ruby. Line counting uses tokei and can report on every language that tokei recognizes.

## How it works

The server communicates over stdio and performs analysis on paths available to the MCP client. Tree-sitter parses source files, tokei calculates line totals, and fast-glob discovers files. The tools are read-only and make no network calls, so source analysis remains on the local machine.

Directory scans stay within allowed roots and do not follow symbolic links. When `SCOPEWALKER_ALLOWED_ROOTS` is set, its comma-separated absolute paths take precedence. Otherwise, the server uses workspace roots shared by the client, falling back to the working directory and system temporary directory when no workspace roots are shared.

AST-based tools skip files larger than 1 MB. Request limits include a maximum of 10,000 files, a depth of 64, and a result limit of 5,000; tools generally return 20 items unless a different limit is requested. Code-smell comments are redacted by default and can be returned explicitly.

## Setup and configuration

Node.js 22 or newer and the `tokei` command-line tool are required. Install tokei with Homebrew or Cargo, then launch the published package through `npx -y scopewalker-mcp`. A global npm installation is also available. Developers building from source can clone the repository, install dependencies, build it, and point an MCP client at `dist/index.js`.

The package includes configurations for Claude Code, Claude Desktop, Cursor, VS Code with Agent Mode, Windsurf, Gemini CLI, and OpenAI Codex CLI. Claude Desktop can use the packaged `.mcpb` release; the other examples launch the npm package as a stdio command. After configuration, an agent can select the appropriate tool from a natural-language request.

## Tools and capabilities

- `get_line_counts` reports total, code, blank, and comment lines, with sorting, extension filters, and project totals.
- `get_functions` lists functions and methods, with optional per-function line details and minimum-size filtering.
- `get_complexity_metrics` measures nesting, parameters including JSX props, imports, cognitive complexity, and cyclomatic complexity, and highlights hotspots.
- `check_thresholds` finds files and functions above configurable size limits, with defaults of 300 lines per file and 100 per function.
- `get_code_inventory` catalogs classes, methods, functions, interfaces or types, enums, and constants, including export status.
- `get_documentation_coverage` calculates coverage and lists undocumented functions, classes, and methods.
- `get_code_smells` detects common markers in parsed comments and TypeScript double casts such as `as unknown as`.
- `get_prop_drilling` traces parameters forwarded across functions and files and assigns risk levels.
- `find_dead_code` separates likely dead symbols from exported symbols that require human judgment.

These tools are useful for requests such as checking repository thresholds, locating complex functions, finding undocumented exports, reviewing TODO markers, or identifying functions with too many parameters.

_Full upstream README: https://allmcps.com/mcp/scopewalker-mcp/readme_

