MCP server · Audited from source
Narsil MCP server
by postrv/narsil-mcpApache-2.0 licenceAudited 6 Oct 2026 · source c95b55984ca6
Is it safe? No — BLOCK, grade F (53/100). It exposes 96 tools: 84 read, 12 write and 0 destructive. The audit recorded 58 findings (6 critical, 23 high, 11 medium, 13 low). Maintainer's description: Rust MCP server for comprehensive code intelligence - 90 tools, 32 languages, security scanning, call graphs, and more
Cite
Cite this page
ModelsAtlas. “Narsil MCP server (postrv/narsil-mcp)”. Retrieved 6 Oct 2026. https://modelsatlas.com/mcp/postrv/narsil
Why this is BLOCK. The audit found 6 critical and 23 high findings; the most severe is Hard-coded secrets at rules/secrets.yaml:230. Each finding is listed below with its file and line.
Why this page is still public. People search for this server by name. Hiding it would leave them with the README's word alone; here they see what the code does. We list it so you can decide, and we do not show connect commands for BLOCK servers.
Trust audit
Audit 0.4.1 · full source read 6 Oct 2026
58 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.
What the source does
- FilesystemDeclared14 observations
- NetworkDeclared23 observations
- ShellDeclared14 observations
- DependenciesNot pinnedSome ranges float
- SecretsFoundSee the findings
Findings (58)
Sorted by severity · the 25 most severe of 58 are listed
CRITICALHard-coded secretssecret.private_key · rules/secrets.yaml:230
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
CRITICALHard-coded secretssecret.private_key · rules/secrets.yaml:231
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
CRITICALHard-coded secretssecret.private_key · rules/secrets.yaml:232
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
CRITICALHard-coded secretssecret.private_key · rules/secrets.yaml:233
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
CRITICALHard-coded secretssecret.private_key · rules/secrets.yaml:234
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
CRITICALHard-coded secretssecret.stripe · test-fixtures/security/vulnerable.kt:40
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
HIGHCode injectioncode.deserialize · src/security_rules.rs:2484
data = pickle.loads(user_input)
- Why
- deserialises untrusted bytes into live objects
- Fix
- use json or yaml.safe_load
HIGHCode injectioncode.deserialize · test-fixtures/security/vulnerable.php:37
$obj = unserialize($data); // BAD: Unserialize user input
- Why
- deserialises untrusted bytes into live objects
- Fix
- use json or yaml.safe_load
HIGHCode injectioncode.deserialize · test-fixtures/security/vulnerable.php:38
return unserialize($_GET['obj']); // BAD
- Why
- deserialises untrusted bytes into live objects
- Fix
- use json or yaml.safe_load
HIGHCode injectioncode.eval_exec · src/taint/patterns.rs:697
"exec(".to_string(),- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/taint/patterns.rs:699
"Exec(".to_string(),- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/taint/patterns.rs:720
"exec(".to_string(),- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/taint/patterns.rs:783
"eval(".to_string(),- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/taint/patterns.rs:784
"exec(".to_string(),- Why
- evaluates text as code
- Fix
- remove; use a parser or a dispatch table
HIGHFilesystem / pathfs.credential_store · .claude/hooks/security-filter.sh:77
"$HOME/.ssh/"
- Why
- touches a credential store
- Fix
- —
HIGHFilesystem / pathfs.credential_store · .claude/hooks/security-filter.sh:78
"/home/*/.ssh/"
- Why
- touches a credential store
- Fix
- —
HIGHFilesystem / pathfs.credential_store · .claude/hooks/security-filter.sh:80
"cat.*id_rsa"
- Why
- touches a credential store
- Fix
- —
HIGHFilesystem / pathfs.credential_store · .claude/hooks/security-filter.sh:81
"cat.*id_ed25519"
- Why
- touches a credential store
- Fix
- —
HIGHFilesystem / pathfs.credential_store · .claude/hooks/security-filter.sh:82
"cat.*id_ecdsa"
- Why
- touches a credential store
- Fix
- —
HIGHNetwork egressnet.metadata_ip · src/ccg/import.rs:1176
validate_url_for_ssrf("http://169.254.169.254/metadata", SsrfPolicy::BlockPrivate)- Why
- cloud metadata endpoint: the classic SSRF credential grab
- Fix
- —
HIGHNetwork egressnet.metadata_ip · src/neural.rs:1414
let result = validate_embedding_endpoint("http://169.254.169.254/latest/meta-data/");- Why
- cloud metadata endpoint: the classic SSRF credential grab
- Fix
- —
HIGHNetwork egressnet.metadata_ip · src/neural.rs:1422
validate_embedding_endpoint("http://metadata.google.internal/computeMetadata/v1/");- Why
- cloud metadata endpoint: the classic SSRF credential grab
- Fix
- —
HIGHNetwork egressnet.metadata_ip · src/validation.rs:196
host == "169.254.169.254"
- Why
- cloud metadata endpoint: the classic SSRF credential grab
- Fix
- —
HIGHNetwork egressnet.metadata_ip · src/validation.rs:199
|| host == "metadata.google.internal"
- Why
- cloud metadata endpoint: the classic SSRF credential grab
- Fix
- —
HIGHNetwork egressnet.tls_off · rules/bash.yaml:75
remediation: Remove -k/--insecure flag and ensure proper CA certificates are installed
- Why
- certificate verification is disabled
- Fix
- leave verification on
Tools it exposes
96 declared in source · 0 destructive
| Tool | What it does | Risk |
|---|---|---|
add_remote_repo | Add a remote GitHub repository for indexing. Clones the repo to a temporary location. | write |
find_circular_imports | Detect circular import dependencies in the codebase. Returns all cycles with the files involved. | write |
find_imports | Find import relationships for a file | write |
get_code_graph | Get graph visualization data (call graph, import graph, symbols). HTTP-only tool, not available via MCP. | write |
get_commit_diff | Get the diff for a specific commit. Requires --git flag. | write |
get_file_history | Get git commit history for a file. Requires --git flag. | write |
get_import_graph | Build and analyze the import/dependency graph for a codebase. Shows which files import which other files, helps identify circular dependencies. | write |
import_ccg | Import a CCG layer from URL or local file. Supports JSON-LD (L0/L1) and gzipped N-Quads (L2/L3) formats. | write |
import_ccg_from_registry | Import all CCG layers from the codecontextgraph.com registry for a repository. | write |
reindex | Trigger re-indexing of a repository or all repositories | write |
run_sparql_template | Execute a predefined SPARQL query template with parameters. Requires --graph flag. | write |
sparql_query | Execute a SPARQL query against the RDF knowledge graph. Supports SELECT and ASK queries with timeout and result limits. Requires --graph flag. | write |
check_cwe_top25 | Scan for CWE Top 25 Most Dangerous Software Weaknesses including buffer overflows, injection, improper input validation. | read |
check_dependencies | Check project dependencies for known vulnerabilities using the OSV (Open Source Vulnerabilities) database. Returns CVE/GHSA IDs and recommended upgrades. | read |
check_licenses | Analyze dependency licenses for compliance issues. Detects copyleft licenses, unknown licenses, and license compatibility problems. | read |
check_owasp_top10 | Scan specifically for OWASP Top 10 2021 vulnerabilities including injection, broken auth, XSS, SSRF, etc. | read |
check_type_errors | Find potential type errors in Python/JavaScript/TypeScript code without running mypy/tsc. Detects type mismatches, undefined variables, etc. | read |
discover_repos | Auto-discover repositories in a directory by detecting VCS roots and project markers | read |
explain_vulnerability | Get detailed explanation of a security vulnerability type including examples, references, and remediation guidance. | read |
export_ccg | Export all CCG layers as a bundle to a directory. Generates manifest.json, architecture.json, symbol-index.nq.gz.b64, and full-detail.nq.gz.b64. | read |
export_ccg_architecture | Export CCG Layer 1 architecture (~10-50KB JSON-LD) with module hierarchy, public API, and dependencies. | read |
export_ccg_full | Export CCG Layer 3 full detail (~1-20MB N-Quads gzipped) with complete RDF dataset including imports and security findings. | read |
export_ccg_index | Export CCG Layer 2 symbol index (~100-500KB N-Quads gzipped) with all symbols and call graph edges. | read |
export_ccg_manifest | Export CCG Layer 0 manifest to a file. Returns content or writes to specified path. | read |
find_call_path | Find the call path between two functions. Requires --call-graph flag. | read |
find_calls | Find what a function calls and what calls it | read |
find_dead_code | Find unreachable code blocks in a function or file using control flow analysis. | read |
find_dead_stores | Find variable assignments that are never read (dead stores). | read |
find_functions | Find all functions in a repository | read |
find_functions_by_name | Find functions matching a name pattern | read |
find_injection_vulnerabilities | Find injection vulnerabilities (SQL injection, XSS, command injection, path traversal) using taint analysis. | read |
find_references | Find all references to a symbol across the codebase | read |
find_security_findings | Find security findings at or above a severity threshold | read |
find_semantic_clones | Find semantically similar code (Type-3/4 clones) using neural embeddings. Detects code that does the same thing with different implementation. | read |
find_similar_code | Find code similar to a given snippet using TF-IDF embeddings. Good for finding duplicate or related code patterns. | read |
find_similar_to_symbol | Find code similar to a specific symbol (function, class, etc.). Useful for finding related implementations or potential duplicates. | read |
find_symbol_usages | Find all usages of a symbol across files, including imports and re-exports. Cross-language aware for JS/TS projects. | read |
find_symbols | Find data structures (structs, classes, enums, interfaces) and functions/methods in a repository. Supports filtering by type and name pattern. | read |
find_symbols_in_file | Find all symbols defined in a specific file | read |
find_uninitialized | Find variables that may be used before being initialized. | read |
find_unused_exports | Detect exported symbols never imported by other files in repo. Cross-file analysis using import graph. Configurable to exclude public API surface. | read |
find_upgrade_path | Find safe upgrade paths for vulnerable dependencies. Shows which versions fix known vulnerabilities and whether upgrades have breaking changes. | read |
generate_sbom | Generate a Software Bill of Materials (SBOM) for a project. Supports CycloneDX and SPDX formats. Parses Cargo.toml, package.json, requirements.txt, and go.mod. | read |
get_blame | Get git blame information for a file. Requires --git flag. | read |
get_branch_info | Get current branch name and repository status. Requires --git flag. | read |
get_call_graph | Get the call graph for a repository or specific function. Requires --call-graph flag. | read |
get_callees | Find functions called by a given function. Requires --call-graph flag. | read |
get_callers | Find functions that call a given function. Requires --call-graph flag. | read |
get_ccg_access_info | Get information about CCG access tiers and permissions. Explains the Triple-Heart Model and WebACL configuration. | read |
get_ccg_acl | Generate WebACL access control document for CCG layers. Supports Triple-Heart Model (public/authenticated/private tiers). | read |
get_ccg_manifest | Get CCG Layer 0 manifest (~1-2KB JSON-LD) with repository identity, symbol counts, languages, and security summary. Always fits in AI context window. | read |
get_chunk_stats | Get statistics about code chunks in a repository. | read |
get_chunks | Get AST-aware code chunks for a file with symbol context. | read |
get_complexity | Get complexity metrics (cyclomatic, cognitive) for a function. Requires --call-graph flag. | read |
get_contributors | Get contributors to a file or repository. Requires --git flag. | read |
get_control_flow | Get the control flow graph (CFG) for a function, showing basic blocks, branches, and loops. | read |
get_data_flow | Get data flow analysis for a function, showing variable definitions and uses. | read |
get_dependencies | Analyze dependencies and imports for a file or module | read |
get_embedding_stats | Get statistics about the embedding index. | read |
get_excerpt | Extract code excerpts around specific lines with intelligent context expansion. Automatically expands to function/class boundaries when enabled. | read |
get_export_map | Get the export map for a file or module showing all exported symbols and their types. | read |
get_file | Get the contents of a specific file with optional line range | read |
get_function_hotspots | Find highly connected functions (potential refactoring targets) based on call graph analysis. Requires --call-graph flag. | read |
get_hotspots | Find code hotspots - files with high churn and complexity. Requires --git flag. | read |
get_hover_info | Get hover information (type info, documentation) for a symbol at a specific position. Enhanced with LSP when available. | read |
get_incremental_status | Get status of incremental indexing including Merkle tree root hash, file counts, and change statistics. | read |
get_index_status | Get status of the search index and enabled features. Shows which optional features are enabled (--git, --call-graph, --persist, --watch) and index statistics. | read |
get_metrics | Get performance metrics including tool execution times, indexing statistics, and server uptime | read |
get_modified_files | Get list of modified files in the working tree. Requires --git flag. | read |
get_neural_stats | Get statistics about the neural embedding index. Requires --neural flag. | read |
get_project_structure | Get the directory structure and key files of a repository. Returns a tree view with file types and sizes. | read |
get_reaching_definitions | Get reaching definitions analysis - which variable assignments reach each point in the code. | read |
get_recent_changes | Get recent commits across the repository. Requires --git flag. | read |
get_remote_file | Fetch a specific file from a remote GitHub repository via API (no clone needed). | read |
get_security_summary | Get a comprehensive security summary for a repository including vulnerability counts and risk assessment. | read |
get_symbol_definition | Get the full definition of a symbol with surrounding context. Returns the source code with line numbers. | read |
get_symbol_history | Get commits that modified a specific symbol/function. Requires --git flag. | read |
get_taint_sources | List all identified taint sources (user inputs, file reads, network data) in the codebase. | read |
get_type_info | Get precise type information for a symbol. Requires LSP to be enabled. | read |
get_typed_taint_flow | Enhanced taint analysis with type information. More precise than untyped taint tracking, combines data flow with type inference. | read |
go_to_definition | Find the definition location of a symbol at a specific position. Enhanced with LSP when available. | read |
hybrid_search | Perform hybrid search combining BM25 keyword search with TF-IDF semantic similarity using Reciprocal Rank Fusion (RRF). | read |
infer_types | Infer types for variables in a Python/JavaScript/TypeScript function. Shows what types flow through the code without running external type checkers. | read |
list_remote_files | List files in a remote GitHub repository via API (no clone needed). Rate limited without GITHUB_TOKEN. | read |
list_repos | List all indexed repositories with metadata (path, language breakdown, file count) | read |
list_sparql_templates | List available SPARQL query templates for common code intelligence patterns. Requires --graph flag. | read |
neural_search | Search code using neural semantic embeddings. Finds semantically similar code even with different variable names. Requires --neural flag and EMBEDDING_API_KEY. | read |
query_ccg | Query CCG Layer 3 using SPARQL. Enables rich semantic queries against the full code context graph. | read |
scan_security | Scan repository for security issues using the security rules engine. Detects vulnerabilities, secrets, crypto issues, and more. | read |
search_chunks | Search over AST-aware code chunks with symbol context. | read |
search_code | Semantic and keyword search across code. Returns ranked excerpts with surrounding context. | read |
semantic_search | BM25-ranked semantic search with code-aware tokenization. Better than simple text search for natural language queries. | read |
suggest_fix | Get suggested fixes for a specific security finding. | read |
trace_taint | Trace how tainted data flows from a source location through the code. | read |
validate_repo | Validate that a path is a valid repository and can be indexed | read |
workspace_symbol_search | Fuzzy search for symbols across the entire workspace. Uses trigram matching for typo-tolerant search. | read |
Safer alternatives
All code intelligence servers →evalops/deep-code-reasoning-mcp
A Model Context Protocol (MCP) server that provides advanced code analysis and reasoning capabilities powered by Google's Gemini AI
srclight/srclight
Deep code indexing MCP server for AI agents. 25 tools: hybrid FTS5 + embedding search, call graphs, git blame/hotspots, build system analysis. Multi-repo workspaces, GPU-accelerated semantic search, 10 languages via tree-sitter. Fully local, zero cloud dependencies.
study8677/antigravity-workspace-template
🧠 RepoBrain (formerly Antigravity) — Give your repo a brain. ChatGPT for your codebase: works in Claude Code, Cursor, Codex, Windsurf & more.
Audit history
- ✕BLOCK F 53 / 100
First audit ·
c95b55984ca6
README badge
Badges show the current verdict, BLOCK included
A badge cannot be hidden by the maintainer while the verdict is BLOCK. Fix the findings, push, and the re-audit updates it.
Questions about Narsil MCP server
What is the Narsil MCP server?
What tools does Narsil expose?
Is Narsil safe to connect to an agent?
What credentials does Narsil need?
How current is this page?
I already installed Narsil. What should I do?
Can the verdict change?
Sources
- postrv/narsil-mcp on GitHub — the source we read, its licence, stars and activityObserved · 6 Oct 2026
- ModelsAtlas trust audit — BLOCK verdict for commit c95b55984ca6Observed · 6 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What is the Narsil MCP server?
- What tools does Narsil expose?
- Is Narsil safe to connect to an agent?