code-scanner-server
If you are the rightful owner of code-scanner-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A CLI tool and MCP server that scans code files for definitions, respects .gitignore, provides line numbers, and outputs LLM-friendly formats.
The code-scanner-server is a versatile tool designed to scan code files for structural definitions such as classes, functions, and variables. Built with TypeScript and Node.js, it utilizes the Tree-sitter parsing library to analyze source code across multiple programming languages. The tool can function as a command-line interface (CLI) or as a Model Context Protocol (MCP) server, making it adaptable for various use cases. It respects .gitignore files, ensuring that ignored files are not scanned, and provides output in multiple formats including Markdown, XML, and JSON. The tool is under active development, and while its core functionalities are operational, some features or language parsers may still be in testing phases.
Features
- Code Definition Extraction: Identifies functions, classes, variables, interfaces, methods, etc.
- Multi-Language Support: Parses JavaScript, TypeScript, C#, PHP, CSS, and Python using Tree-sitter.
- .gitignore Aware: Automatically respects rules defined in .gitignore files.
- Flexible Filtering: Filter results by definition type, modifiers, name patterns, and file path patterns.
- Multiple Output Formats: Generates results in Markdown, XML, or JSON.
Tools
scan_code
Scans a specified directory for code files and returns a list of definitions according to the provided filters.