{"id":34753976,"url":"https://github.com/postrv/narsil-mcp","last_synced_at":"2026-05-11T23:05:20.895Z","repository":{"id":330368585,"uuid":"1122009554","full_name":"postrv/narsil-mcp","owner":"postrv","description":"Rust MCP server for comprehensive code intelligence - 75+ tools, 16 languages, security scanning, call graphs, and more","archived":false,"fork":false,"pushed_at":"2026-01-17T23:55:28.000Z","size":1302,"stargazers_count":76,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T00:10:12.208Z","etag":null,"topics":["code-intelligence","mcp","mcp-server","mcp-servers","privacy","security-tools"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/narsil-mcp","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postrv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-24T00:23:34.000Z","updated_at":"2026-01-17T23:55:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/postrv/narsil-mcp","commit_stats":null,"previous_names":["postrv/narsil-mcp"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/postrv/narsil-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrv%2Fnarsil-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrv%2Fnarsil-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrv%2Fnarsil-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrv%2Fnarsil-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postrv","download_url":"https://codeload.github.com/postrv/narsil-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrv%2Fnarsil-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28554368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T23:48:35.235Z","status":"ssl_error","status_checked_at":"2026-01-18T23:47:49.178Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-intelligence","mcp","mcp-server","mcp-servers","privacy","security-tools"],"created_at":"2025-12-25T05:28:50.276Z","updated_at":"2026-05-11T23:05:20.887Z","avatar_url":"https://github.com/postrv.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# narsil-mcp\n\n\u003e The blazing-fast, privacy-first MCP server for deep code intelligence\n\n[![License](https://img.shields.io/badge/License-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE-MIT)\n[![Rust](https://img.shields.io/badge/rust-1.70%2B-orange.svg)](https://www.rust-lang.org)\n[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](https://github.com/postrv/narsil-mcp)\n[![MCP](https://img.shields.io/badge/MCP-compatible-blue.svg)](https://modelcontextprotocol.io)\n\nA Rust-powered MCP (Model Context Protocol) server providing AI assistants with deep code understanding through 90 specialized tools.\n\n## Why narsil-mcp?\n\n| Feature | narsil-mcp | XRAY | Serena | GitHub MCP |\n|---------|------------|------|--------|------------|\n| **Languages** | 32 | 4 | 30+ (LSP) | N/A |\n| **Neural Search** | Yes | No | No | No |\n| **Taint Analysis** | Yes | No | No | No |\n| **SBOM/Licenses** | Yes | No | No | Partial |\n| **Offline/Local** | Yes | Yes | Yes | No |\n| **WASM/Browser** | Yes | No | No | No |\n| **Call Graphs** | Yes | Partial | No | No |\n| **Type Inference** | Yes | No | No | No |\n\n## Key Features\n\n- **Code Intelligence** - Symbol extraction, semantic search, call graph analysis\n- **Neural Semantic Search** - Find similar code using embeddings (Voyage AI, OpenAI)\n- **Security Analysis** - Taint analysis, vulnerability scanning, OWASP/CWE coverage\n- **Supply Chain Security** - SBOM generation, dependency auditing, license compliance\n- **Advanced Analysis** - Control flow graphs, data flow analysis, dead code detection\n\n### Why Choose narsil-mcp?\n\n- **Written in Rust** - Blazingly fast, memory-safe, single binary (~30MB)\n- **Tree-sitter powered** - Accurate, incremental parsing for 32 languages\n- **Zero config** - Point at repos and go\n- **MCP compliant** - Works with Claude, Cursor, VS Code Copilot, Zed, and any MCP client\n- **Privacy-first** - Fully local, no data leaves your machine\n- **Parallel indexing** - Uses all cores via Rayon\n- **Smart excerpts** - Expands to complete syntactic scopes\n- **Security-first** - Built-in vulnerability detection and taint analysis\n- **Neural embeddings** - Optional semantic search with Voyage AI or OpenAI\n- **WASM support** - Run in browser with WebAssembly build\n- **Real-time streaming** - Results as indexing progresses for large repos\n\n## Supported Languages\n\n| Language | Extensions | Symbols Extracted |\n|----------|------------|-------------------|\n| Rust | `.rs` | functions, structs, enums, traits, impls, mods |\n| Python | `.py`, `.pyi` | functions, classes |\n| JavaScript | `.js`, `.jsx`, `.mjs` | functions, classes, methods, variables |\n| TypeScript | `.ts`, `.tsx` | functions, classes, interfaces, types, enums |\n| Go | `.go` | functions, methods, types |\n| C | `.c`, `.h` | functions, structs, enums, typedefs |\n| C++ | `.cpp`, `.cc`, `.hpp` | functions, classes, structs, namespaces |\n| Java | `.java` | methods, classes, interfaces, enums |\n| C# | `.cs` | methods, classes, interfaces, structs, enums, delegates, namespaces |\n| **Bash** | `.sh`, `.bash`, `.zsh` | functions, variables |\n| **Ruby** | `.rb`, `.rake`, `.gemspec` | methods, classes, modules |\n| **Kotlin** | `.kt`, `.kts` | functions, classes, objects, interfaces |\n| **PHP** | `.php`, `.phtml` | functions, methods, classes, interfaces, traits |\n| **Swift** | `.swift` | classes, structs, enums, protocols, functions |\n| **Verilog/SystemVerilog** | `.v`, `.vh`, `.sv`, `.svh` | modules, tasks, functions, interfaces, classes |\n| **Scala** | `.scala`, `.sc` | classes, objects, traits, functions, vals |\n| **Lua** | `.lua` | functions, methods |\n| **Haskell** | `.hs`, `.lhs` | functions, data types, type classes |\n| **Elixir** | `.ex`, `.exs` | modules, functions |\n| **Clojure** | `.clj`, `.cljs`, `.cljc`, `.edn` | lists (basic AST) |\n| **Dart** | `.dart` | functions, classes, methods |\n| **Julia** | `.jl` | functions, modules, structs |\n| **R** | `.R`, `.r`, `.Rmd` | functions |\n| **Perl** | `.pl`, `.pm`, `.t` | functions, packages |\n| **Zig** | `.zig` | functions, variables |\n| **Erlang** | `.erl`, `.hrl` | functions, modules, records |\n| **Elm** | `.elm` | functions, types |\n| **Fortran** | `.f90`, `.f95`, `.f03`, `.f08`, `.f`, `.for`, `.fpp` | programs, subroutines, functions, modules |\n| **PowerShell** | `.ps1`, `.psm1`, `.psd1` | functions, classes, enums |\n| **Nix** | `.nix` | bindings |\n| **Groovy** | `.groovy`, `.gradle` | methods, classes, interfaces, enums, functions |\n\n## Installation\n\n### Via Package Managers (Recommended)\n\n**macOS / Linux (Homebrew):**\n```bash\nbrew tap postrv/narsil\nbrew install narsil-mcp\n```\n\n**Windows (Scoop):**\n```powershell\nscoop bucket add narsil https://github.com/postrv/scoop-narsil\nscoop install narsil-mcp\n```\n\n**Rust/Cargo (all platforms):**\n```bash\ncargo install narsil-mcp\n```\n\n**Node.js/npm (all platforms):**\n```bash\nnpm install -g narsil-mcp\n# or\nyarn global add narsil-mcp\n# or\npnpm add -g narsil-mcp\n```\n\n**Nix:**\n```bash\n# Run directly without installing\nnix run github:postrv/narsil-mcp -- --repos ./my-project\n\n# Install to profile\nnix profile install github:postrv/narsil-mcp\n\n# With web visualization frontend\nnix profile install github:postrv/narsil-mcp#with-frontend\n\n# Development shell\nnix develop github:postrv/narsil-mcp\n```\n\n### One-Click Install Script\n\n**macOS / Linux:**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.sh | bash\n```\n\n**Windows (PowerShell):**\n```powershell\nirm https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.ps1 | iex\n```\n\n**Windows (Git Bash / MSYS2):**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.sh | bash\n```\n\n\u003e **Note for Windows users:** The PowerShell installer provides better error messages and native Windows integration. It will automatically configure your PATH and check for required build tools if building from source.\n\n### From Source\n\n**Prerequisites:**\n- Rust 1.70 or later\n- On Windows: [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) with \"Desktop development with C++\"\n\n```bash\n# Clone and build\ngit clone git@github.com:postrv/narsil-mcp.git\ncd narsil-mcp\ncargo build --release\n\n# Binary will be at:\n# - macOS/Linux: target/release/narsil-mcp\n# - Windows: target/release/narsil-mcp.exe\n```\n\n### Feature Builds\n\nnarsil-mcp supports different feature sets for different use cases:\n\n```bash\n# Default build - native MCP server (~30MB)\ncargo build --release\n\n# With RDF knowledge graph and CCG tools (~35MB) - SPARQL queries, Code Context Graph\ncargo build --release --features graph\n\n# With neural vector search (~32MB) - adds TF-IDF similarity\ncargo build --release --features neural\n\n# With ONNX model support (~50MB) - adds local neural embeddings\ncargo build --release --features neural-onnx\n\n# With embedded visualization frontend (~31MB)\ncargo build --release --features frontend\n\n# Full-featured build with graph + frontend (~40MB)\ncargo build --release --features graph,frontend\n\n# For browser/WASM usage\ncargo build --release --target wasm32-unknown-unknown --features wasm\n```\n\n| Feature | Description | Size |\n|---------|-------------|------|\n| `native` (default) | Full MCP server with all tools | ~30MB |\n| `graph` | + RDF knowledge graph, SPARQL, CCG tools | ~35MB |\n| `frontend` | + Embedded visualization web UI | ~31MB |\n| `neural` | + TF-IDF vector search, API embeddings | ~32MB |\n| `neural-onnx` | + Local ONNX model inference | ~50MB |\n| `wasm` | Browser build (no file system, git) | ~3MB |\n\n\u003e **Important:** The `--graph` CLI flag requires the binary to be built with `--features graph`. If you pass `--graph` to a binary built without this feature, you'll see a warning and SPARQL/CCG tools won't be available. See [Troubleshooting](#graph-feature-not-working) below.\n\n\u003e **For detailed installation instructions, troubleshooting, and platform-specific guides**, see [docs/INSTALL.md](docs/INSTALL.md).\n\n## Usage\n\n### Basic Usage\n\n**macOS / Linux:**\n```bash\n# Index a single repository\nnarsil-mcp --repos /path/to/your/project\n\n# Index multiple repositories\nnarsil-mcp --repos ~/projects/project1 --repos ~/projects/project2\n\n# Enable verbose logging\nnarsil-mcp --repos /path/to/project --verbose\n\n# Force re-index on startup\nnarsil-mcp --repos /path/to/project --reindex\n```\n\n**Windows (PowerShell / CMD):**\n```powershell\n# Index a single repository\nnarsil-mcp --repos C:\\Users\\YourName\\Projects\\my-project\n\n# Index multiple repositories\nnarsil-mcp --repos C:\\Projects\\project1 --repos C:\\Projects\\project2\n\n# Enable verbose logging\nnarsil-mcp --repos C:\\Projects\\my-project --verbose\n\n# Force re-index on startup\nnarsil-mcp --repos C:\\Projects\\my-project --reindex\n```\n\n### Full Feature Set\n\n```bash\nnarsil-mcp \\\n  --repos ~/projects/my-app \\\n  --git \\           # Enable git blame, history, contributors\n  --call-graph \\    # Enable function call analysis\n  --persist \\       # Save index to disk for fast startup\n  --watch \\         # Auto-reindex on file changes\n  --lsp \\           # Enable LSP for hover, go-to-definition\n  --streaming \\     # Stream large result sets\n  --remote \\        # Enable GitHub remote repo support\n  --neural \\        # Enable neural semantic embeddings\n  --neural-backend api \\  # Backend: \"api\" (Voyage/OpenAI) or \"onnx\"\n  --neural-model voyage-code-2 \\  # Model to use\n  --neural-dimension 3072 \\  # Override embedding dimensions (auto-detected per model)\n  --graph           # Enable SPARQL/RDF knowledge graph and CCG tools (requires --features graph build)\n```\n\n\u003e **Note about `--graph`:** This flag enables SPARQL queries and Code Context Graph (CCG) tools, but **only if the binary was built with `--features graph`**. The default binary does not include this feature. If you need SPARQL/CCG capabilities, build from source with:\n\u003e ```bash\n\u003e cargo build --release --features graph\n\u003e ```\n\u003e If you pass `--graph` to a binary without the feature, you'll see a warning at startup and the server will continue without SPARQL/CCG tools.\n\n**Note:** Neural embeddings require an API key (or custom endpoint). The easiest way to set this up is with the interactive wizard:\n\n```bash\n# Run the neural API key setup wizard\nnarsil-mcp config init --neural\n```\n\nThe wizard will:\n- Detect your editor (Claude Desktop, Claude Code, Zed, VS Code, JetBrains)\n- Prompt for your API provider (Voyage AI, OpenAI, or custom)\n- Validate your API key\n- Automatically add it to your editor's MCP config\n\nAlternatively, you can manually set one of these environment variables:\n- `EMBEDDING_API_KEY` - Generic API key for any provider\n- `VOYAGE_API_KEY` - Voyage AI specific API key\n- `OPENAI_API_KEY` - OpenAI specific API key\n- `EMBEDDING_SERVER_ENDPOINT` - Custom embedding API endpoint URL (optional, allows using self-hosted models)\n\n### Configuration\n\n**v1.1.0+ introduces optional configuration** for fine-grained control over tools and performance. **All existing usage continues to work** - configuration is completely optional!\n\n#### Quick Start\n\n```bash\n# Generate default config interactively\nnarsil-mcp config init\n\n# List available tools\nnarsil-mcp tools list\n\n# Apply a preset via CLI\nnarsil-mcp --repos ~/project --preset minimal\n```\n\n#### Automatic Editor Detection\n\nnarsil-mcp detects your editor and applies an optimal preset automatically:\n\n| Editor | Preset | Tools | Context Tokens | Why |\n|--------|--------|-------|----------------|-----|\n| **Zed** | Minimal | 26 | ~4,686 | Fast startup, minimal context |\n| **VS Code** | Balanced | 51 | ~8,948 | Good feature balance |\n| **Claude Desktop** | Full | 90 | ~12,001 | Maximum capabilities |\n\n**Token Savings:**\n- **Minimal preset:** 61% fewer tokens vs Full\n- **Balanced preset:** 25% fewer tokens vs Full\n\n#### Presets\n\nChoose a preset based on your use case:\n\n```bash\n# Minimal - Fast, lightweight (Zed, Cursor)\nnarsil-mcp --repos ~/project --preset minimal\n\n# Balanced - Good defaults (VS Code, IntelliJ)\nnarsil-mcp --repos ~/project --preset balanced --git --call-graph\n\n# Full - All features (Claude Desktop, comprehensive analysis)\nnarsil-mcp --repos ~/project --preset full --git --call-graph\n\n# Security-focused - Security and supply chain tools\nnarsil-mcp --repos ~/project --preset security-focused\n```\n\n#### Configuration Files\n\n**User config** (`~/.config/narsil-mcp/config.yaml`):\n\n```yaml\nversion: \"1.0\"\npreset: \"balanced\"\n\ntools:\n  # Disable slow tools\n  overrides:\n    neural_search:\n      enabled: false\n      reason: \"Too slow for interactive use\"\n\nperformance:\n  max_tool_count: 50  # Limit total tools\n```\n\n**Project config** (`.narsil.yaml` in repo root):\n\n```yaml\nversion: \"1.0\"\npreset: \"security-focused\"  # Override user preset\n\ntools:\n  categories:\n    Security:\n      enabled: true\n    SupplyChain:\n      enabled: true\n```\n\n**Named repository profiles** are useful for multi-repo workspaces:\n\n```yaml\nversion: \"1.0\"\nprofiles:\n  platform:\n    repos:\n      - ~/src/api\n      - ~/src/web\n    git: true\n    call_graph: true\n    persist: true\n    preset: balanced\n```\n\n```bash\nnarsil-mcp --profile platform\nnarsil-mcp config profiles\n```\n\n**Priority:** CLI flags \u003e Environment vars \u003e Project config \u003e User config \u003e Defaults\n\n#### Environment Variables\n\n```bash\n# Select repos/profile\nexport NARSIL_REPOS=~/src/api,~/src/web\nexport NARSIL_PROFILE=platform\n\n# Apply preset\nexport NARSIL_PRESET=minimal\n\n# Enable specific categories\nexport NARSIL_ENABLED_CATEGORIES=Repository,Symbols,Search\n\n# Disable specific tools\nexport NARSIL_DISABLED_TOOLS=neural_search,generate_sbom\n```\n\n#### CLI Commands\n\n```bash\n# View effective config\nnarsil-mcp config show\n\n# Validate config file\nnarsil-mcp config validate ~/.config/narsil-mcp/config.yaml\n\n# List tools by category\nnarsil-mcp tools list --category Search\n\n# Search for tools\nnarsil-mcp tools search \"git\"\n\n# Export config\nnarsil-mcp config export \u003e my-config.yaml\n\n# List named repository profiles\nnarsil-mcp config profiles\n```\n\n**Learn More:**\n- [Configuration Guide](docs/configuration.md) - Full configuration reference\n- [Installation Guide](docs/INSTALL.md) - Platform-specific installation\n\n### Visualization Frontend\n\nExplore call graphs, imports, symbol references, and control flow interactively in your browser.\n\n```bash\n# Build with embedded frontend\ncargo build --release --features frontend\n\n# Run with HTTP server\nnarsil-mcp --repos ~/project --http --call-graph\n# Open http://localhost:3000\n```\n\n**Five graph views:**\n\n| View | Description |\n|------|-------------|\n| **Call Graph** | Function call relationships with depth control and direction filtering |\n| **Import Graph** | File-level import dependencies across the codebase |\n| **Symbol Graph** | All references to a symbol, with file clustering |\n| **Hybrid** | Combined call + import graph with split budget |\n| **Control Flow** | Real CFG with basic blocks, branches, and loop back-edges |\n\n**Features:**\n- Interactive Cytoscape.js graphs with drag, zoom, and double-click drill-down\n- Complexity metrics overlay with color coding (green/yellow/orange/red)\n- Security vulnerability overlay highlighting taint sources and sinks\n- Six layout algorithms (dagre, force-directed, breadthfirst, concentric, circle, grid)\n- File tree sidebar with syntax-highlighted code viewer\n- URL-driven state (shareable links, browser back/forward)\n- Dark mode support\n- Node detail panel with code excerpts and navigation to source\n\n\u003e **Full documentation:** See [docs/frontend.md](docs/frontend.md) for setup, API endpoints, and development mode.\n\n### Neural Semantic Search\n\nFind similar code using neural embeddings - even when variable names and structure differ.\n\n```bash\n# Quick setup with wizard\nnarsil-mcp config init --neural\n\n# Or manually with Voyage AI\nexport VOYAGE_API_KEY=\"your-key\"\nnarsil-mcp --repos ~/project --neural --neural-model voyage-code-2\n```\n\nSupports Voyage AI, OpenAI, custom endpoints, and local ONNX models.\n\n\u003e **Full documentation:** See [docs/neural-search.md](docs/neural-search.md) for setup, backends, and use cases.\n\n### Type Inference\n\nBuilt-in type inference for Python, JavaScript, and TypeScript - no mypy or tsc required.\n\n| Tool | Description |\n|------|-------------|\n| `infer_types` | Get inferred types for all variables in a function |\n| `check_type_errors` | Find potential type mismatches |\n| `get_typed_taint_flow` | Enhanced security analysis with type info |\n\n```python\ndef process(data):\n    result = data.split(\",\")  # result: list[str]\n    count = len(result)       # count: int\n    return count * 2          # returns: int\n```\n\n### Forgemax Integration (Experimental)\n\nFor large-scale agentic workflows, narsil-mcp can be used through [Forgemax](https://github.com/postrv/forgemax) — a Code Mode MCP gateway that collapses all 90 tools into just 2 (`search` + `execute`), reducing tool schema overhead from ~12,000 tokens to ~1,000.\n\n```bash\n# Install Forgemax\ncargo install forgemax\n\n# Run narsil-mcp through Forgemax (uses forge.toml in repo root)\nforgemax\n```\n\nThe included `forge.toml` configures narsil-mcp with sensible defaults:\n\n```toml\n[servers.narsil]\ncommand = \"narsil-mcp\"\nargs = [\"--repos\", \".\", \"--git\", \"--call-graph\", \"--persist\", \"--watch\"]\ntransport = \"stdio\"\n\n[sandbox]\ntimeout_secs = 10\nmax_heap_mb = 64\nmax_concurrent = 8\n```\n\nThe LLM writes JavaScript that calls through typed proxy objects inside a sandboxed V8 isolate — credentials, file paths, and internal state never leave the host. This approach is particularly useful when working with multiple MCP servers simultaneously, as it keeps the total tool context small and predictable.\n\n### MCP Configuration\n\nAdd narsil-mcp to your AI assistant by creating a configuration file. Here are the recommended setups:\n\n---\n\n**Claude Code** (`.mcp.json` in project root - Recommended):\n\nCreate `.mcp.json` in your project directory for per-project configuration:\n```json\n{\n  \"mcpServers\": {\n    \"narsil-mcp\": {\n      \"command\": \"narsil-mcp\",\n      \"args\": [\"--repos\", \".\", \"--git\", \"--call-graph\"]\n    }\n  }\n}\n```\n\nThen start Claude Code in your project:\n```bash\ncd /path/to/project\nclaude\n```\n\nUsing `.` for `--repos` automatically indexes the current directory. Claude now has access to 90 code intelligence tools.\n\n\u003e **Tip**: Add `--persist --index-path .claude/cache` for faster startup on subsequent runs.\n\nFor global configuration, edit `~/.claude/settings.json` instead. See [Claude Code Integration](docs/playbooks/integrations/claude-code.md) for advanced setups.\n\n---\n\n**Cursor** (`.cursor/mcp.json`):\n```json\n{\n  \"mcpServers\": {\n    \"narsil-mcp\": {\n      \"command\": \"narsil-mcp\",\n      \"args\": [\"--repos\", \".\", \"--git\", \"--call-graph\"]\n    }\n  }\n}\n```\n\n---\n\n**VS Code + GitHub Copilot** (`.vscode/mcp.json`):\n```json\n{\n  \"servers\": {\n    \"narsil-mcp\": {\n      \"command\": \"narsil-mcp\",\n      \"args\": [\"--repos\", \".\", \"--git\", \"--call-graph\"]\n    }\n  }\n}\n```\n\n\u003e **Note for Copilot Enterprise**: MCP support requires VS Code 1.102+ and must be enabled by your organization administrator.\n\n---\n\n**Claude Desktop** (`claude_desktop_config.json`):\n```json\n{\n  \"mcpServers\": {\n    \"narsil-mcp\": {\n      \"command\": \"narsil-mcp\",\n      \"args\": [\"--repos\", \"/path/to/your/projects\", \"--git\"]\n    }\n  }\n}\n```\n\n---\n\n**Zed** (`settings.json` → Context Servers):\n```json\n{\n  \"context_servers\": {\n    \"narsil-mcp\": {\n      \"command\": \"narsil-mcp\",\n      \"args\": [\"--repos\", \".\", \"--git\"]\n    }\n  }\n}\n```\n\n\u003e **Note for Zed**: narsil-mcp starts immediately and indexes in the background, preventing initialization timeouts.\n\n---\n\n### Claude Code Plugin\n\nFor **Claude Code** users, we provide a plugin with slash commands and a skill for effective tool usage.\n\n**Install via Marketplace (Recommended):**\n```shell\n# Add the narsil-mcp marketplace\n/plugin marketplace add postrv/narsil-mcp\n\n# Install the plugin\n/plugin install narsil@narsil-mcp\n```\n\n**Or install directly from GitHub:**\n```shell\n/plugin install github:postrv/narsil-mcp/narsil-plugin\n```\n\n**What's included:**\n\n| Component | Description |\n|-----------|-------------|\n| `/narsil:security-scan` | Run comprehensive security audits |\n| `/narsil:explore` | Explore unfamiliar codebases |\n| `/narsil:analyze-function` | Deep dive on specific functions |\n| `/narsil:find-feature` | Find where features are implemented |\n| `/narsil:supply-chain` | Analyze supply chain security |\n| **Skill** | Guides Claude on using 90 tools effectively |\n| **MCP Config** | Auto-starts narsil-mcp with sensible defaults |\n\nSee [narsil-plugin/README.md](narsil-plugin/README.md) for full documentation.\n\n### Ralph Automation Integration\n\n[Ralph](https://github.com/postrv/ralphing-la-vida-locum) is a Claude Code automation suite for autonomous code development. When narsil-mcp is available, Ralph gains enhanced code intelligence capabilities:\n\n| Feature | Without narsil-mcp | With narsil-mcp |\n|---------|-------------------|-----------------|\n| Security scanning | Basic (clippy) | OWASP/CWE vulnerability detection |\n| Code understanding | File-based | Call graphs, symbol references |\n| Architecture analysis | Manual | CCG L0/L1/L2 automatic layers |\n| Dependency analysis | cargo tree | Import graphs, circular detection |\n\n**Setup:**\n```bash\n# Install narsil-mcp (Ralph auto-detects it)\ncargo install narsil-mcp\n\n# Ralph's quality gates use these tools:\nnarsil-mcp scan_security --repo \u003cname\u003e\nnarsil-mcp check_type_errors --repo \u003cname\u003e --path src\nnarsil-mcp find_injection_vulnerabilities --repo \u003cname\u003e\n```\n\nRalph gracefully degrades when narsil-mcp is unavailable - all core automation features work without it.\n\n\u003e **Documentation:** See [Ralph README](https://github.com/postrv/ralphing-la-vida-locum) for full integration details.\n\n### Playbooks \u0026 Tutorials\n\nSee **[docs/playbooks](docs/playbooks/)** for practical usage guides:\n\n| Guide | Description |\n|-------|-------------|\n| [Getting Started](docs/playbooks/getting-started.md) | Quick setup and first tool calls |\n| [Understand a Codebase](docs/playbooks/workflows/understand-codebase.md) | Explore unfamiliar projects |\n| [Fix a Bug](docs/playbooks/workflows/fix-a-bug.md) | Debug with call graphs and taint analysis |\n| [Security Audit](docs/playbooks/workflows/security-audit.md) | Find vulnerabilities with OWASP/CWE scanning |\n| [Code Review](docs/playbooks/workflows/code-review.md) | Review changes effectively |\n\nEach playbook shows the exact tool chains Claude uses to answer your questions.\n\n### WebAssembly (Browser) Usage\n\nnarsil-mcp can run entirely in the browser via WebAssembly - perfect for browser-based IDEs, code review tools, or educational platforms.\n\n```bash\nnpm install @narsil-mcp/wasm\n```\n\n```typescript\nimport { CodeIntelClient } from '@narsil-mcp/wasm';\n\nconst client = new CodeIntelClient();\nawait client.init();\nclient.indexFile('src/main.rs', rustSourceCode);\nconst symbols = client.findSymbols('Handler');\n```\n\n\u003e **Full documentation:** See [docs/wasm.md](docs/wasm.md) for build instructions, React examples, and API reference.\n\n## Available Tools (90)\n\n### Repository \u0026 File Management\n\n| Tool | Description |\n|------|-------------|\n| `list_repos` | List all indexed repositories with metadata |\n| `get_project_structure` | Get directory tree with file icons and sizes |\n| `get_file` | Get file contents with optional line range |\n| `get_excerpt` | Extract code around specific lines with context |\n| `reindex` | Trigger re-indexing of repositories |\n| `discover_repos` | Auto-discover repositories in a directory |\n| `validate_repo` | Check if path is a valid repository |\n| `get_index_status` | Show index stats and enabled features |\n\n### Symbol Search \u0026 Navigation\n\n| Tool | Description |\n|------|-------------|\n| `find_symbols` | Find structs, classes, functions by type/pattern |\n| `get_symbol_definition` | Get symbol source with surrounding context |\n| `find_references` | Find all references to a symbol |\n| `get_dependencies` | Analyze imports and dependents |\n| `workspace_symbol_search` | Fuzzy search symbols across workspace |\n| `find_symbol_usages` | Cross-file symbol usage with imports |\n| `get_export_map` | Get exported symbols from a file/module |\n\n### Code Search\n\n| Tool | Description |\n|------|-------------|\n| `search_code` | Keyword search with relevance ranking |\n| `semantic_search` | BM25-ranked semantic search |\n| `hybrid_search` | Combined BM25 + TF-IDF with rank fusion |\n| `search_chunks` | Search over AST-aware code chunks |\n| `find_similar_code` | Find code similar to a snippet (TF-IDF) |\n| `find_similar_to_symbol` | Find code similar to a symbol |\n\n### AST-Aware Chunking\n\n| Tool | Description |\n|------|-------------|\n| `get_chunks` | Get AST-aware chunks for a file |\n| `get_chunk_stats` | Statistics about code chunks |\n| `get_embedding_stats` | Embedding index statistics |\n\n### Neural Semantic Search (requires `--neural`)\n\n| Tool | Description |\n|------|-------------|\n| `neural_search` | Semantic search using neural embeddings (finds similar code even with different names) |\n| `find_semantic_clones` | Find Type-3/4 semantic clones of a function |\n| `get_neural_stats` | Neural embedding index statistics |\n\n### Call Graph Analysis (requires `--call-graph`)\n\n| Tool | Description |\n|------|-------------|\n| `get_call_graph` | Get call graph for repository/function |\n| `get_callers` | Find functions that call a function |\n| `get_callees` | Find functions called by a function |\n| `find_call_path` | Find path between two functions |\n| `get_complexity` | Get cyclomatic/cognitive complexity |\n| `get_function_hotspots` | Find highly connected functions |\n\n### Control Flow Analysis\n\n| Tool | Description |\n|------|-------------|\n| `get_control_flow` | Get CFG showing basic blocks and branches |\n| `find_dead_code` | Find unreachable code blocks |\n\n### Data Flow Analysis\n\n| Tool | Description |\n|------|-------------|\n| `get_data_flow` | Variable definitions and uses |\n| `get_reaching_definitions` | Which assignments reach each point |\n| `find_uninitialized` | Variables used before initialization |\n| `find_dead_stores` | Assignments that are never read |\n\n### Type Inference (Python/JavaScript/TypeScript)\n\n| Tool | Description |\n|------|-------------|\n| `infer_types` | Infer types for variables in a function without external type checkers |\n| `check_type_errors` | Find potential type errors without running mypy/tsc |\n| `get_typed_taint_flow` | Enhanced taint analysis combining data flow with type inference |\n\n### Import/Dependency Graph\n\n| Tool | Description |\n|------|-------------|\n| `get_import_graph` | Build and analyze import graph |\n| `find_circular_imports` | Detect circular dependencies |\n| `get_incremental_status` | Merkle tree and change statistics |\n\n### Security Analysis - Taint Tracking\n\n| Tool | Description |\n|------|-------------|\n| `find_injection_vulnerabilities` | Find SQL injection, XSS, command injection, path traversal |\n| `trace_taint` | Trace tainted data flow from a source |\n| `get_taint_sources` | List taint sources (user input, files, network) |\n| `get_security_summary` | Comprehensive security risk assessment |\n\n### Security Analysis - Rules Engine\n\n| Tool | Description |\n|------|-------------|\n| `scan_security` | Scan with security rules (OWASP, CWE, crypto, secrets) |\n| `check_owasp_top10` | Scan for OWASP Top 10 2021 vulnerabilities |\n| `check_cwe_top25` | Scan for CWE Top 25 weaknesses |\n| `explain_vulnerability` | Get detailed vulnerability explanation |\n| `suggest_fix` | Get remediation suggestions for findings |\n\n### Supply Chain Security\n\n| Tool | Description |\n|------|-------------|\n| `generate_sbom` | Generate SBOM (CycloneDX/SPDX/JSON) |\n| `check_dependencies` | Check for known vulnerabilities (OSV database) |\n| `check_licenses` | Analyze licenses for compliance issues |\n| `find_upgrade_path` | Find safe upgrade paths for vulnerable deps |\n\n### Git Integration (requires `--git`)\n\n| Tool | Description |\n|------|-------------|\n| `get_blame` | Git blame for file |\n| `get_file_history` | Commit history for file |\n| `get_recent_changes` | Recent commits in repository |\n| `get_hotspots` | Files with high churn and complexity |\n| `get_contributors` | Repository/file contributors |\n| `get_commit_diff` | Diff for specific commit |\n| `get_symbol_history` | Commits that changed a symbol |\n| `get_branch_info` | Current branch and status |\n| `get_modified_files` | Working tree changes |\n\n### LSP Integration (requires `--lsp`)\n\n| Tool | Description |\n|------|-------------|\n| `get_hover_info` | Type info and documentation |\n| `get_type_info` | Precise type information |\n| `go_to_definition` | Find definition location |\n\n### Remote Repository Support (requires `--remote`)\n\n| Tool | Description |\n|------|-------------|\n| `add_remote_repo` | Clone and index GitHub repository |\n| `list_remote_files` | List files via GitHub API |\n| `get_remote_file` | Fetch file via GitHub API |\n\n### Metrics\n\n| Tool | Description |\n|------|-------------|\n| `get_metrics` | Performance stats and timing |\n\n### SPARQL / Knowledge Graph (requires `--graph`)\n\n| Tool | Description |\n|------|-------------|\n| `sparql_query` | Execute SPARQL query against RDF knowledge graph |\n| `list_sparql_templates` | List available SPARQL query templates |\n| `run_sparql_template` | Execute predefined SPARQL template with parameters |\n\n### Code Context Graph (CCG) (requires `--graph`)\n\nCCG provides standardized, AI-consumable representations of codebases in tiered layers.\n\n| Tool | Description |\n|------|-------------|\n| `get_ccg_manifest` | Layer 0 manifest (~1-2KB JSON-LD) - repo identity, counts |\n| `export_ccg_manifest` | Export Layer 0 manifest to file |\n| `export_ccg_architecture` | Layer 1 architecture (~10-50KB JSON-LD) - modules, API |\n| `export_ccg_index` | Layer 2 symbol index (~100-500KB N-Quads gzipped) |\n| `export_ccg_full` | Layer 3 full detail (~1-20MB N-Quads gzipped) |\n| `export_ccg` | Export all CCG layers as a bundle |\n| `query_ccg` | Query CCG using SPARQL |\n| `get_ccg_acl` | Generate WebACL access control for CCG layers |\n| `get_ccg_access_info` | Get CCG access tier information |\n| `import_ccg` | Import CCG layer from URL or file |\n| `import_ccg_from_registry` | Import CCG from codecontextgraph.com registry |\n\n## Security Rules\n\nnarsil-mcp includes built-in security rules in `rules/`:\n\n**Core Rulesets:**\n- **`owasp-top10.yaml`** - OWASP Top 10 2021 vulnerability patterns\n- **`cwe-top25.yaml`** - CWE Top 25 Most Dangerous Weaknesses\n- **`crypto.yaml`** - Cryptographic issues (weak algorithms, hardcoded keys)\n- **`secrets.yaml`** - Secret detection (API keys, passwords, tokens)\n\n**Language-Specific Rules:**\n- **`rust.yaml`** - Rust security patterns (unsafe transmute, FFI boundaries, command injection, TOCTOU)\n- **`elixir.yaml`** - Elixir/BEAM patterns (atom exhaustion, binary_to_term, Code.eval, Ecto SQL injection)\n- **`go.yaml`** - Go security patterns (SQL injection, TLS, command injection)\n- **`java.yaml`** - Java vulnerabilities (XXE, deserialization, LDAP injection)\n- **`csharp.yaml`** - C# security issues (deserialization, XSS, path traversal)\n- **`kotlin.yaml`** - Kotlin/Android patterns (WebView, intents, secrets)\n- **`bash.yaml`** - Shell script vulnerabilities (command injection, eval)\n\n**Infrastructure \u0026 Configuration:**\n- **`iac.yaml`** - Infrastructure as Code (Terraform, CloudFormation, Kubernetes)\n- **`config.yaml`** - Configuration file security (hardcoded credentials, insecure settings)\n\nCustom rules can be loaded with `scan_security --ruleset /path/to/rules.yaml`.\n\n## Architecture\n\n```\n+-----------------------------------------------------------------+\n|                         MCP Server                               |\n|  +-----------------------------------------------------------+  |\n|  |                   JSON-RPC over stdio                      |  |\n|  +-----------------------------------------------------------+  |\n|                              |                                   |\n|  +---------------------------v-------------------------------+  |\n|  |                   Code Intel Engine                        |  |\n|  |  +------------+ +------------+ +------------------------+  |  |\n|  |  |  Symbol    | |   File     | |    Search Engine       |  |  |\n|  |  |  Index     | |   Cache    | |  (Tantivy + TF-IDF)    |  |  |\n|  |  | (DashMap)  | | (DashMap)  | +------------------------+  |  |\n|  |  +------------+ +------------+                              |  |\n|  |  +------------+ +------------+ +------------------------+  |  |\n|  |  | Call Graph | |  Taint     | |   Security Rules       |  |  |\n|  |  |  Analysis  | |  Tracker   | |   Engine               |  |  |\n|  |  +------------+ +------------+ +------------------------+  |  |\n|  +-----------------------------------------------------------+  |\n|                              |                                   |\n|  +---------------------------v-------------------------------+  |\n|  |                Tree-sitter Parser                          |  |\n|  |  +------+ +------+ +------+ +------+ +------+             |  |\n|  |  | Rust | |Python| |  JS  | |  TS  | | Go   | ...         |  |\n|  |  +------+ +------+ +------+ +------+ +------+             |  |\n|  +-----------------------------------------------------------+  |\n|                              |                                   |\n|  +---------------------------v-------------------------------+  |\n|  |                Repository Walker                           |  |\n|  |           (ignore crate - respects .gitignore)             |  |\n|  +-----------------------------------------------------------+  |\n+-----------------------------------------------------------------+\n```\n\n## Performance\n\nBenchmarked on Apple M1 (criterion.rs):\n\n### Parsing Throughput\n\n| Language | Input Size | Time | Throughput |\n|----------|------------|------|------------|\n| Rust (large file) | 278 KB | 131 µs | **1.98 GiB/s** |\n| Rust (medium file) | 27 KB | 13.5 µs | 1.89 GiB/s |\n| Python | ~4 KB | 16.7 µs | - |\n| TypeScript | ~5 KB | 13.9 µs | - |\n| Mixed (5 files) | ~15 KB | 57 µs | - |\n\n### Search Latency\n\n| Operation | Corpus Size | Time |\n|-----------|-------------|------|\n| Symbol exact match | 1,000 symbols | **483 ns** |\n| Symbol prefix match | 1,000 symbols | 2.7 µs |\n| Symbol fuzzy match | 1,000 symbols | 16.5 µs |\n| BM25 full-text | 1,000 docs | 80 µs |\n| TF-IDF similarity | 1,000 docs | 130 µs |\n| Hybrid (BM25+TF-IDF) | 1,000 docs | 151 µs |\n\n### End-to-End Indexing\n\n| Repository | Files | Symbols | Time | Memory |\n|------------|-------|---------|------|--------|\n| narsil-mcp (this repo) | 53 | 1,733 | 220 ms | ~50 MB |\n| rust-analyzer | 2,847 | ~50K | 2.1s | 89 MB |\n| linux kernel | 78,000+ | ~500K | 45s | 2.1 GB |\n\n**Key metrics:**\n- Tree-sitter parsing: **~2 GiB/s** sustained throughput\n- Symbol lookup: **\u003c1µs** for exact match\n- Full-text search: **\u003c1ms** for most queries\n- Hybrid search runs BM25 + TF-IDF in parallel via rayon\n\n## Development\n\n```bash\n# Run the full test suite\ncargo test\n\n# Run benchmarks (criterion.rs)\ncargo bench\n\n# Run with debug logging\nRUST_LOG=debug cargo run -- --repos ./test-fixtures\n\n# Format code\ncargo fmt\n\n# Lint\ncargo clippy\n\n# Test with MCP Inspector\nnpx @modelcontextprotocol/inspector ./target/release/narsil-mcp --repos ./path/to/repo\n```\n\n## Troubleshooting\n\n### Tree-sitter Build Errors\n\nIf you see errors about missing C compilers or tree-sitter during build:\n\n```bash\n# macOS\nxcode-select --install\n\n# Ubuntu/Debian\nsudo apt install build-essential\n\n# For WASM builds\nbrew install emscripten  # macOS\n```\n\n### Neural Search API Errors\n\n```bash\n# Check your API key is set\necho $VOYAGE_API_KEY  # or $OPENAI_API_KEY\n\n# Common issue: wrong key format\nexport VOYAGE_API_KEY=\"pa-...\"  # Voyage keys start with \"pa-\"\nexport OPENAI_API_KEY=\"sk-...\"  # OpenAI keys start with \"sk-\"\n```\n\n### Index Not Finding Files\n\n```bash\n# Check .gitignore isn't excluding files\nnarsil-mcp --repos /path --verbose  # Shows skipped files\n\n# Force reindex\nnarsil-mcp --repos /path --reindex\n```\n\n### Memory Issues with Large Repos\n\n```bash\n# For very large repos (\u003e50K files), increase stack size\nRUST_MIN_STACK=8388608 narsil-mcp --repos /path/to/huge-repo\n\n# Or index specific subdirectories\nnarsil-mcp --repos /path/to/repo/src --repos /path/to/repo/lib\n```\n\n### Graph Feature Not Working\n\nIf you pass `--graph` and see a warning like:\n```\nWARN: --graph flag was passed but the binary was built without the 'graph' feature.\nSPARQL and CCG tools will not be available.\n```\n\nThis means you're using a binary that wasn't compiled with the `graph` feature. To fix:\n\n```bash\n# Build from source with the graph feature\ncargo build --release --features graph\n\n# Or with multiple features\ncargo build --release --features graph,frontend\n\n# Then run with --graph\n./target/release/narsil-mcp --repos ~/project --graph\n```\n\n**Why is this a separate feature?** The `graph` feature adds the Oxigraph RDF database (~5MB additional binary size) which isn't needed for most use cases. It's kept optional to keep the default binary smaller.\n\n**How to check if graph is enabled:** Look at the startup logs:\n- `graph=true` means the feature is compiled in AND enabled\n- `graph=false` means either the feature isn't compiled, OR `--graph` wasn't passed\n\n## Roadmap\n\n### Completed\n\n- [x] Multi-language symbol extraction (32 languages)\n- [x] Full-text search with Tantivy (BM25 ranking)\n- [x] Hybrid search (BM25 + TF-IDF with RRF)\n- [x] AST-aware code chunking\n- [x] Git blame/history integration\n- [x] Call graph analysis with complexity metrics\n- [x] Control flow graph (CFG) analysis\n- [x] Data flow analysis (DFG) with reaching definitions\n- [x] Dead code and dead store detection\n- [x] Taint analysis for injection vulnerabilities\n- [x] Security rules engine (OWASP, CWE, crypto, secrets)\n- [x] SBOM generation (CycloneDX, SPDX)\n- [x] Dependency vulnerability checking (OSV)\n- [x] License compliance analysis\n- [x] Import graph with circular dependency detection\n- [x] Cross-language symbol resolution\n- [x] Incremental indexing with Merkle trees\n- [x] Index persistence\n- [x] Watch mode for file changes\n- [x] LSP integration\n- [x] Remote repository support\n- [x] Streaming responses\n\n## What's New\n\n### v1.6.x (Current)\n\n- **Crash-proof chunking** - Fixed unsafe byte-level string slicing in `chunk_file()` and `extract_signature()` that caused `hybrid_search`, `search_chunks`, and `get_chunk_stats` to crash when processing files with multi-byte UTF-8 characters (emoji, CJK, accented chars). All byte slicing now uses safe `content.get()` with fallback.\n- **NaN-safe sort operations** - Fixed 5 locations across search, embeddings, git, index, and extract modules where `partial_cmp().unwrap()` would panic on NaN float values. All sorts now use `unwrap_or(Ordering::Equal)`.\n- **Defense-in-depth chunking** - Added `catch_unwind` wrappers around all repo-wide `chunk_file()` loops so a panic in one file skips it instead of crashing the entire MCP server.\n- **Visualization frontend overhaul** - Full SPA with HashRouter routing, file tree sidebar, syntax-highlighted code viewer, dashboard, and per-repo overview pages\n- **Graph view performance** - Import graph now uses cached index data instead of filesystem walks; symbol graph iterates file cache directly instead of markdown round-trips; all views respect `max_nodes` for early termination\n- **Real control flow graphs** - Flow view now uses the real CFG builder (`cfg::analyze_function`) with proper basic blocks, branch conditions, and loop back-edges instead of the single-block stub\n- **Hybrid graph budget splitting** - Hybrid view allocates 60/40 node budget between call and import graphs for balanced results\n- **Fix [#14](https://github.com/postrv/narsil-mcp/issues/14): configurable embedding dimensions** - Added `--neural-dimension` CLI arg and `default_dimension_for_model()` lookup so models like `text-embedding-3-large` use correct dimensions (3072) instead of hardcoded 1536\n- **Fix [#13](https://github.com/postrv/narsil-mcp/issues/13): Nix frontend build** - Added `frontendDist` derivation in `flake.nix` using `buildNpmPackage` so `nix profile install github:postrv/narsil-mcp#with-frontend` works\n- **Rust security rules** - 18 new rules (RUST-004 to RUST-021) covering command injection, transmute, FFI boundaries, TOCTOU, ReDoS, static mut, SSRF, and more\n- **Elixir security rules** - 18 new rules (EX-001 to EX-018) covering atom exhaustion, binary_to_term deserialization, Code.eval injection, Ecto SQL injection, Phoenix XSS, Erlang distribution security\n- **Migrated from `serde_yaml` to `serde-saphyr`** - Deprecated `serde_yaml` replaced with actively maintained, panic-free YAML library\n- **Custom favicon** - Frontend now uses narsil-mcp branding icon instead of default Vite logo\n- **Dependency security** - Updated `time` to 0.3.47 (RUSTSEC-2026-0009), `bytes` to 1.11.1 (RUSTSEC-2026-0007)\n- **Test count** increased from 1,611 to 1,763 (+152 tests)\n\n### v1.5.x\n\n- **Deterministic call graph resolution** - Scope-hint propagation disambiguates callee resolution (e.g., `App::run()` correctly resolves to `src/app/mod.rs::run`)\n- **8 graph analysis fixes** - Qualified node keys, hotspot filtering, CFG expression handling, import path parsing\n- **Nix flake improvements** - DRY `mkPkg` helper, removed unnecessary macOS frameworks, `--lib` test strategy for sandbox builds\n\n### v1.4.x\n\n- **SPARQL / RDF Knowledge Graph** - Query code intelligence data with SPARQL via Oxigraph\n- **Code Context Graph (CCG)** - 12 tools for standardized, AI-consumable codebase representations with tiered layers (L0-L3)\n- **Type-aware security analysis** - Enhanced taint tracking with type inference and trait implementations\n- **Multi-language CFG/DFG** - Control flow and data flow analysis extended to Go, Java, C#, Kotlin\n- **Infrastructure as Code scanning** - New `iac.yaml` rules for Terraform, CloudFormation, Kubernetes\n- **Language-specific security rules** - New rules for Go, Java, C#, Kotlin, Bash\n- **6 new languages** - Erlang, Elm, Fortran, PowerShell, Nix, Groovy\n- **90 tools total** - Up from 79 with new SPARQL, CCG, and analysis capabilities\n\n### v1.2.x\n\n- **`exclude_tests` parameter** - 22 tools support filtering out test files\n- **npm package** - Install via `npm install -g narsil-mcp`\n\n### v1.1.x\n\n- **Multi-platform distribution** - Install via Homebrew, Scoop, npm, Cargo, or direct download\n- **Configurable tool presets** - Minimal, balanced, full, and security-focused presets\n- **Automatic editor detection** - Optimal defaults for Zed, VS Code, Claude Desktop\n- **Interactive setup wizard** - `narsil-mcp config init` for easy configuration\n- **32 language support** - Added Dart, Julia, R, Perl, Zig, and more\n- **Improved performance** - Faster startup with background indexing\n\n### v1.0.x\n\n- **Neural semantic search** - Find similar code using Voyage AI or OpenAI embeddings\n- **Type inference** - Infer types in Python/JavaScript/TypeScript without external tools\n- **Multi-language taint analysis** - Security scanning for PHP, Java, C#, Ruby, Kotlin\n- **WASM build** - Run in browser for code playgrounds and educational tools\n- **147 bundled security rules** - OWASP, CWE, crypto, secrets, Rust, Elixir detection\n- **IDE configs included** - Claude Desktop, Cursor, VS Code, Zed templates\n\n## License\n\nLicensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Credits\n\nBuilt with:\n- [tree-sitter](https://tree-sitter.github.io/) - Incremental parsing\n- [tantivy](https://github.com/quickwit-oss/tantivy) - Full-text search\n- [tokio](https://tokio.rs/) - Async runtime\n- [rayon](https://github.com/rayon-rs/rayon) - Data parallelism\n- [serde](https://serde.rs/) - Serialization\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostrv%2Fnarsil-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostrv%2Fnarsil-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostrv%2Fnarsil-mcp/lists"}