list_reposLABSCO SUMMARY
Security analysis in a code-intelligence server, not bolted on beside one.
The thing most code servers stop short of is asking whether a path is dangerous. Here taint tracing, an OWASP and CWE rules engine, SBOM generation and OSV dependency checks sit next to the symbol and call-graph tools, so "who calls this" and "can user input reach it" are questions in the same session. Watch which flags you started it with, though: git, call graph, LSP and neural tools are each off by default, and the graph tools additionally need a source build.
What it is
A single ~30MB Rust binary that indexes your repositories with tree-sitter and exposes deep code understanding over MCP: symbol extraction and navigation, several kinds of search, control and data flow analysis, type inference, security scanning and supply-chain auditing. Nothing leaves your machine, and indexing runs in parallel across all cores.
What you get
- Symbol navigation across 32 languages — find definitions and references, analyse imports and dependents, fuzzy-search the workspace, read a module's export map —
find_symbols,get_symbol_definition,find_references,workspace_symbol_search,get_export_map - Four search strategies rather than one: keyword with relevance ranking, BM25, hybrid rank fusion, and similarity to a snippet or a symbol —
search_code,semantic_search,hybrid_search,find_similar_code,find_similar_to_symbol - Call graph analysis behind
--call-graph: who calls a function, what it calls, the path between two functions, cyclomatic and cognitive complexity, and the most connected hotspots —get_call_graph,get_callers,get_callees,find_call_path,get_complexity,get_function_hotspots - Control and data flow: basic blocks and branches, unreachable code, reaching definitions, variables used before initialisation, and assignments never read —
get_control_flow,find_dead_code,get_reaching_definitions,find_uninitialized,find_dead_stores - Type inference for Python, JavaScript and TypeScript without running mypy or tsc, including taint flow enhanced by the inferred types —
infer_types,check_type_errors,get_typed_taint_flow - Security analysis in two layers — taint tracking that traces user input to a sink, and a rules engine covering OWASP Top 10 2021, CWE Top 25, crypto and secrets —
find_injection_vulnerabilities,trace_taint,get_taint_sources,scan_security,check_owasp_top10,check_cwe_top25,explain_vulnerability,suggest_fix - Supply chain work: SBOM in CycloneDX, SPDX or JSON, known-vulnerability checks against the OSV database, licence compliance analysis, and safe upgrade paths —
generate_sbom,check_dependencies,check_licenses,find_upgrade_path - Git history behind
--git: blame, file history, recent changes, churn-and-complexity hotspots, contributors, and the commits that changed a specific symbol —get_blame,get_hotspots,get_symbol_history,get_modified_files - Neural semantic search behind
--neural, which finds similar code even when the names differ, and detects Type-3/4 semantic clones —neural_search,find_semantic_clones - Circular import detection and an incremental Merkle-tree change status —
get_import_graph,find_circular_imports,get_incremental_status
Requirements
A binary, from Homebrew, Scoop, cargo install narsil-mcp, npm install -g narsil-mcp, Nix, or the one-line install script. Building from source needs Rust 1.70 or later, and on Windows the Visual Studio Build Tools with C++ desktop development. Point it at repositories with --repos, repeated per repository. Several tool families are behind CLI flags — --git, --call-graph, --lsp, --remote, --neural, --persist, --watch, --streaming — and one is behind a build feature as well: --graph only works if the binary was built with --features graph, which the default binary is not, so SPARQL and Code Context Graph tools need a source build. Neural search with the api backend uses Voyage AI or OpenAI embeddings; the ONNX backend runs the model locally. Dual-licensed MIT or Apache-2.0.
Setup effort
One command — npm install -g narsil-mcp
USE CASES
Judging the blast radius of a change
Find the symbol, list its callers and callees, and trace the path between it and the entry point before you touch it.
Checking whether user input can reach a dangerous sink
List the taint sources, trace the flow from one, and read the explanation and suggested fix for anything the injection scan reports.
Producing a dependency and licence picture for review
Generate an SBOM, check dependencies against OSV, and analyse licences for anything that will not pass compliance.
Finding the code nobody should be maintaining
Look for unreachable blocks, dead stores and uninitialised uses, and cross-check against churn-and-complexity hotspots from git history.
Finding a duplicate implementation with a different name
Run neural search or semantic clone detection, which match on behaviour rather than identifiers.
88 tools
Listed in project docs. Your client may show a different list.
get_project_structureget_fileget_excerptreindexdiscover_reposvalidate_repoget_index_statusfind_symbolsget_symbol_definitionfind_referencesget_dependenciesworkspace_symbol_searchfind_symbol_usagesget_export_mapsearch_codesemantic_searchhybrid_searchsearch_chunksfind_similar_codefind_similar_to_symbolget_chunksget_chunk_statsget_embedding_statsneural_searchfind_semantic_clonesget_neural_statsget_call_graphget_callersget_calleesfind_call_pathget_complexityget_function_hotspotsget_control_flowfind_dead_codeget_data_flowget_reaching_definitionsfind_uninitializedfind_dead_storesinfer_typescheck_type_errorsget_typed_taint_flowget_import_graphfind_circular_importsget_incremental_statusfind_injection_vulnerabilitiestrace_taintget_taint_sourcesget_security_summaryscan_securitycheck_owasp_top10check_cwe_top25explain_vulnerabilitysuggest_fixgenerate_sbomcheck_dependenciescheck_licensesfind_upgrade_pathget_blameget_file_historyget_recent_changesget_hotspotsget_contributorsget_commit_diffget_symbol_historyget_branch_infoget_modified_filesget_hover_infoget_type_infogo_to_definitionadd_remote_repolist_remote_filesget_remote_fileget_metricssparql_querylist_sparql_templatesrun_sparql_templateget_ccg_manifestexport_ccg_manifestexport_ccg_architectureexport_ccg_indexexport_ccg_fullexport_ccgquery_ccgget_ccg_aclget_ccg_access_infoimport_ccgimport_ccg_from_registryBEFORE YOU INSTALL
What to know first
Tools you get
88 tools named in the project's documentation.
Requires
narsil-mcp on PATH
INSTALLATION
Connect your client
Server setup
npm install -g narsil-mcpMCP Clients
Claude Code, Cursor
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": [
"--repos",
".",
"--git",
"--call-graph"
]
}
}
}VS Code
{
"servers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": [
"--repos",
".",
"--git",
"--call-graph"
]
}
}
}Claude Desktop
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": [
"--repos",
"<YOUR_PATH_TO_PROJECTS>",
"--git"
]
}
}
}Zed
{
"context_servers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": [
"--repos",
".",
"--git"
]
}
}
}Claude Code — plugin
/plugin marketplace add postrv/narsil-mcp
/plugin install narsil@narsil-mcp