analyze_codeLABSCO SUMMARY
Extraction is the point: send the function, not the file.
Everything else follows from that — the call graph tells the assistant which function to extract, symbol references tell it what a rename would touch, and simulate_refactor shows the effect before anything changes. The analysis runs on your machine, so the code does not leave it; the tier system decides how deep the scanning and symbolic execution go.
What it is
A local code-analysis server. It parses source into ASTs and program-dependence graphs, extracts precise slices instead of whole files, and layers security scanning, symbolic execution and policy checks on top.
What you get
- extract_code and get_file_context — pull one function or a scoped region rather than the whole file
- analyze_code — structure and complexity analysis for a file or snippet
- crawl_project and get_project_map — walk a repository and build a map of it
- get_call_graph, get_graph_neighborhood, get_cross_file_dependencies — who calls what, and across which files
- get_symbol_references, rename_symbol, update_symbol — find every reference to a symbol and change it
- simulate_refactor — see the effect of a refactor before committing to it
- security_scan, cross_file_security_scan, unified_sink_detect, type_evaporation_scan — vulnerability scanning within and across files
- scan_dependencies — check the dependency set
- symbolic_execute — explore paths symbolically rather than by running the code
- generate_unit_tests — produce tests for the code you extracted
- code_policy_check and verify_policy_integrity — enforce policy and confirm the policy itself has not been tampered with
- validate_paths and get_capabilities — check the paths it may read and what the current tier exposes
- Language coverage spans Python, JavaScript, TypeScript, Java, Go, Kotlin, PHP, Ruby, Swift, Rust, C, C++ and C#, with graph tools strongest on Python
Requirements
Runs locally. Register it in Claude Code with a single mcp add command using uvx, or install from PyPI as codescalpel and start it with the mcp subcommand. Python 3.10 or later for the pip path; the uvx path manages its own environment. Optional extras cover the agent, web and polyglot features.
Setup effort
One command — claude mcp add codescalpel uvx codescalpel mcp
USE CASES
Asking about one function in a large file
Extract just that function and its immediate context instead of pasting the file.
Working out what a change breaks
Build the call graph, find every reference to the symbol, and simulate the refactor.
Reviewing a change for security
Scan the file, then scan across files for flows that only appear when the pieces are combined.
Getting oriented in a new repository
Crawl the project, read the map, and look at the dependency set.
Renaming something safely
Find all references, apply the rename, and verify the graph afterwards.
Covering a function with tests
Extract the function, explore its paths symbolically, and generate tests for them.
23 tools
Listed in project docs. Your client may show a different list.
code_policy_checkcrawl_projectcross_file_security_scanextract_codegenerate_unit_testsget_call_graphget_capabilitiesget_cross_file_dependenciesget_file_contextget_graph_neighborhoodget_project_mapget_symbol_referencesrename_symbolscan_dependenciessecurity_scansimulate_refactorsymbolic_executetype_evaporation_scanunified_sink_detectupdate_symbolvalidate_pathsverify_policy_integrityBEFORE YOU INSTALL
What to know first
Tools you get
23 tools named in the project's documentation.
Requires
Python 3.10+
INSTALLATION
Connect your client
Server setup
Claude Code
claude mcp add codescalpel uvx codescalpel mcp