About
Scantool is a code structure analysis tool that scans and maps source code across 20+ programming languages to help developers navigate and understand large codebases faster. Powered by tree-sitter, it extracts detailed structural information with precise line numbers. Key features of Scantool: - Multi-language support including Python, JavaScript, TypeScript, Rust, Go, C/C++, Java, PHP, C#, Ruby, Zig, Swift, SQL (PostgreSQL, MySQL, SQLite), HTML, CSS, SCSS, and Markdown - Extracts classes, methods, functions, imports, call graphs, and decorators with complete type annotations - Identifies function signatures, docstrings, JSDoc comments, and attributes - Searches for specific code patterns such as test files, async methods, and dataclasses - Provides compact overviews to help prioritize code exploration and refactoring targets - Delivers precise line numbers for all extracted code elements
README
Scantool: Code Analysis MCP Server for Claude
[](https://pypi.org/project/scantool/) [](https://opensource.org/licenses/MIT)
MCP server for analyzing source code structure across 20+ languages. Works with Claude Code, Claude Desktop, and any Model Context Protocol client. Powered by tree-sitter. Extracts classes, functions, methods, imports, call graphs, and hot functions with precise line numbers.
Quick Start
Requires uv (provides the uvx command). Install it first if you don't have it — without it, scantool will silently fail to start:
# macOS / Linux / WSL
curl -LsSf https://astral.sh/uv/install.sh | sh
Claude Code
claude mcp add scantool -- uvx scantool
That's it. Restart Claude Code and you're ready to go.
Claude Desktop
Add to config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"scantool": {
"command": "uvx",
"args": ["scantool"]
}
}
}
Restart Claude Desktop after configuration.
Troubleshooting: uvx not found
uvx comes with uv, the Python package manager. Install it first:
# macOS / Linux / WSL
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
After installing uv, restart your terminal (or open a new one) so uvx is on your PATH. Then re-run the setup command above.
If uvx still isn't found after restarting the terminal, add it to your PATH manually:
# Linux / WSL - add to ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"macOS - usually works out of the box, but if not:
export PATH="$HOME/.local/bin:$PATH"
Alternative: Install from source
git clone https://github.com/mariusei/file-scanner-mcp.git
cd file-scanner-mcp
uv syncClaude Code
claude mcp add --transport stdio scantool -- uv run --directory /path/to/file-scanner-mcp scantoolClaude Desktop
Use command: "uv", args: ["run", "--directory", "/path/to/file-scanner-mcp", "scantool"]
Share with your team (.mcp.json)
Add a .mcp.json file to your project root to share the config with your team:
{
"mcpServers": {
"scantool": {
"command": "uvx",
"args": ["scantool"]
}
}
}
Claude Code will prompt team members for approval on first use.
Features
Multi-language Support
Python, JavaScript, TypeScript, Rust, Go, C/C++, Java, PHP, C#, Ruby, Zig, Swift, SQL (PostgreSQL, MySQL, SQLite), HTML, CSS, SCSS, Markdown, Plain Text, ImagesStructure Extraction
Analysis Tools
Output Formats
Usage
preview_directory - Code analysis (primary tool)
Analyzes codebase structure including entry points, import graph, call graph, and hot functions.
preview_directory(
directory=".",
depth="deep", # "quick", "normal", or "deep" (default: "deep")
max_files=10000, # Safety limit (default: 10000)
max_entries=20, # Entries per section (default: 20)
respect_gitignore=True # Honor .gitignore (default: True)
)
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"):
``` project/
--- ENTRY POINTS --- main.py:main() @1 backend/application.py:Flask app @15 frontend/index.ts:export default
--- CORE FILES (by centrality) --- backend/database.py: imports 0, used by 15 files backend/auth.py: imports 1, used by 8 files shared/utils.py: imports 2, used by 12 files
--- ARCHITECTURE --- Entry Points: 25 files Core Logic: 68 files Plugins: 15 files Tests: 42 files
--- HOT FUNCTIONS (most called) --- get_database() (function): called by 41, calls 1 @backend/database.py authenticate() (function): called by 23, calls 5 @backend/auth.py validate_input() (function): called by 15, calls 2 @shared/utils.py
A
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Math-MCP
EthanHenrickson
Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support