Narsil MCP Server

A Rust-powered MCP (Model Context Protocol) server providing AI assistants with deep code understanding through 90 specialized tools.

Remote serverstreamable-httpPython

What is the Narsil MCP Server?

A Rust-powered MCP (Model Context Protocol) server providing AI assistants with deep code understanding through 90 specialized tools.

Recorded tools

  • graph — + RDF knowledge graph, SPARQL, CCG tools
  • frontend — + Embedded visualization web UI
  • neural — + TF-IDF vector search, API embeddings
  • neural-onnx — + Local ONNX model inference
  • wasm — Browser build (no file system, git)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_reposList all indexed repositories with metadata
get_project_structureGet directory tree with file icons and sizes
get_fileGet file contents with optional line range
get_excerptExtract code around specific lines with context
reindexTrigger re-indexing of repositories
discover_reposAuto-discover repositories in a directory
validate_repoCheck if path is a valid repository
get_index_statusShow index stats and enabled features
find_symbolsFind structs, classes, functions by type/pattern
get_symbol_definitionGet symbol source with surrounding context
find_referencesFind all references to a symbol
get_dependenciesAnalyze imports and dependents
workspace_symbol_searchFuzzy search symbols across workspace
find_symbol_usagesCross-file symbol usage with imports
get_export_mapGet exported symbols from a file/module
search_codeKeyword search with relevance ranking
semantic_searchBM25-ranked semantic search
hybrid_searchCombined BM25 + TF-IDF with rank fusion
search_chunksSearch over AST-aware code chunks
find_similar_codeFind code similar to a snippet (TF-IDF)
find_similar_to_symbolFind code similar to a symbol
get_chunksGet AST-aware chunks for a file
get_chunk_statsStatistics about code chunks
get_embedding_statsEmbedding index statistics
neural_searchSemantic search using neural embeddings (finds similar code even with different names)
find_semantic_clonesFind Type-3/4 semantic clones of a function
get_neural_statsNeural embedding index statistics
get_call_graphGet call graph for repository/function
get_callersFind functions that call a function
get_calleesFind functions called by a function
find_call_pathFind path between two functions
get_complexityGet cyclomatic/cognitive complexity
get_function_hotspotsFind highly connected functions
get_control_flowGet CFG showing basic blocks and branches
find_dead_codeFind unreachable code blocks
get_data_flowVariable definitions and uses
get_reaching_definitionsWhich assignments reach each point
find_uninitializedVariables used before initialization
find_dead_storesAssignments that are never read
infer_typesInfer types for variables in a function without external type checkers
check_type_errorsFind potential type errors without running mypy/tsc
get_typed_taint_flowEnhanced taint analysis combining data flow with type inference
get_import_graphBuild and analyze import graph
find_circular_importsDetect circular dependencies
get_incremental_statusMerkle tree and change statistics
find_injection_vulnerabilitiesFind SQL injection, XSS, command injection, path traversal
trace_taintTrace tainted data flow from a source
get_taint_sourcesList taint sources (user input, files, network)
get_security_summaryComprehensive security risk assessment
scan_securityScan with security rules (OWASP, CWE, crypto, secrets)
check_owasp_top10Scan for OWASP Top 10 2021 vulnerabilities
check_cwe_top25Scan for CWE Top 25 weaknesses
explain_vulnerabilityGet detailed vulnerability explanation
suggest_fixGet remediation suggestions for findings
generate_sbomGenerate SBOM (CycloneDX/SPDX/JSON)
check_dependenciesCheck for known vulnerabilities (OSV database)
check_licensesAnalyze licenses for compliance issues
find_upgrade_pathFind safe upgrade paths for vulnerable deps
get_blameGit blame for file
get_file_historyCommit history for file
get_recent_changesRecent commits in repository
get_hotspotsFiles with high churn and complexity
get_contributorsRepository/file contributors
get_commit_diffDiff for specific commit
get_symbol_historyCommits that changed a symbol
get_branch_infoCurrent branch and status
get_modified_filesWorking tree changes
get_hover_infoType info and documentation
get_type_infoPrecise type information
go_to_definitionFind definition location
add_remote_repoClone and index GitHub repository
list_remote_filesList files via GitHub API
get_remote_fileFetch file via GitHub API
get_metricsPerformance stats and timing
sparql_queryExecute SPARQL query against RDF knowledge graph
list_sparql_templatesList available SPARQL query templates
run_sparql_templateExecute predefined SPARQL template with parameters
get_ccg_manifestLayer 0 manifest (~1-2KB JSON-LD) - repo identity, counts
export_ccg_manifestExport Layer 0 manifest to file
export_ccg_architectureLayer 1 architecture (~10-50KB JSON-LD) - modules, API
export_ccg_indexLayer 2 symbol index (~100-500KB N-Quads gzipped)
export_ccg_fullLayer 3 full detail (~1-20MB N-Quads gzipped)
export_ccgExport all CCG layers as a bundle
query_ccgQuery CCG using SPARQL
get_ccg_aclGenerate WebACL access control for CCG layers
get_ccg_access_infoGet CCG access tier information
import_ccgImport CCG layer from URL or file
import_ccg_from_registryImport CCG from codecontextgraph.com registry

How to install the Narsil MCP Server

{
  "mcpServers": {
    "narsil-mcp": {
      "command": "narsil-mcp",
      "args": [
        "--repos",
        ".",
        "--git",
        "--call-graph"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use Narsil MCP to EMBEDDING API KEY.”
  • “Use Narsil MCP to VOYAGE API KEY.”
  • “Use Narsil MCP to OPENAI API KEY.”

Frequently asked questions

A Rust-powered MCP (Model Context Protocol) server providing AI assistants with deep code understanding through 90 specialized tools. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.