Labsco
MCP SERVER

Code Scanner Server

by Ixe1

Scans a codebase with Tree-sitter and returns its definitions — classes, functions, methods, interfaces — with line numbers, filtered how you ask, in Markdown, XML or JSON.

Code Intelligence & Repository Indexing
Summary
A map of the codebase for the price of one call.

Handing a model a repository usually means it reads files until the context window fills. A definition list with line numbers gives it the structure first, so the files it then opens are chosen rather than stumbled into — and the filters are what make that work on something large, since scanning a monorepo unfiltered just moves the problem. Output format matters more than it sounds: XML and JSON are there because a model parses them more reliably than prose, and Markdown is there because you might want to read it yourself.

What it is

A structural scanner rather than a text search. It parses source files with Tree-sitter and reports the definitions it finds, so an assistant can get the shape of a codebase without reading every file — and the output formats are chosen for a model to consume.

What you get
  • One tool that scans a directory and returns its definitions — functions, classes, variables, interfaces and methods — with line numbers attached — `scan_code`
  • Six languages through Tree-sitter: JavaScript, TypeScript, C#, PHP, CSS and Python, matched by extension
  • Rules from your `.gitignore` respected automatically, so vendored and build directories do not swamp the result
  • Filtering that actually narrows a large repository: by definition type, by modifier such as public or private, by a regex on names, and by glob patterns on file paths — each available as both an include and an exclude
  • Three output formats — Markdown by default, or XML or JSON — and three verbosity levels from minimal through standard to detailed
  • The same functionality as a CLI: pass a directory argument and it runs standalone, omit it and the same binary starts as an MCP server on stdio
Requirements

No account and no key. Node.js and npm: clone, `npm install`, `npm run build`, and point your client at the built entry with node using an absolute path. The package is `code-scanner-server` (0.1.0 in package.json). The directory to scan is a required argument on every call, so the server is not bound to one project. The README notes the tool is under active development and that some language parsers are less tested than others.