Narsil Mcp

general MCP Server

Rust MCP server for comprehensive code intelligence - 90 tools, 32 languages, security scanning, call graphs, and more

VerifiedReviewed
generalgeneral
4 views162 stars22 forksApache-2.0

Why This Matters

Discovered via github-seeds:mcp-hot and last synced 3mo ago.

VerifiedReviewed
Source
github-seeds:mcp-hot
Stars
162
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
123
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (123)

Serena

GitHub MCP

C

`.c`, `.h`

Editor

Preset

Rust

`.rs`

graph

+ RDF knowledge graph, SPARQL, CCG tools

Full

90

File-based

Call graphs, symbol references

Yes

No

frontend

+ Embedded visualization web UI

View

Description

Manual

CCG L0/L1/L2 automatic layers

wasm

Browser build (no file system, git)

TypeScript

~5 KB

neural-onnx

+ Local ONNX model inference

infer_types

Infer types for variables in a function without external type checkers

JavaScript

`.js`, `.jsx`, `.mjs`

neural

+ TF-IDF vector search, API embeddings

Guide

Description

32

4

No

## Key Features - **Code Intelligence** - Symbol extraction, semantic search, call graph analysis - **Neural Semantic Search** - Find similar code using embeddings (Voyage AI, OpenAI) - **Security Analysis** - Taint analysis, vulnerability scanning, OWASP/CWE coverage - **Supply Chain Security** - SBOM generation, dependency auditing, license compliance - **Advanced Analysis** - Control flow graphs, data flow analysis, dead code detection ### Why Choose narsil-mcp? - **Written in Rust** - Blazingly fast, memory-safe, single binary (~30MB) - **Tree-sitter powered** - Accurate, incremental parsing for 32 languages - **Zero config** - Point at repos and go - **MCP compliant** - Works with Claude, Cursor, VS Code Copilot, Zed, and any MCP client - **Privacy-first** - Fully local, no data leaves your machine - **Parallel indexing** - Uses all cores via Rayon - **Smart excerpts** - Expands to complete syntactic scopes - **Security-first** - Built-in vulnerability detection and taint analysis - **Neural embeddings** - Optional semantic search with Voyage AI or OpenAI - **WASM support** - Run in browser with WebAssembly build - **Real-time streaming** - Results as indexing progresses for large repos ## Supported Languages

Java

`.java`

Extensions

Symbols Extracted

Balanced

51

Feature

Without narsil-mcp

get_excerpt

Extract code around specific lines with context

find_references

Find all references to a symbol

hybrid_search

Combined BM25 + TF-IDF with rank fusion

find_call_path

Find path between two functions

get_reaching_definitions

Which assignments reach each point

get_import_graph

Build and analyze import graph

check_dependencies

Check for known vulnerabilities (OSV database)

get_contributors

Repository/file contributors

go_to_definition

Find definition location

Minimal

26

Component

Description

get_file

Get file contents with optional line range

get_symbol_definition

Get symbol source with surrounding context

semantic_search

BM25-ranked semantic search

get_embedding_stats

Embedding index statistics

get_callees

Find functions called by a function

get_typed_taint_flow

Enhanced taint analysis combining data flow with type inference

get_project_structure

Get directory tree with file icons and sizes

find_symbols

Find structs, classes, functions by type/pattern

search_code

Keyword search with relevance ranking

get_chunk_stats

Statistics about code chunks

get_callers

Find functions that call a function

get_taint_sources

List taint sources (user input, files, network)

get_recent_changes

Recent commits in repository

get_hover_info

Type info and documentation

list_repos

List all indexed repositories with metadata

get_chunks

Get AST-aware chunks for a file

get_call_graph

Get call graph for repository/function

find_dead_code

Find unreachable code blocks

reindex

Trigger re-indexing of repositories

get_dependencies

Analyze imports and dependents

search_chunks

Search over AST-aware code chunks

neural_search

Semantic search using neural embeddings (finds similar code even with different names)

get_complexity

Get cyclomatic/cognitive complexity

find_uninitialized

Variables used before initialization

find_circular_imports

Detect circular dependencies

scan_security

Scan with security rules (OWASP, CWE, crypto, secrets)

check_licenses

Analyze licenses for compliance issues

discover_repos

Auto-discover repositories in a directory

workspace_symbol_search

Fuzzy search symbols across workspace

find_similar_code

Find code similar to a snippet (TF-IDF)

find_semantic_clones

Find Type-3/4 semantic clones of a function

get_function_hotspots

Find highly connected functions

find_dead_stores

Assignments that are never read

get_incremental_status

Merkle tree and change statistics

check_owasp_top10

Scan for OWASP Top 10 2021 vulnerabilities

validate_repo

Check if path is a valid repository

find_symbol_usages

Cross-file symbol usage with imports

find_similar_to_symbol

Find code similar to a symbol

get_neural_stats

Neural embedding index statistics

check_cwe_top25

Scan for CWE Top 25 weaknesses

get_branch_info

Current branch and status

get_index_status

Show index stats and enabled features

get_export_map

Get exported symbols from a file/module

get_control_flow

Get CFG showing basic blocks and branches

find_injection_vulnerabilities

Find SQL injection, XSS, command injection, path traversal

explain_vulnerability

Get detailed vulnerability explanation

get_data_flow

Variable definitions and uses

get_security_summary

Comprehensive security risk assessment

generate_sbom

Generate SBOM (CycloneDX/SPDX/JSON)

get_hotspots

Files with high churn and complexity

get_type_info

Precise type information

export_ccg_index

Layer 2 symbol index (~100-500KB N-Quads gzipped)

Go

...

rust-analyzer

2,847

check_type_errors

Find potential type errors without running mypy/tsc

trace_taint

Trace tainted data flow from a source

suggest_fix

Get remediation suggestions for findings

get_file_history

Commit history for file

export_ccg_manifest

Export Layer 0 manifest to file

import_ccg

Import CCG layer from URL or file

Time

Memory

find_upgrade_path

Find safe upgrade paths for vulnerable deps

get_symbol_history

Commits that changed a symbol

add_remote_repo

Clone and index GitHub repository

run_sparql_template

Execute predefined SPARQL template with parameters

query_ccg

Query CCG using SPARQL

get_blame

Git blame for file

get_modified_files

Working tree changes

get_remote_file

Fetch file via GitHub API

get_ccg_manifest

Layer 0 manifest (~1-2KB JSON-LD) - repo identity, counts

get_ccg_access_info

Get CCG access tier information

Repository

Files

get_commit_diff

Diff for specific commit

Tool

Description

list_sparql_templates

List available SPARQL query templates

export_ccg

Export all CCG layers as a bundle

Python

~4 KB

list_remote_files

List files via GitHub API

get_ccg_acl

Generate WebACL access control for CCG layers

Operation

Corpus Size

get_metrics

Performance stats and timing

export_ccg_architecture

Layer 1 architecture (~10-50KB JSON-LD) - modules, API

import_ccg_from_registry

Import CCG from codecontextgraph.com registry

53

1,733

sparql_query

Execute SPARQL query against RDF knowledge graph

export_ccg_full

Layer 3 full detail (~1-20MB N-Quads gzipped)

Language

Input Size

45s

2.1 GB