Skip to main content

Knowledge Graph-Powered RAG system with enterprise resilience patterns

Project description

🧠 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knowgraph-1.0.0.tar.gz (354.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knowgraph-1.0.0-py3-none-any.whl (295.2 kB view details)

Uploaded Python 3

File details

Details for the file knowgraph-1.0.0.tar.gz.

File metadata

  • Download URL: knowgraph-1.0.0.tar.gz
  • Upload date:
  • Size: 354.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for knowgraph-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a8f8b37c125ebb29505313cdcee835cbadee7556e102b754336fff56a759a9e7
MD5 a0ea29e9b4fcde5831e31d00104bef00
BLAKE2b-256 ff39d3f405e96ca03760eaec76552cf08cfc1cfe28edb1765a8390f209188957

See more details on using hashes here.

File details

Details for the file knowgraph-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: knowgraph-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 295.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for knowgraph-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e82c98e5befa485b4a1dc9027a0aea50ea62ecc32f1521f7e05358814996c30e
MD5 1565acbcacd52e8d06c83f2cb0e6e2c3
BLAKE2b-256 0a6a8bd1e9b1ca97e81f480c32a7f5758b0fa42f0b683c9e3078fdf52d8b579d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page