code-scanner
CLI & MCP server for scanning code definitions (.gitignore aware, LLM output)
claude mcp add --transport stdio ixe1-code-scanner-server node build/index.js
How to use
code-scanner-server provides a dual-mode solution: a CLI tool for local code scanning and an MCP server interface that can be consumed by AI assistants or editors through standard input/output. It uses Tree-sitter to parse multiple languages (JavaScript, TypeScript, C#, PHP, CSS, Python) and extracts definitions such as classes, functions, methods, variables, and interfaces. Results can be emitted in XML, Markdown, or JSON, with filtering options for definition types, modifiers, name patterns, and file paths. The MCP server mode accepts the same options as the CLI (via an input schema) and returns a structured list of definitions for a given directory, facilitating integration with other tools and workflows. To use the MCP server in an editor or automation layer, configure your MCP client to run the server executable and pass the required directory and optional filters; the server will respond with the requested definitions in the chosen output format.
How to install
Prerequisites:
- Node.js and npm installed on your system
Installation steps:
- Clone the repository (optional):
# git clone <repository_url>
# cd code-scanner-server
- Install dependencies:
npm install
- Build the TypeScript project to generate the runnable index:
npm run build
This produces the executable JavaScript file at build/index.js. 4. (Optional) Run in MCP mode directly after build:
node build/index.js
- If you need continuous development:
npm run watch
This will rebuild on file changes.
Additional notes
Tips and considerations:
- The MCP server reads input via standard input/output, matching the CLI options to an input schema. When used with an MCP client, ensure the directory path is absolute and the worker has permissions to read the project files.
- The scanner respects .gitignore rules by default, avoiding ignored files unless explicitly overridden.
- Output verbosity levels are fixed in the CLI; in MCP mode, you control detail via the detailLevel option (minimal, standard, detailed).
- If you plan to integrate with an editor, point the MCP client at the built index.js path (build/index.js) and provide the directory to scan; you may also pass includePaths, excludePaths, and other filters as needed.
- Common issues: missing language parsers for certain languages may yield partial results; ensure Tree-sitter parsers for target languages are supported in the build, and keep dependencies up to date with npm install.
Related MCP Servers
mcp-google-map
A powerful Model Context Protocol (MCP) server providing comprehensive Google Maps API integration with LLM processing capabilities.
frontmcp
TypeScript-first framework for the Model Context Protocol (MCP). You write clean, typed code; FrontMCP handles the protocol, transport, DI, session/auth, and execution flow.
systemprompt-code-orchestrator
MCP server for orchestrating AI coding agents (Claude Code CLI & Gemini CLI). Features task management, process execution, Git integration, and dynamic resource discovery. Full TypeScript implementation with Docker support and Cloudflare Tunnel integration.
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
rohlik
MCP server that lets you shop groceries across the Rohlik Group platforms (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro)
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.