Scopewalker MCP
Scopewalker MCP is a local, read-only MCP server that analyzes codebase size, structure, complexity, documentation, and code-quality risks using nine tree-sitter/tokei-powered tools.
get_line_counts — per-file code/blank/comment line counts with extension filters, sorting, and project-wide totals
get_functions — list functions/methods with per-file counts or per-function line metrics, including a
min_linesfilter for oversized functionsget_complexity_metrics — nesting depth, parameter counts, cognitive complexity, cyclomatic complexity, and hotspot flags
check_thresholds — flag files and functions exceeding configurable size limits
get_code_inventory — list classes, functions, methods, interfaces/types, enums, and constants with export status
get_documentation_coverage — coverage percentage plus undocumented functions, classes, and methods
get_code_smells — detect TODO/FIXME/HACK/BUG/UNUSED/DEPRECATED comments and unsafe TypeScript casts via AST analysis
get_prop_drilling — find parameter names threaded through many functions/files with risk ratings
find_dead_code — identify unreferenced symbols and private methods, separated into proven dead code and unreferenced exports
Integrates with GitHub Copilot in VS Code to provide codebase health analysis and complexity metrics.
Allows OpenAI Codex CLI to access codebase analysis tools such as threshold checks, complexity metrics, and code smell detection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Scopewalker MCP check thresholds in the src directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Scopewalker MCP
AI agents will happily create 1000+ line source files and add a 20th parameter to a function call, even if there's a rule file telling them not to. Scopewalker exists to enforce stricter codebase standards.
It's a local MCP server (open source, runs over stdio, makes no network calls) that exposes 9 read-only tools:
get_line_counts- per-file line counts (total, code, blank, comment) with sorting, extension filters, and project-wide totalsget_functions- function and method detection; per-file counts, or per-function line metrics viadetail=lineswith amin_linesfilter for hunting oversized functionsget_complexity_metrics- max/average nesting depth and parameter counts (JSX props included), import counts, a per-file cognitive-complexity score, and per-function cyclomatic complexity with high/extreme severity bands, plus hotspots flagged for deeply nested or over-parameterized functionscheck_thresholds- flags files and functions exceeding size thresholds (defaults: 300 lines per file, 100 per function)get_code_inventory- classes with their methods, functions, interfaces/types, enums, and constants, each marked exported or not; private symbols hidden by defaultget_documentation_coverage- coverage percentage plus every function, class, or method missing a doc comment (JSDoc, Python docstrings, Rust///, and other per-language formats)get_code_smells- TODO/FIXME/HACK/XXX/BUG/UNUSED/DEPRECATED markers found by scanning actual comments via the AST (no false positives from string literals), plusas unknown as/as any asdouble casts in TypeScriptget_prop_drilling- parameter names threaded through many functions and files, with forwarding evidence and a high/medium/low risk ratingfind_dead_code- unreferenced top-level symbols and private methods, split into certaindead_codeand human-judgmentunreferenced_exports
It's tree-sitter (parsing) + tokei (line counting) + fast-glob (file discovery) under the hood; nothing is custom-parsed. Tested on macOS with Claude Code, but should work with Cursor, VS Code, Windsurf, Antigravity CLI, Codex, or anything else that speaks MCP.
See TOOLS.md for the quick reference, docs/ for per-tool parameters and example responses, and docs/usage-examples.md for a guide to wiring Scopewalker into skills, subagents, and AGENTS.md.
Safety Defaults
No network access: All analysis runs locally over stdio: no data leaves your machine, no API keys or external services involved.
Path scoping: All tools only operate inside allowed roots.
SCOPEWALKER_ALLOWED_ROOTS=/abs/path1,/abs/path2takes precedence when set. Otherwise the server uses the workspace roots your MCP client shares, and falls back to the current working directory and system temp when the client shares none.Large file guard: AST-based tools skip files larger than 1 MB to avoid excessive memory/CPU use. Tokei-based line counts do not enforce this limit.
Input ceilings:
max_filescaps at 10000,max_depthat 64,limitat 5000.Symlinks: Directory scans do not follow symbolic links.
Output limits: Tools default to returning 20 files/items unless
limitis set.Comment redaction:
get_code_smellsredacts comment text by default; passinclude_text: trueto return snippets explicitly.
Related MCP server: flyto-indexer
Requirements
Node.js 22+
tokei - Install via
brew install tokeiorcargo install tokei
Installation
Scopewalker is published to npm as scopewalker-mcp; no clone or build needed. Configure your MCP client to run it via npx (examples below), or install it globally with npm install -g scopewalker-mcp.
To build from source instead, see Development.
Configuration
Claude Code
claude mcp add --scope user scopewalker-mcp -- npx -y scopewalker-mcpOr add to ~/.claude.json:
{
"mcpServers": {
"scopewalker-mcp": {
"command": "npx",
"args": ["-y", "scopewalker-mcp"]
}
}
}See Claude Code MCP documentation for details.
Claude Desktop
Download scopewalker-mcp.mcpb from the latest release and open it with Claude Desktop (or drag it into Settings > Extensions) for one-click installation.
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{
"mcpServers": {
"scopewalker-mcp": {
"command": "npx",
"args": ["-y", "scopewalker-mcp"]
}
}
}Or configure via File > Preferences > Cursor Settings > MCP.
See Cursor MCP documentation for details.
VS Code (GitHub Copilot)
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"scopewalker-mcp": {
"command": "npx",
"args": ["-y", "scopewalker-mcp"]
}
}
}Requires VS Code 1.102+ with Agent Mode enabled.
See VS Code MCP documentation for details.
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"scopewalker-mcp": {
"command": "npx",
"args": ["-y", "scopewalker-mcp"]
}
}
}Or configure via Windsurf Settings > Cascade > Manage MCPs.
See Windsurf MCP documentation for details.
Antigravity CLI
Add to ~/.gemini/config/mcp_config.json (global) or
.agents/mcp_config.json (per project):
{
"mcpServers": {
"scopewalker-mcp": {
"command": "npx",
"args": ["-y", "scopewalker-mcp"]
}
}
}Use /mcp inside the prompt panel to check server status and reload the
config.
See Antigravity CLI MCP documentation for details.
For Gemini CLI, add the same mcpServers configuration
to ~/.gemini/settings.json. See Gemini CLI MCP documentation.
OpenAI Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.scopewalker-mcp]
command = "npx"
args = ["-y", "scopewalker-mcp"]Or use the CLI:
codex mcp add scopewalker-mcp -- npx -y scopewalker-mcpSee Codex MCP documentation for details.
Usage
Once configured, the assistant calls Scopewalker's tools on its own; no special syntax needed. Ask things like:
"Check this repo against our size thresholds before I commit"
"Which functions in
src/have the highest cognitive complexity?""Find undocumented exports in
src/auth""Are there any TODO/FIXME/HACK markers left in this module?"
"Show me functions that take more than 5 parameters"
It picks the right tool and parameters for the request.
This repo enforces shared quality requirements through its skills and agents:
.claude/skills/review-changes/SKILL.md: fails reviews on unresolved size, complexity, smell, prop-drilling, or dead-code findings.claude/agents/standards-enforcer.md: fixes actionable findings and verifies them with rescans and tests.claude/skills/polish/SKILL.md: carries unresolved findings through the pipeline and verifies the final state.claude/agents/docs-reality-sync.md: usesget_code_inventoryandget_functionsto keep docs in sync with code
Development
To run from source instead of npm:
git clone https://github.com/timohaa/scopewalker-mcp.git
cd scopewalker-mcp
npm install
npm run buildThen point your MCP client at the build output, e.g. claude mcp add --scope user scopewalker-mcp -- node /path/to/scopewalker-mcp/dist/index.js.
npm run build # Build the project
npm run check # Version sync + lint + typecheck
npm run test # Run tests
npm run test:coverage # Run tests with coverageSee CONTRIBUTING.md for contribution guidelines and docs/patterns.md for tool registration, error handling, and testing patterns.
Supported Languages
The AST-based tools (everything except get_line_counts) parse:
TypeScript/JavaScript (
.ts,.tsx,.js,.jsx,.mjs,.cjs)Python (
.py)Go (
.go)Rust (
.rs)Java (
.java)C/C++ (
.c,.h,.cpp,.cc,.cxx,.hpp)Ruby (
.rb)
get_line_counts runs through tokei, so it reports on every language tokei recognizes. See docs/tools-overview.md for what is detected per language.
License
MIT
Available Tools
9 toolscheck_thresholdsSize ThresholdsBRead-onlyIdempotent
Finds files/functions exceeding size thresholds. Use limit to control output.
Inputs: path (required), limit, max_depth, max_files, +5 more. Returns: path, _meta, summary, thresholds, +1 more
find_dead_codeDead CodeARead-onlyIdempotent
Finds declared symbols that nothing references. dead_code is proven unreachable within the scan; unreferenced_exports may be used outside it.
Inputs: path (required), limit, max_depth, max_files, +3 more. Returns: path, _meta, summary, dead_code, +2 more
get_code_inventoryCode InventoryCRead-onlyIdempotent
Lists classes, functions, methods, and exports. Use extensions to filter.
Inputs: path (required), grep, limit, max_depth, +5 more. Returns: path, _meta, summary, inventory
get_code_smellsCode SmellsBRead-onlyIdempotent
Finds TODO/FIXME/HACK/BUG markers and unsafe casts in code.
Inputs: path (required), limit, types, max_depth, +5 more. Returns: path, _meta, files, summary, +1 more
get_complexity_metricsComplexity MetricsBRead-onlyIdempotent
Returns complexity metrics (nesting, params, cognitive, per-function cyclomatic). Use limit/summary_only to control output.
Inputs: path (required), limit, max_depth, max_files, +4 more. Returns: path, _meta, files, summary
get_documentation_coverageDocumentation CoverageCRead-onlyIdempotent
Finds undocumented functions/classes. Use limit/summary_only to control output.
Inputs: path (required), limit, max_depth, max_files, +5 more. Returns: path, _meta, by_file, summary, +3 more
get_functionsFunctionsCRead-onlyIdempotent
Returns function/method info. Use detail=lines for line counts per function.
Inputs: path (required), grep, limit, detail, +7 more. Returns: path, _meta, files, summary, +1 more
get_line_countsLine CountsBRead-onlyIdempotent
Returns file line counts (code/blank/comment). Use extensions to filter.
Inputs: path (required), grep, limit, sort_by, +3 more. Returns: path, _meta, files, summary, +1 more
get_prop_drillingProp DrillingBRead-onlyIdempotent
Detects parameter threading (prop drilling) by finding parameter names passed through chains of functions. Use limit/summary_only to control output.
Inputs: path (required), limit, max_depth, max_files, +6 more. Returns: path, _meta, summary, is_directory, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools target a distinct analysis concern, but get_functions and get_code_inventory both enumerate functions/methods, and check_thresholds overlaps with get_line_counts and get_complexity_metrics since it operates on the same size/complexity data. Descriptions provide enough nuance to pick correctly in most cases, but the boundaries are not perfectly crisp.
Seven of nine tools follow a clean get_noun pattern, with only check_thresholds and find_dead_code deviating. The verb choice is semantically sensible (check for threshold comparison, find for searching), so the deviation is minor and readable rather than chaotic.
Nine tools is well-scoped for a code-analysis server, with each tool covering a distinct metric or scan type. No tool feels redundant padding or trivially thin.
The surface covers a broad set of static-analysis concerns: inventory, size, complexity, documentation, smells, dead code, and prop drilling. Minor gaps remain (e.g. cross-file dependency/import-cycle analysis or a raw symbol-reference lookup), but core codebase auditing workflows are well supported.
Maintenance
Related MCP Connectors
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Analytics for MCP servers. Find out which of your tools agents get wrong. MCPulse shows you which tools AI agents retry, which come back empty, and which they never call at all. Two lines inside your own server. It never sees your arguments or your results. getmcpulse.com
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that analyzes codebases and generates contextual prompts, making it easier for AI assistants to understand and work with code repositories.19MIT

flyto-indexerofficial
AlicenseNot gradedqualityAmaintenanceMCP server that gives AI assistants impact analysis, cross-project reference tracking, and code health scoring.172 PyPI4Apache 2.0- AlicenseCqualityDmaintenanceAn MCP server that analyzes local or remote GitHub repositories, providing intelligent code context and structure to AI coding assistants.1013MIT
- AlicenseAqualityBmaintenanceAn MCP server that provides local code quality analysis for AI coding assistants, supporting file analysis, git diff review, and full project scanning with quality scoring.53MIT