Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Scantool - File Scanner MCPpreview_directory . depth=normal"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Scantool - File Scanner MCP
MCP server for analyzing source code structure across multiple languages. Extracts classes, functions, methods, and metadata (signatures, decorators, docstrings) with precise line numbers.
Features
Multi-language Support
Python, JavaScript, TypeScript, Rust, Go, C/C++, Java, PHP, C#, Ruby, SQL (PostgreSQL, MySQL, SQLite), Markdown, Plain Text, Images
Structure Extraction
Classes, methods, functions, imports
Function signatures with type annotations
Decorators and attributes
Docstrings and JSDoc comments
Precise line numbers (from-to ranges)
Analysis Tools
preview_directory: Intelligent codebase analysis with entry points, import graph, call graph, and hot functions (5-10s)
scan_file: Detailed file structure with signatures and metadata
scan_directory: Compact directory tree with inline function/class names
search_structures: Filter by type, name pattern, decorator, or complexity
list_directories: Directory tree (folders only)
Output Formats
Tree format with box-drawing characters (├─, └─, │)
JSON format for programmatic use
Configurable display options
Installation
Install with uvx
Install from Smithery
https://smithery.ai/server/@mariusei/file-scanner-mcp
Install from Source
Configuration
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Or if installed from source:
Restart Claude Desktop after configuration.
Usage
preview_directory - Code analysis (primary tool)
Analyzes codebase structure including entry points, import graph, call graph, and hot functions.
Depth levels:
"quick": Metadata only (0.5s) - file counts, sizes, types"normal": Architecture analysis (2-5s) - imports, entry points, clusters"deep": Full analysis (5-10s) - includes hot functions and call graph (default)
Example output (depth="deep"):
Use cases:
First-time codebase exploration
Understanding multi-modality projects (frontend/backend/database)
Finding critical functions (hot spots)
Identifying entry points
scan_file - Detailed file analysis
Example output:
scan_file_content - Analyze content directly
Scan content without requiring a file path. Works with remote files, APIs, or in-memory content.
scan_directory - Compact overview
Shows directory tree with inline class/function names.
Example output:
Pattern examples:
search_structures - Find and filter
list_directories - Folder structure
Shows directory tree without files.
Example output:
Supported Languages
Extension | Language | Extracted Elements |
| Python | classes, methods, functions, imports, decorators, docstrings |
| JavaScript | classes, methods, functions, imports, JSDoc comments |
| TypeScript | classes, methods, functions, imports, type annotations, JSDoc |
| Rust | structs, enums, traits, impl blocks, functions, use statements |
| Go | types, structs, interfaces, functions, methods, imports |
| C | functions, structs, enums, includes |
| C++ | classes, functions, namespaces, templates, includes |
| Java | classes, methods, interfaces, enums, annotations, imports |
| PHP | classes, methods, functions, traits, interfaces, namespaces |
| C# | classes, methods, properties, structs, enums, namespaces |
| Ruby | modules, classes, methods, singleton methods |
| SQL | tables, views, functions, procedures, indexes, columns |
| Markdown | headings (h1-h6), code blocks with hierarchy |
| Plain Text | sections, paragraphs |
| Images | format, dimensions, colors, content type |
All files include metadata (size, modified date, permissions) automatically.
Use Cases
Code Navigation
Structural overview of unfamiliar codebases
File organization understanding
Navigation using precise line ranges
Refactoring
Identify class and function boundaries for safe splitting
Find implementations of specific patterns
Locate functions above complexity thresholds
Code Review
Generate structural diffs
Find functions with specific decorators
Identify test coverage gaps
Documentation
Auto-generate table of contents with line numbers
Extract API signatures
Feed structured data to analysis tools (JSON output)
AI Code Assistance
Primary exploration tool (replaces ls/grep/find workflows)
Partition large files intelligently for LLM context windows
Extract code sections with exact boundaries
Search patterns across codebases
Reduce token usage: get structure first, read content only when needed
Architecture
Testing
Contributing
See CONTRIBUTING.md for details on adding language support.
License
MIT License - see LICENSE file for details.
Dependencies
FastMCP - MCP server framework
tree-sitter - Parsing library
uv - Python package installer
Known Limitations
MCP Tool Response Size Limit
Claude Desktop enforces a 25,000 token limit on MCP tool responses.
Built-in mitigations:
scan_directory()uses compact inline formatRespects
.gitignoreby default (excludes node_modules, .venv, etc.)Shows file metadata with relative timestamps
Manual controls:
Use
patternto limit scope:"**/*.py"vs"*/*"(shallow)Use
max_filesto cap number of files processedUse
exclude_patternsfor additional exclusionsScan specific subdirectories instead of entire codebase
For large codebases:
Agent Delegation
When using Claude Code, asking to "explore the codebase" may delegate to the Explore agent which doesn't have access to MCP tools. Be explicit: "use scantool to scan the codebase" to ensure the MCP tool is used directly.