Dense, Lossless Context for AI Coding Agents
Generate, share, and store layered code context graphs for arbitrarily large repos. Lightning-fast Rust performance with oxigraph SPARQL/RDF backend.
$ brew tap postrv/narsil && brew install narsil-mcp
$ narsil-mcp --repos ~/your-project --ccg-output ./context.ccg.json
AI coding agents are flying blind
Without deep code intelligence, AI assistants struggle with complex codebases
Complete context. One graph file.
Everything your AI assistant needs to understand your codebase
Layered Context Graphs
Multi-layered representation capturing symbols, call graphs, types, and dependencies.
Semantic Search
BM25 + TF-IDF + neural embeddings. Find code by meaning, not just text.
Security Analysis
OWASP Top 10, CWE Top 25, secrets detection, taint analysis baked in.
Full Call Graphs
Who calls what? Trace paths between functions. Find hotspots instantly.
Dependency Intelligence
SBOM generation, OSV vulnerability checks, license compliance.
Type Inference
Infer types in Python/JS/TS without running external checkers.
SPARQL/RDF Backend
Powered by oxigraph. Query your codebase like a knowledge graph.
Shareable Graphs
Export, publish, and share CCG files. Let agents adopt your repo instantly.
Rust Performance
Lightning-fast indexing and querying. Handle million-line codebases.
Git Integration
Blame, history, hotspots, contributors — all queryable.
32 Languages
Rust, Python, TypeScript, Go, Java, C#, Ruby, Kotlin, Swift, and 23 more.
100% Local
Your code never leaves your machine. No cloud required.
From install to insights in 60 seconds
Get started with Code Context Graph in three simple steps
Install
$ brew tap postrv/narsil
$ brew install narsil-mcpGenerate CCG
$ narsil-mcp \
--repos ~/your-project \
--ccg-output ./context.ccg.jsonUse with AI
# Share with agents or configure MCP
{
"mcpServers": {
"narsil": {
"command": "narsil-mcp",
"args": ["--repos", "~/project"]
}
}
}The CCG Standard
Publish your codebase for AI
The Code Context Graph (CCG) is an open standard for publishing machine-readable code intelligence. Dense, lossless, and designed for AI consumption.
- Symbols, call graphs, types, security findings — all in one file
- Works with any LLM, any MCP client
- Auto-generated by narsil-mcp, hosted on codecontextgraph.com
- Open standard — contribute via GitHub
{
"@context": "https://codecontextgraph.com",
"@type": "CodeContextGraph",
"name": "my-project",
"version": "1.0.0",
"layers": {
"symbols": { ... },
"callGraph": { ... },
"types": { ... },
"dependencies": { ... },
"security": { ... }
}
}