CLI & MCP server for scanning code definitions (.gitignore aware, LLM output)
Overview
What is Code Scanner Server?
Code Scanner Server is a CLI tool and MCP server designed to scan code files for definitions such as classes and functions, while respecting .gitignore files and providing outputs in LLM-friendly formats like XML and Markdown.
How to use Code Scanner Server?
To use the Code Scanner Server, you can run it as a command-line interface (CLI) tool by specifying the target codebase directory or as an MCP server for integration with AI assistants.
CLI Usage Example:
node build/index.js --directory /path/to/your/codebase
MCP Server Usage:
Run without the --directory argument to start the MCP server, allowing requests from clients.
Key Features of Code Scanner Server?
- Code Definition Extraction: Identifies functions, classes, variables, and more.
- Multi-Language Support: Supports JavaScript, TypeScript, C#, PHP, CSS, and Python.
- .gitignore Aware: Respects rules defined in .gitignore files.
- Flexible Filtering: Filter results by definition type, modifiers, and name patterns.
- Multiple Output Formats: Generates results in Markdown, XML, or JSON.
- Configurable Detail Levels: Output verbosity can be adjusted.
- Dual Mode Operation: Can function as a CLI tool or an MCP server.
Use Cases of Code Scanner Server?
- Scanning a codebase for function definitions in a TypeScript project.
- Integrating with AI tools to provide code analysis and insights.
- Generating documentation from code definitions in various formats.
FAQ from Code Scanner Server?
- What languages does Code Scanner Server support?
It supports JavaScript, TypeScript, C#, PHP, CSS, and Python.
- Is it necessary to have Node.js installed?
Yes, Node.js and npm are required to run the Code Scanner Server.
- Can I customize the output format?
Yes, you can choose between Markdown, XML, and JSON formats for the output.