Skip to content

yunusgungor/knowgraph

Repository files navigation

🧠 KnowGraph: Graph RAG & MCP Server for Code (v1.0.0 🚀)

CI Joern Python MCP License

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


🔬 Why KnowGraph?

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)


⚡ Quick Start

1. Installation

pip install knowgraph

# Setup Joern for advanced code analysis (recommended)
knowgraph-setup-joern

2. MCP Server Configuration

For Claude Desktop

Add 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"
      }
    }
  }
}

For Cursor

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"
      }
    }
  }
}

For Antigravity

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
    }
  }
}

Using OpenRouter (Alternative LLM Provider)

{
  "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
    }
  }
}

3. Restart Your AI Editor

That's it! KnowGraph is now ready to use.


📚 Documentation

For detailed usage, configuration, and advanced features, see the User Guide.

Quick Links:


🤝 Contributing

Contributions are welcome! Please see our Contributing Guide for details.


📄 License

MIT


🔗 Links

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

10 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages