Labsco
Ixe1 logo

Code Scanner Server

โ˜… 2

from Ixe1

Scans code files for definitions, respects .gitignore, and outputs in LLM-friendly formats like XML or Markdown.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

MseeP.ai Security Assessment Badge

Code Scanner Server MCP server

code-scanner-server

A CLI tool and MCP server that scans code files for definitions (classes, functions, etc.), respects .gitignore, provides line numbers, and outputs LLM-friendly formats (XML/Markdown).

This project provides a versatile code scanning tool built with TypeScript and Node.js. It leverages the Tree-sitter parsing library to analyze source code and extract structural information. It can operate both as a command-line interface (CLI) tool and as an MCP (Model Context Protocol) server.

Note: This tool is under active development. While core functionality is operational, some features or specific language parsers may not be fully tested and might contain bugs or limitations.

Features

  • Code Definition Extraction: Identifies functions, classes, variables, interfaces, methods, etc.
  • Multi-Language Support: Parses JavaScript (.js, .jsx), TypeScript (.ts, .tsx), C# (.cs), PHP (.php), CSS (.css), and Python (.py) via Tree-sitter.
  • .gitignore Aware: Automatically respects rules defined in .gitignore files.
  • Flexible Filtering: Filter results by definition type, modifiers (public, private), name patterns (regex), and file path patterns.
  • Multiple Output Formats: Generates results in Markdown (default), XML, or JSON.
  • Configurable Detail Levels: Output verbosity: minimal, standard (default), detailed.
  • Dual Mode Operation: Run as a standalone CLI tool or as an integrated MCP server.

Development

  • Watch Mode: Automatically rebuild the project when source files change:
    npm run watch
  • Debugging (MCP Mode): Debugging MCP servers over stdio can be complex. Use the MCP Inspector tool for easier debugging:
    npm run inspector
    This starts the server with the Node.js inspector attached and provides a URL to connect debugging tools (like Chrome DevTools).