Back to browse
GitHub Repository

Codebase analysis MCP server for AI agents: complexity metrics, size thresholds, prop drilling, and code smell detection built on tree-sitter and tokei.

0 starsTypeScript

Scopewalker, an MCP server for codebase complexity metrics

by thaanpaa·Jul 3, 2026·1 point·0 comments

Post Description

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. So I built Scopewalker: a local MCP server (open source, runs over stdio, and makes no network calls) that gives agents actual numbers to check against.

It gives the agent 8 read-only tools: line counts, cognitive complexity/nesting/parameter counts, an oversized-file/function checker against configurable thresholds, doc coverage, code smell detection (TODO/FIXME/HACK in comments and unsafe casts), and prop-drilling detection. It's tree-sitter + tokei + fast-glob under the hood; nothing is custom-parsed. Tested on macOS with Claude Code, but should work with Cursor, VS Code, Windsurf, Gemini CLI, Codex, or anything else that speaks MCP.

TS/JS, Python, Go, Rust, Java, C/C++, and Ruby.

I've actually been sitting on this for a while, because it's mostly vibe-coded. But I've used it and kept refining and fixing it for months, and it seems to work. Plus my colleague finally pushed me into polishing the repo and making it public.

Similar Projects

Developer Tools●●●Banger

I built a codebase analysis MCP: Stria

Indexes the Linux kernel in 80 seconds without AST parsers, where tree-sitter tools fail.

WizardryShip ItSolve My Problem
microbass
311mo ago