Transform your AI coding assistant with deep code understanding
"Your code is not just text, it's a living graph."
Shift from vector similarity to the deterministic clarity of Graph Theory and Joern Code Property Graph.
⚡ Quick Start • 📚 Full Documentation • 📘 Example Usage Guide
KnowGraph is an MCP (Model Context Protocol) server that enhances AI coding assistants with:
- 🎯 Graph-Based Code Understanding: Follows real relationships (imports, calls, inheritance)
- 🔍 Deep Security Analysis: Joern-powered vulnerability detection (SQL injection, XSS, buffer overflows)
- 📊 Impact Analysis: Predict ripple effects of code changes
- 🕰️ Time-Travel Debugging: Version control for your knowledge graph
- 💬 Conversational Memory: Index and search your AI chat history
- ⚡ High Performance: 30s indexing, <1s re-indexing with smart caching
Supported Languages: Python, JavaScript/TypeScript, Java, C/C++, Go, Rust, C#, Scala, PHP, Ruby, Kotlin, Swift, and more (15+ languages)
pip install knowgraph
# Setup Joern for advanced code analysis (recommended)
knowgraph-setup-joernAdd to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"knowgraph": {
"command": "knowgraph",
"args": ["serve"],
"env": {
"KNOWGRAPH_API_BASE_URL": "https://openrouter.ai/api/v1",
"KNOWGRAPH_LLM_MODEL": "x-ai/grok-4.1-fast",
"KNOWGRAPH_API_KEY": "sk-your-openai-key-here"
}
}
}
}Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"knowgraph": {
"command": "knowgraph",
"args": ["serve"],
"env": {
"KNOWGRAPH_API_BASE_URL": "https://openrouter.ai/api/v1",
"KNOWGRAPH_LLM_MODEL": "x-ai/grok-4.1-fast",
"KNOWGRAPH_API_KEY": "sk-your-openai-key-here"
}
}
}
}Add to ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"knowgraph": {
"command": "knowgraph",
"args": ["serve"],
"env": {
"KNOWGRAPH_API_BASE_URL": "https://openrouter.ai/api/v1",
"KNOWGRAPH_LLM_MODEL": "x-ai/grok-4.1-fast",
"KNOWGRAPH_API_KEY": "sk-your-openai-key-here"
},
"disabled": false
}
}
}{
"mcpServers": {
"knowgraph": {
"command": "knowgraph",
"args": ["serve"],
"env": {
"KNOWGRAPH_API_BASE_URL": "https://openrouter.ai/api/v1",
"KNOWGRAPH_LLM_MODEL": "x-ai/grok-4.1-fast",
"KNOWGRAPH_API_KEY": "sk-or-v1-your-openrouter-key-here"
},
"disabled": false
}
}
}That's it! KnowGraph is now ready to use.
For detailed usage, configuration, and advanced features, see the User Guide.
Quick Links:
- Installation & Setup
- MCP Server Integration
- Joern Code Analysis
- Advanced Querying
- Performance Optimization
- Security Analysis
- Troubleshooting
- 📘 Example Usage Guide (New!): All commands, combinations and workflows.
- Architecture
Contributions are welcome! Please see our Contributing Guide for details.
- GitHub: yunusgungor/knowgraph
- Documentation: User Guide
- Issues: Report a bug
- MCP Protocol: Model Context Protocol
- Joern: Code Property Graph