Narsil
Rust MCP server for comprehensive code intelligence - 90 tools, 32 languages, security scanning, call graphs, and more
What is Narsil?
Narsil is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to rust mcp server for comprehensive code intelligence - 90 tools, 32 languages, security scanning, call graphs, and more
Rust MCP server for comprehensive code intelligence - 90 tools, 32 languages, security scanning, call graphs, and more
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Rust MCP server for comprehensive code intelligence - 90 too
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx narsilConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Narsil
Narsil is a high-performance Rust-based MCP server that delivers comprehensive code intelligence across 32 programming languages. It exposes up to 90 tools covering symbol search, call graph analysis, taint-based security scanning, SBOM generation, and semantic code search using Voyage AI or OpenAI embeddings. Developers use it to give AI assistants deep, local understanding of large codebases without sending source code to external services, making it ideal for privacy-conscious teams and complex multi-repository projects.
Prerequisites
- Rust 1.70+ (if building from source) or a pre-built binary via Homebrew, Cargo, npm, or the install script
- An MCP client such as Claude Desktop, Claude Code, Cursor, VS Code with the MCP extension, or Zed
- Optional: VOYAGE_API_KEY or OPENAI_API_KEY for neural/semantic code search
- Git installed if using git history, blame, or hotspot analysis (--git flag)
- On Windows: Visual Studio Build Tools when compiling from source
Install Narsil
Install the narsil-mcp binary using the method that suits your platform. Homebrew is recommended for macOS/Linux; Cargo works everywhere Rust is installed.
# macOS/Linux via Homebrew
brew tap postrv/narsil && brew install narsil-mcp
# Or via Cargo
cargo install narsil-mcp
# Or via npm
npm install -g narsil-mcp
# Or one-line installer (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/postrv/narsil-mcp/main/install.sh | bashVerify the installation
Confirm that narsil-mcp is on your PATH and shows the expected version.
narsil-mcp --versionChoose a tool preset
Narsil ships with three presets that control how many of its 90 tools are active. Use 'minimal' (26 tools) for lightweight editors, 'balanced' (51 tools) for VS Code or IntelliJ, and 'full' (90 tools) for Claude Desktop where context is less constrained.
Add Narsil to your MCP client configuration
Add the server block to your MCP client config file. Point --repos at the project directory you want to analyze. Add --git to enable blame/history tools and --call-graph to enable call-graph tracing.
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": ["--repos", "/path/to/your/project", "--git", "--call-graph", "--preset", "balanced"]
}
}
}Enable neural search (optional)
For semantic code search that understands intent rather than just keywords, provide a Voyage AI or OpenAI API key and add the --neural flag.
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": ["--repos", "/path/to/project", "--neural", "--neural-model", "voyage-code-2"],
"env": {
"VOYAGE_API_KEY": "pa-your-voyage-key"
}
}
}
}Create a project-level config file (optional)
Place a .narsil.yaml file in your repository root to set per-project defaults so every team member gets consistent tool categories without passing long CLI flags.
# .narsil.yaml
preset: "balanced"
tools:
categories:
Security:
enabled: trueNarsil Examples
Client configuration
Full Claude Desktop configuration with git integration, call graphs, and the balanced preset for a single project.
{
"mcpServers": {
"narsil-mcp": {
"command": "narsil-mcp",
"args": [
"--repos", "/Users/you/projects/myapp",
"--git",
"--call-graph",
"--preset", "balanced"
]
}
}
}Prompts to try
Examples of what you can ask your AI assistant once Narsil is connected.
- "Find all functions that call `processPayment` and show their call graphs"
- "Run a security scan on the authentication module and list any SQL injection risks"
- "Show me the hottest files in the git history — which ones change most often?"
- "Search for code similar to this snippet using semantic search"
- "Generate a CycloneDX SBOM for this repository and list any OSV vulnerabilities"Troubleshooting Narsil
narsil-mcp: command not found after npm install
Ensure npm's global bin directory is on your PATH. Run `npm bin -g` to find it and add it to your shell profile, then restart your terminal.
Neural search returns an error about a missing API key
Set VOYAGE_API_KEY or OPENAI_API_KEY in the env block of your MCP config, or export it in your shell before starting the client. Neural features are disabled when no key is present.
Stack overflow when analyzing very large repositories
Set the RUST_MIN_STACK environment variable to a larger value, e.g. RUST_MIN_STACK=8388608, in your MCP server env config to increase the thread stack size.
Frequently Asked Questions about Narsil
What is Narsil?
Narsil is a Model Context Protocol (MCP) server that rust mcp server for comprehensive code intelligence - 90 tools, 32 languages, security scanning, call graphs, and more It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Narsil?
Follow the installation instructions on the Narsil GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Narsil?
Narsil works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Narsil free to use?
Yes, Narsil is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Narsil Alternatives — Similar Developer Tools Servers
Looking for alternatives to Narsil? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Narsil in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Narsil?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.