Narsil-MCP - Comprehensive Code Intelligence MCP Server
Research Date: January 26, 2026
Source URL: https://narsilmcp.com/
GitHub Repository: https://github.com/postrv/narsil-mcp
npm Package: https://www.npmjs.com/package/narsil-mcp
Crates.io: https://crates.io/crates/narsil-mcp
Version at Research: v1.3.1
License: Apache-2.0 / MIT (dual-licensed)
Overview
Narsil-MCP is a Rust-powered MCP (Model Context Protocol) server providing AI assistants with deep code intelligence through 90 specialized tools. It supports 32 programming languages with features including symbol extraction, semantic search, call graph analysis, security scanning (OWASP/CWE), taint analysis, SBOM generation, and neural embeddings.
Core Value Proposition: Privacy-first, local-only code intelligence that transforms AI assistants into powerful code analysis tools without sending data to external services.
Problem Addressed
| Problem |
How Narsil-MCP Solves It |
| AI assistants lack deep code understanding beyond file content |
90 specialized tools provide symbol extraction, call graphs, control flow, data flow analysis |
| Security analysis requires external tools and manual integration |
Built-in taint analysis, vulnerability scanning (OWASP Top 10, CWE Top 25), secret detection |
| Existing MCP servers support limited languages |
Tree-sitter powered parsing for 32 languages with accurate, incremental parsing |
| Cloud-based code analysis raises privacy concerns |
Fully local, no data leaves the machine, single binary deployment |
| Large codebase context exceeds AI token limits |
Smart excerpts, AST-aware chunking, configurable presets (26-90 tools) for token optimization |
| Context window overhead from tool definitions |
Editor-specific presets: Minimal (26 tools, ~4,686 tokens), Balanced (51 tools), Full (90 tools) |
Key Statistics (as of January 26, 2026)
| Metric |
Value |
| GitHub Stars |
82 |
| Forks |
12 |
| Contributors |
3 |
| Total Tools |
90 |
| Languages Supported |
32 |
| Security Rules |
111 |
| Repository Created |
December 24, 2025 |
| Latest Release |
v1.3.1 (January 23, 2026) |
| Total Commits |
94 |
Key Features
Code Intelligence (Core)
- Symbol Extraction: Functions, structs, classes, enums, traits, interfaces across 32 languages
- Semantic Search: BM25 ranking with Tantivy full-text search engine
- Hybrid Search: Combined BM25 + TF-IDF with reciprocal rank fusion
- Call Graph Analysis: Function relationships, callers/callees, call paths, hotspot detection
- Control Flow Graphs: Basic blocks and branch analysis
- Data Flow Analysis: Variable definitions, uses, reaching definitions
- Dead Code Detection: Unreachable code blocks and dead stores
- Type Inference: Built-in inference for Python, JavaScript, TypeScript without external tools
Neural Semantic Search (Optional --neural flag)
- Embedding-Based Search: Find similar code using Voyage AI or OpenAI embeddings
- Semantic Clone Detection: Find Type-3/4 semantic clones of functions
- Backends: API mode (Voyage AI, OpenAI, custom endpoints) or local ONNX models
- Model Support: voyage-code-2, OpenAI embeddings, custom models
Security Analysis
- Taint Analysis: Source-to-sink tracking for SQL injection, XSS, command injection, path traversal
- OWASP Top 10: Comprehensive vulnerability scanning
- CWE Top 25: Most dangerous software weaknesses detection
- Secret Detection: API keys, passwords, tokens, private keys
- 111 Security Rules: YAML-based rules for crypto, secrets, IaC (Terraform, CloudFormation, Kubernetes)
- Language-Specific Rules: Go, Java, C#, Kotlin, Bash, Ruby, PHP, TypeScript
Supply Chain Security
- SBOM Generation: CycloneDX, SPDX, JSON formats
- Dependency Vulnerability Checking: OSV database integration
- License Compliance: Audit licenses for legal compliance
- Upgrade Path Finder: Safe upgrade paths for vulnerable dependencies
Knowledge Graph (v1.3.0+ with --graph flag)
- SPARQL Queries: Execute SPARQL SELECT/ASK queries against code RDF graph (Oxigraph)
- Code Context Graph (CCG): 12 tools for standardized AI-consumable codebase representations
- L0 Manifest: ~1-2KB JSON-LD repository identity
- L1 Architecture: ~10-50KB JSON-LD modules and API
- L2 Symbol Index: ~100-500KB N-Quads gzipped
- L3 Full Detail: ~1-20MB N-Quads gzipped
- Triple-Heart Model: Tiered access control (public/authenticated/private)
Git Integration (with --git flag)
- Git blame, file history, commit diffs
- Hotspot detection (high churn + complexity)
- Contributors analysis
- Symbol history tracking
Additional Features
- LSP Integration: Hover info, go-to-definition, precise types
- Remote Repository Support: GitHub repository cloning and API access
- Incremental Indexing: Merkle tree-based change detection
- Streaming Responses: Real-time results for large repos
- WASM Build: Browser execution for educational platforms
- Visualization Frontend: Interactive call graphs with HTTP server
Supported Languages (32)
| Category |
Languages |
| Systems |
Rust, C, C++, Go, Zig |
| JVM |
Java, Kotlin, Scala, Groovy |
| .NET |
C# |
| Web |
JavaScript, TypeScript, PHP |
| Scripting |
Python, Ruby, Perl, Lua, Bash, PowerShell |
| Functional |
Haskell, Elixir, Erlang, Elm, Clojure |
| Scientific |
Julia, R, Fortran |
| Mobile |
Swift, Dart, Kotlin |
| Hardware |
Verilog, SystemVerilog |
| Config |
Nix |
Technical Architecture
+-----------------------------------------------------------------+
| MCP Server |
| +-----------------------------------------------------------+ |
| | JSON-RPC over stdio | |
| +-----------------------------------------------------------+ |
| | |
| +---------------------------v-------------------------------+ |
| | Code Intel Engine | |
| | +------------+ +------------+ +------------------------+ | |
| | | Symbol | | File | | Search Engine | | |
| | | Index | | Cache | | (Tantivy + TF-IDF) | | |
| | | (DashMap) | | (DashMap) | +------------------------+ | |
| | +------------+ +------------+ | |
| | +------------+ +------------+ +------------------------+ | |
| | | Call Graph | | Taint | | Security Rules | | |
| | | Analysis | | Tracker | | Engine | | |
| | +------------+ +------------+ +------------------------+ | |
| +-----------------------------------------------------------+ |
| | |
| +---------------------------v-------------------------------+ |
| | Tree-sitter Parser | |
| | +------+ +------+ +------+ +------+ +------+ | |
| | | Rust | |Python| | JS | | TS | | Go | ... (32) | |
| | +------+ +------+ +------+ +------+ +------+ | |
| +-----------------------------------------------------------+ |
| | |
| +---------------------------v-------------------------------+ |
| | Repository Walker | |
| | (ignore crate - respects .gitignore) | |
| +-----------------------------------------------------------+ |
+-----------------------------------------------------------------+
Key Implementation Details:
- Rust-native: Single binary (~30MB), memory-safe, blazingly fast
- Tree-sitter Powered: Incremental parsing with 2 GiB/s throughput
- Parallel Processing: Rayon-based parallel indexing using all cores
- Lock-free Data Structures: DashMap for concurrent symbol/file access
- Tantivy Search: High-performance full-text search with BM25 ranking
Performance Benchmarks
Parsing Throughput (Apple M1)
| Language |
Input Size |
Time |
Throughput |
| Rust (large) |
278 KB |
131 us |
1.98 GiB/s |
| Rust (medium) |
27 KB |
13.5 us |
1.89 GiB/s |
| Python |
~4 KB |
16.7 us |
- |
| TypeScript |
~5 KB |
13.9 us |
- |
Search Latency
| Operation |
Corpus Size |
Time |
| Symbol exact match |
1,000 symbols |
483 ns |
| Symbol prefix match |
1,000 symbols |
2.7 us |
| BM25 full-text |
1,000 docs |
80 us |
| Hybrid search |
1,000 docs |
151 us |
End-to-End Indexing
| Repository |
Files |
Symbols |
Time |
Memory |
| narsil-mcp |
53 |
1,733 |
220 ms |
~50 MB |
| rust-analyzer |
2,847 |
~50K |
2.1s |
89 MB |
| linux kernel |
78,000+ |
~500K |
45s |
2.1 GB |
Installation
Package Managers
# Homebrew (macOS/Linux)
brew tap postrv/narsil && brew install narsil-mcp
# npm (All platforms)
npm install -g narsil-mcp
# Cargo (All platforms)
cargo install narsil-mcp
# Scoop (Windows)
scoop bucket add narsil https://github.com/postrv/scoop-narsil
scoop install narsil-mcp
# Nix
nix run github:postrv/narsil-mcp -- --repos ./my-project
One-Line Install Scripts
# macOS/Linux
curl -fsSL https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.ps1 | iex
MCP Configuration Examples
Claude Code (.mcp.json in project root)
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": ["--repos", ".", "--git", "--call-graph"]
}
}
}
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": ["--repos", ".", "--git", "--call-graph"]
}
}
}
VS Code Copilot (.vscode/mcp.json)
{
"servers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": ["--repos", ".", "--git", "--call-graph"]
}
}
}
Tool Categories (90 Total)
| Category |
Count |
Examples |
| Repository & File |
8 |
list_repos, get_project_structure, get_file, reindex |
| Symbol Search |
7 |
find_symbols, get_symbol_definition, find_references |
| Code Search |
6 |
search_code, semantic_search, hybrid_search |
| AST Chunking |
3 |
get_chunks, get_chunk_stats, get_embedding_stats |
| Neural Search |
3 |
neural_search, find_semantic_clones, get_neural_stats |
| Call Graph |
6 |
get_call_graph, get_callers, get_callees, find_call_path |
| Control Flow |
2 |
get_control_flow, find_dead_code |
| Data Flow |
4 |
get_data_flow, get_reaching_definitions, find_dead_stores |
| Type Inference |
3 |
infer_types, check_type_errors, get_typed_taint_flow |
| Import Graph |
3 |
get_import_graph, find_circular_imports |
| Taint Tracking |
4 |
find_injection_vulnerabilities, trace_taint, get_taint_sources |
| Security Rules |
5 |
scan_security, check_owasp_top10, check_cwe_top25 |
| Supply Chain |
4 |
generate_sbom, check_dependencies, check_licenses |
| Git Integration |
12 |
get_blame, get_file_history, get_hotspots, get_contributors |
| LSP |
3 |
get_hover_info, get_type_info, go_to_definition |
| Remote Repos |
3 |
add_remote_repo, list_remote_files, get_remote_file |
| SPARQL/CCG |
15 |
sparqlquery, get_ccg_manifest, export_ccg* |
Configuration System (v1.1.0+)
Presets for Token Optimization
| Preset |
Tools |
Tokens |
Use Case |
| Minimal |
26 |
~4,686 |
Zed, Cursor (61% reduction) |
| Balanced |
51 |
~8,948 |
VS Code, IntelliJ (25% reduction) |
| Full |
90 |
~12,001 |
Claude Desktop, comprehensive analysis |
| Security-Focused |
~30 |
- |
Security audits |
Automatic Editor Detection
Narsil-MCP automatically detects the editor from the MCP initialize request and applies optimal presets.
Configuration Priority
CLI flags > Environment vars > Project config (.narsil.yaml) > User config (~/.config/narsil-mcp/config.yaml) > Defaults
Relevance to Claude Code Development
Direct Applications
- Enhanced Code Intelligence: Drop-in MCP server provides 90 tools for deep codebase understanding
- Security Auditing: Built-in vulnerability scanning without external tools
- Supply Chain Analysis: SBOM generation and license compliance for production deployments
- Token Optimization: Configurable presets reduce context window usage by up to 61%
Patterns Worth Adopting
- Preset System: Tool filtering based on editor/use-case for context window efficiency
- Multi-Source Configuration: CLI > Env > Project > User config priority
- AST-Aware Chunking: Tree-sitter based chunking preserves syntactic boundaries
- Hybrid Search: Combining BM25 + TF-IDF with reciprocal rank fusion
- Incremental Indexing: Merkle tree change detection for large repos
Integration Opportunities
- Claude Code Plugin Available:
/plugin install github:postrv/narsil-mcp/narsil-plugin
- Complements Existing Tools: Adds security analysis, call graphs, supply chain features
- Code Context Graph: CCG export format could standardize codebase representations
- Ralph Automation Integration: Works with Ralph for autonomous code development workflows
Comparison with Alternatives
| Feature |
narsil-mcp |
XRAY |
Serena |
GitHub MCP |
| Languages |
32 |
4 |
30+ (LSP) |
N/A |
| Neural Search |
Yes |
No |
No |
No |
| Taint Analysis |
Yes |
No |
No |
No |
| SBOM/Licenses |
Yes |
No |
No |
Partial |
| Offline/Local |
Yes |
Yes |
Yes |
No |
| WASM/Browser |
Yes |
No |
No |
No |
| Call Graphs |
Yes |
Partial |
No |
No |
| Type Inference |
Yes |
No |
No |
No |
References
- Official Website: https://narsilmcp.com/ (accessed 2026-01-26)
- GitHub Repository: https://github.com/postrv/narsil-mcp (accessed 2026-01-26)
- CHANGELOG: https://github.com/postrv/narsil-mcp/blob/main/CHANGELOG.md (accessed 2026-01-26)
- Configuration Guide: https://github.com/postrv/narsil-mcp/blob/main/docs/configuration.md
- Installation Guide: https://github.com/postrv/narsil-mcp/blob/main/docs/INSTALL.md
- Neural Search Documentation: https://github.com/postrv/narsil-mcp/blob/main/docs/neural-search.md
- Claude Code Integration Playbook: https://github.com/postrv/narsil-mcp/blob/main/docs/playbooks/integrations/claude-code.md
- npm Package: https://www.npmjs.com/package/narsil-mcp
- Crates.io: https://crates.io/crates/narsil-mcp
Freshness Tracking
| Field |
Value |
| Last Verified |
2026-01-26 |
| Version at Verification |
v1.3.1 |
| GitHub Stars at Verification |
82 |
| Next Review Recommended |
2026-04-26 (3 months) |
Change Detection Indicators:
- Monitor GitHub releases for version changes (rapid development: 94 commits in ~1 month)
- Check CHANGELOG.md for new features and breaking changes
- Review tool count changes (currently 90 tools)
- Track star growth as adoption indicator (early project, high potential)
- Verify security rule count and language support expansion
1---2name: 734-narsil-mcp-47b97e583description: Narsil-MCP - Comprehensive Code Intelligence MCP Server4---5# Narsil-MCP - Comprehensive Code Intelligence MCP Server67**Research Date**: January 26, 20268**Source URL**: <https://narsilmcp.com/>9**GitHub Repository**: <https://github.com/postrv/narsil-mcp>10**npm Package**: <https://www.npmjs.com/package/narsil-mcp>11**Crates.io**: <https://crates.io/crates/narsil-mcp>12**Version at Research**: v1.3.113**License**: Apache-2.0 / MIT (dual-licensed)1415---1617## Overview1819Narsil-MCP is a Rust-powered MCP (Model Context Protocol) server providing AI assistants with deep code intelligence through 90 specialized tools. It supports 32 programming languages with features including symbol extraction, semantic search, call graph analysis, security scanning (OWASP/CWE), taint analysis, SBOM generation, and neural embeddings.2021**Core Value Proposition**: Privacy-first, local-only code intelligence that transforms AI assistants into powerful code analysis tools without sending data to external services.2223---2425## Problem Addressed2627| Problem | How Narsil-MCP Solves It |28| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |29| AI assistants lack deep code understanding beyond file content | 90 specialized tools provide symbol extraction, call graphs, control flow, data flow analysis |30| Security analysis requires external tools and manual integration | Built-in taint analysis, vulnerability scanning (OWASP Top 10, CWE Top 25), secret detection |31| Existing MCP servers support limited languages | Tree-sitter powered parsing for 32 languages with accurate, incremental parsing |32| Cloud-based code analysis raises privacy concerns | Fully local, no data leaves the machine, single binary deployment |33| Large codebase context exceeds AI token limits | Smart excerpts, AST-aware chunking, configurable presets (26-90 tools) for token optimization |34| Context window overhead from tool definitions | Editor-specific presets: Minimal (26 tools, ~4,686 tokens), Balanced (51 tools), Full (90 tools) |3536---3738## Key Statistics (as of January 26, 2026)3940| Metric | Value |41| ------------------- | ------------------------- |42| GitHub Stars | 82 |43| Forks | 12 |44| Contributors | 3 |45| Total Tools | 90 |46| Languages Supported | 32 |47| Security Rules | 111 |48| Repository Created | December 24, 2025 |49| Latest Release | v1.3.1 (January 23, 2026) |50| Total Commits | 94 |5152---5354## Key Features5556### Code Intelligence (Core)5758- **Symbol Extraction**: Functions, structs, classes, enums, traits, interfaces across 32 languages59- **Semantic Search**: BM25 ranking with Tantivy full-text search engine60- **Hybrid Search**: Combined BM25 + TF-IDF with reciprocal rank fusion61- **Call Graph Analysis**: Function relationships, callers/callees, call paths, hotspot detection62- **Control Flow Graphs**: Basic blocks and branch analysis63- **Data Flow Analysis**: Variable definitions, uses, reaching definitions64- **Dead Code Detection**: Unreachable code blocks and dead stores65- **Type Inference**: Built-in inference for Python, JavaScript, TypeScript without external tools6667### Neural Semantic Search (Optional `--neural` flag)6869- **Embedding-Based Search**: Find similar code using Voyage AI or OpenAI embeddings70- **Semantic Clone Detection**: Find Type-3/4 semantic clones of functions71- **Backends**: API mode (Voyage AI, OpenAI, custom endpoints) or local ONNX models72- **Model Support**: voyage-code-2, OpenAI embeddings, custom models7374### Security Analysis7576- **Taint Analysis**: Source-to-sink tracking for SQL injection, XSS, command injection, path traversal77- **OWASP Top 10**: Comprehensive vulnerability scanning78- **CWE Top 25**: Most dangerous software weaknesses detection79- **Secret Detection**: API keys, passwords, tokens, private keys80- **111 Security Rules**: YAML-based rules for crypto, secrets, IaC (Terraform, CloudFormation, Kubernetes)81- **Language-Specific Rules**: Go, Java, C#, Kotlin, Bash, Ruby, PHP, TypeScript8283### Supply Chain Security8485- **SBOM Generation**: CycloneDX, SPDX, JSON formats86- **Dependency Vulnerability Checking**: OSV database integration87- **License Compliance**: Audit licenses for legal compliance88- **Upgrade Path Finder**: Safe upgrade paths for vulnerable dependencies8990### Knowledge Graph (v1.3.0+ with `--graph` flag)9192- **SPARQL Queries**: Execute SPARQL SELECT/ASK queries against code RDF graph (Oxigraph)93- **Code Context Graph (CCG)**: 12 tools for standardized AI-consumable codebase representations94 - L0 Manifest: ~1-2KB JSON-LD repository identity95 - L1 Architecture: ~10-50KB JSON-LD modules and API96 - L2 Symbol Index: ~100-500KB N-Quads gzipped97 - L3 Full Detail: ~1-20MB N-Quads gzipped98- **Triple-Heart Model**: Tiered access control (public/authenticated/private)99100### Git Integration (with `--git` flag)101102- Git blame, file history, commit diffs103- Hotspot detection (high churn + complexity)104- Contributors analysis105- Symbol history tracking106107### Additional Features108109- **LSP Integration**: Hover info, go-to-definition, precise types110- **Remote Repository Support**: GitHub repository cloning and API access111- **Incremental Indexing**: Merkle tree-based change detection112- **Streaming Responses**: Real-time results for large repos113- **WASM Build**: Browser execution for educational platforms114- **Visualization Frontend**: Interactive call graphs with HTTP server115116---117118## Supported Languages (32)119120| Category | Languages |121| ---------- | ----------------------------------------- |122| Systems | Rust, C, C++, Go, Zig |123| JVM | Java, Kotlin, Scala, Groovy |124| .NET | C# |125| Web | JavaScript, TypeScript, PHP |126| Scripting | Python, Ruby, Perl, Lua, Bash, PowerShell |127| Functional | Haskell, Elixir, Erlang, Elm, Clojure |128| Scientific | Julia, R, Fortran |129| Mobile | Swift, Dart, Kotlin |130| Hardware | Verilog, SystemVerilog |131| Config | Nix |132133---134135## Technical Architecture136137```text138+-----------------------------------------------------------------+139| MCP Server |140| +-----------------------------------------------------------+ |141| | JSON-RPC over stdio | |142| +-----------------------------------------------------------+ |143| | |144| +---------------------------v-------------------------------+ |145| | Code Intel Engine | |146| | +------------+ +------------+ +------------------------+ | |147| | | Symbol | | File | | Search Engine | | |148| | | Index | | Cache | | (Tantivy + TF-IDF) | | |149| | | (DashMap) | | (DashMap) | +------------------------+ | |150| | +------------+ +------------+ | |151| | +------------+ +------------+ +------------------------+ | |152| | | Call Graph | | Taint | | Security Rules | | |153| | | Analysis | | Tracker | | Engine | | |154| | +------------+ +------------+ +------------------------+ | |155| +-----------------------------------------------------------+ |156| | |157| +---------------------------v-------------------------------+ |158| | Tree-sitter Parser | |159| | +------+ +------+ +------+ +------+ +------+ | |160| | | Rust | |Python| | JS | | TS | | Go | ... (32) | |161| | +------+ +------+ +------+ +------+ +------+ | |162| +-----------------------------------------------------------+ |163| | |164| +---------------------------v-------------------------------+ |165| | Repository Walker | |166| | (ignore crate - respects .gitignore) | |167| +-----------------------------------------------------------+ |168+-----------------------------------------------------------------+169```170171**Key Implementation Details**:172173- **Rust-native**: Single binary (~30MB), memory-safe, blazingly fast174- **Tree-sitter Powered**: Incremental parsing with 2 GiB/s throughput175- **Parallel Processing**: Rayon-based parallel indexing using all cores176- **Lock-free Data Structures**: DashMap for concurrent symbol/file access177- **Tantivy Search**: High-performance full-text search with BM25 ranking178179---180181## Performance Benchmarks182183### Parsing Throughput (Apple M1)184185| Language | Input Size | Time | Throughput |186| ------------- | ---------- | ------- | ---------- |187| Rust (large) | 278 KB | 131 us | 1.98 GiB/s |188| Rust (medium) | 27 KB | 13.5 us | 1.89 GiB/s |189| Python | ~4 KB | 16.7 us | - |190| TypeScript | ~5 KB | 13.9 us | - |191192### Search Latency193194| Operation | Corpus Size | Time |195| ------------------- | ------------- | ------ |196| Symbol exact match | 1,000 symbols | 483 ns |197| Symbol prefix match | 1,000 symbols | 2.7 us |198| BM25 full-text | 1,000 docs | 80 us |199| Hybrid search | 1,000 docs | 151 us |200201### End-to-End Indexing202203| Repository | Files | Symbols | Time | Memory |204| ------------- | ------- | ------- | ------ | ------ |205| narsil-mcp | 53 | 1,733 | 220 ms | ~50 MB |206| rust-analyzer | 2,847 | ~50K | 2.1s | 89 MB |207| linux kernel | 78,000+ | ~500K | 45s | 2.1 GB |208209---210211## Installation212213### Package Managers214215```bash216# Homebrew (macOS/Linux)217brew tap postrv/narsil && brew install narsil-mcp218219# npm (All platforms)220npm install -g narsil-mcp221222# Cargo (All platforms)223cargo install narsil-mcp224225# Scoop (Windows)226scoop bucket add narsil https://github.com/postrv/scoop-narsil227scoop install narsil-mcp228229# Nix230nix run github:postrv/narsil-mcp -- --repos ./my-project231```232233### One-Line Install Scripts234235```bash236# macOS/Linux237curl -fsSL https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.sh | bash238239# Windows (PowerShell)240irm https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.ps1 | iex241```242243---244245## MCP Configuration Examples246247### Claude Code (`.mcp.json` in project root)248249```json250{251 "mcpServers": {252 "narsil-mcp": {253 "command": "narsil-mcp",254 "args": ["--repos", ".", "--git", "--call-graph"]255 }256 }257}258```259260### Cursor (`.cursor/mcp.json`)261262```json263{264 "mcpServers": {265 "narsil-mcp": {266 "command": "narsil-mcp",267 "args": ["--repos", ".", "--git", "--call-graph"]268 }269 }270}271```272273### VS Code Copilot (`.vscode/mcp.json`)274275```json276{277 "servers": {278 "narsil-mcp": {279 "command": "narsil-mcp",280 "args": ["--repos", ".", "--git", "--call-graph"]281 }282 }283}284```285286---287288## Tool Categories (90 Total)289290| Category | Count | Examples |291| ----------------- | ----- | -------------------------------------------------------------- |292| Repository & File | 8 | list_repos, get_project_structure, get_file, reindex |293| Symbol Search | 7 | find_symbols, get_symbol_definition, find_references |294| Code Search | 6 | search_code, semantic_search, hybrid_search |295| AST Chunking | 3 | get_chunks, get_chunk_stats, get_embedding_stats |296| Neural Search | 3 | neural_search, find_semantic_clones, get_neural_stats |297| Call Graph | 6 | get_call_graph, get_callers, get_callees, find_call_path |298| Control Flow | 2 | get_control_flow, find_dead_code |299| Data Flow | 4 | get_data_flow, get_reaching_definitions, find_dead_stores |300| Type Inference | 3 | infer_types, check_type_errors, get_typed_taint_flow |301| Import Graph | 3 | get_import_graph, find_circular_imports |302| Taint Tracking | 4 | find_injection_vulnerabilities, trace_taint, get_taint_sources |303| Security Rules | 5 | scan_security, check_owasp_top10, check_cwe_top25 |304| Supply Chain | 4 | generate_sbom, check_dependencies, check_licenses |305| Git Integration | 12 | get_blame, get_file_history, get_hotspots, get_contributors |306| LSP | 3 | get_hover_info, get_type_info, go_to_definition |307| Remote Repos | 3 | add_remote_repo, list_remote_files, get_remote_file |308| SPARQL/CCG | 15 | sparql*query, get_ccg_manifest, export_ccg*\* |309310---311312## Configuration System (v1.1.0+)313314### Presets for Token Optimization315316| Preset | Tools | Tokens | Use Case |317| ---------------- | ----- | ------- | -------------------------------------- |318| Minimal | 26 | ~4,686 | Zed, Cursor (61% reduction) |319| Balanced | 51 | ~8,948 | VS Code, IntelliJ (25% reduction) |320| Full | 90 | ~12,001 | Claude Desktop, comprehensive analysis |321| Security-Focused | ~30 | - | Security audits |322323### Automatic Editor Detection324325Narsil-MCP automatically detects the editor from the MCP `initialize` request and applies optimal presets.326327### Configuration Priority328329CLI flags > Environment vars > Project config (`.narsil.yaml`) > User config (`~/.config/narsil-mcp/config.yaml`) > Defaults330331---332333## Relevance to Claude Code Development334335### Direct Applications3363371. **Enhanced Code Intelligence**: Drop-in MCP server provides 90 tools for deep codebase understanding3382. **Security Auditing**: Built-in vulnerability scanning without external tools3393. **Supply Chain Analysis**: SBOM generation and license compliance for production deployments3404. **Token Optimization**: Configurable presets reduce context window usage by up to 61%341342### Patterns Worth Adopting3433441. **Preset System**: Tool filtering based on editor/use-case for context window efficiency3452. **Multi-Source Configuration**: CLI > Env > Project > User config priority3463. **AST-Aware Chunking**: Tree-sitter based chunking preserves syntactic boundaries3474. **Hybrid Search**: Combining BM25 + TF-IDF with reciprocal rank fusion3485. **Incremental Indexing**: Merkle tree change detection for large repos349350### Integration Opportunities3513521. **Claude Code Plugin Available**: `/plugin install github:postrv/narsil-mcp/narsil-plugin`3532. **Complements Existing Tools**: Adds security analysis, call graphs, supply chain features3543. **Code Context Graph**: CCG export format could standardize codebase representations3554. **Ralph Automation Integration**: Works with Ralph for autonomous code development workflows356357### Comparison with Alternatives358359| Feature | narsil-mcp | XRAY | Serena | GitHub MCP |360| -------------- | ---------- | ------- | --------- | ---------- |361| Languages | 32 | 4 | 30+ (LSP) | N/A |362| Neural Search | Yes | No | No | No |363| Taint Analysis | Yes | No | No | No |364| SBOM/Licenses | Yes | No | No | Partial |365| Offline/Local | Yes | Yes | Yes | No |366| WASM/Browser | Yes | No | No | No |367| Call Graphs | Yes | Partial | No | No |368| Type Inference | Yes | No | No | No |369370---371372## References3733741. **Official Website**: <https://narsilmcp.com/> (accessed 2026-01-26)3752. **GitHub Repository**: <https://github.com/postrv/narsil-mcp> (accessed 2026-01-26)3763. **CHANGELOG**: <https://github.com/postrv/narsil-mcp/blob/main/CHANGELOG.md> (accessed 2026-01-26)3774. **Configuration Guide**: <https://github.com/postrv/narsil-mcp/blob/main/docs/configuration.md>3785. **Installation Guide**: <https://github.com/postrv/narsil-mcp/blob/main/docs/INSTALL.md>3796. **Neural Search Documentation**: <https://github.com/postrv/narsil-mcp/blob/main/docs/neural-search.md>3807. **Claude Code Integration Playbook**: <https://github.com/postrv/narsil-mcp/blob/main/docs/playbooks/integrations/claude-code.md>3818. **npm Package**: <https://www.npmjs.com/package/narsil-mcp>3829. **Crates.io**: <https://crates.io/crates/narsil-mcp>383384---385386## Freshness Tracking387388| Field | Value |389| ---------------------------- | --------------------- |390| Last Verified | 2026-01-26 |391| Version at Verification | v1.3.1 |392| GitHub Stars at Verification | 82 |393| Next Review Recommended | 2026-04-26 (3 months) |394395**Change Detection Indicators**:396397- Monitor GitHub releases for version changes (rapid development: 94 commits in ~1 month)398- Check CHANGELOG.md for new features and breaking changes399- Review tool count changes (currently 90 tools)400- Track star growth as adoption indicator (early project, high potential)401- Verify security rule count and language support expansion