شعار GrapeRoot

GrapeRoot

المجتمعشائع
kunal12203

Compounding Context for AI Coding Assistants — MCP graph engine for Claude Code, Cursor, Copilot, Gemini, OpenCode

الناشرkunal12203
المستودعGrapeRoot
اللغةPowerShell
التفريعات
122
النجوم
1K
الأدوات المتاحة
0
نوع نقل البياناتstdio
الترخيصApache-2.0
الروابط
  • اربط الأدوات بسير عمل الذكاء الاصطناعي

    يتيح GrapeRoot إمكانات MCP التي يمكن لتطبيقات الذكاء الاصطناعي العميلة ووكلاء الذكاء الاصطناعي المتوافقة استخدامها.

  • الأدوات المتاحة: 0

    تصفّح الإجراءات القابلة للاستدعاء أدناه، بما في ذلك أسماؤها وأوصافها عندما يوفّرها الخادم.

  • إعدادات جاهزة للنسخ

    استخدم أمثلة إعداد التثبيت لتهيئة هذا الخادم في تطبيق MCP العميل المفضّل لديك.

  • مؤشرات الاهتمام بالمصدر المفتوح

    النجوم: 1K، والنسخ المتفرعة: 122 في المستودع المرتبط.

   

Compounding Context for AI Coding Assistants

PyPI License Platform Discord Stars

Website · Docs · Benchmarks · Discord


🌐 Read this in your language: English · 中文 · Español · हिंदी · Français · Deutsch · 日本語 · 한국어 · Português · Русский · العربية · Türkçe · Bahasa Indonesia


What is GrapeRoot?

GrapeRoot is an open-source launcher that sits between you and your AI coding assistant. It builds a semantic graph of your codebase — files, symbols, imports, call chains — and pre-loads exactly the right code into every prompt before your AI sees it.

The launcher scripts in this repo are Apache 2.0. The graph engine (graperoot pip package) is proprietary.

The result: your AI spends tokens reasoning, not exploring.

You run: dgc /path/to/project
              ↓
1. Project scanned → semantic graph built (files, symbols, imports)
2. You ask a question
3. Graph identifies the relevant files → packs them into context
4. AI gets your question + the right code already loaded
5. Fewer turns, fewer tokens, better answers

Token savings compound across a session. The graph remembers which files were read, edited, and queried — each turn gets cheaper.


Other Tools vs GrapeRoot

Other tools (CodeGraph, code-graph-mcp, and similar) give your AI a graph and let it explore:

You ask a question
  → AI calls search_symbol / get_callers / trace_route
  → AI reads results, decides what else to look up
  → AI calls more tools
  → AI finally has enough context to answer

Your AI spends turns exploring before it can reason.


GrapeRoot pre-loads the right context before your AI sees your question:

You ask a question
  → Graph identifies relevant files automatically
  → Files packed into the prompt
  → AI answers immediately

No exploration. No extra tool calls. Your AI starts reasoning from turn one.


Other toolsGrapeRoot
How context is deliveredAI pulls on demand via tool callsPre-loaded before every turn
Session memoryNoYes — compounds across turns
Token budget controlAI decidesHard-capped per turn
Turns spent exploringMultipleZero
Savings compoundNoYes — each turn gets cheaper

Results

Benchmarked across multiple real-world codebases (7,700+ files) and 50+ engineering prompts:

MetricWithout GrapeRootWith GrapeRoot
Cost per prompt$0.49$0.27
Avg turns per task11.73.5
Avg response time172s124s
Quality (scored)76.6 / 10086.6 / 100
Cost win rate—10 out of 10 prompts

Cost reduction by task type

Task typeCost reduction
Migration & architecture designup to 81%
Performance analysisup to 80%
Testing & test generationup to 76%
Full-stack debuggingup to 73%
Feature developmentup to 71%
Code explanation & auditup to 55%
Large codebase (7k+ files, avg)43% average

Savings compound across a session — a token avoided on turn 3 also skips cache re-billing on every subsequent turn. Quality stays equal or improves on every task type above.

Full benchmark methodology and results: graperoot.dev/benchmarks


Supported AI Tools

ToolCommandStatus
Claude Codedgc✅ Full support
OpenAI Codex CLIdg✅ Full support
Cursorgraperoot . --cursor✅ Full support
Gemini CLIgraperoot . --gemini✅ Full support
OpenCodegraperoot . --opencode / dgo✅ Full support
GitHub Copilotgraperoot . --copilot✅ Full support
OpenClawgraperoot . --openclaw✅ Full support
Kilocodegraperoot . --kilocode✅ Full support
MiMo Codegraperoot . --mimocode✅ Full support
Antigravitygraperoot . --antigravity✅ Full support
Kiro CLIgraperoot . --kiro✅ Full support
Command Codegraperoot . --command-code✅ Full support

Supported Languages

TypeScript · JavaScript · Python · Go · Swift · Rust · Java · Kotlin · Scala · C# · Ruby · PHP


Install

macOS / Linux:

bash
curl -sSL https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.sh | bash
source ~/.zshrc   # or ~/.bashrc / ~/.profile

Windows (PowerShell):

powershell
irm https://raw.githubusercontent.com/kunal12203/Codex-CLI-Compact/main/install.ps1 | iex

Windows (Scoop):

powershell
scoop bucket add dual-graph https://github.com/kunal12203/scoop-dual-graph
scoop install dual-graph

Prerequisites: Python 3.10+, Node.js 18+, and one of the supported AI tools. The installer detects missing tools and offers to install them automatically.


Usage

Important: Always use dgc (not claude directly) to ensure the MCP server is running.

Claude Code

bash
dgc                                      # scan current directory, launch Claude
dgc /path/to/project                     # scan a specific project
dgc /path/to/project "fix the login bug" # start with a prompt

OpenAI Codex CLI

bash
dg                              # scan current directory
dg /path/to/project             # scan a specific project
dg /path/to/project "add tests" # start with a prompt

MiniMax

Set MINIMAX_API_KEY, then select either supported model: MiniMax-M3 or MiniMax-M2.7. The minimax alias uses MiniMax-M3.

bash
export MINIMAX_API_KEY="your-api-key"
dg --model=minimax /path/to/project
dg --model=minimax-m3 /path/to/project
dg --model=minimax-m2.7 /path/to/project

MINIMAX_REGION selects the endpoint region and defaults to global_en. MINIMAX_API_MODE selects the compatible API mode and defaults to openai; set it to anthropic to use the Anthropic-compatible endpoint. The launcher uses a 1,000,000-token context window for MiniMax-M3 and a 204,800-token context window for MiniMax-M2.7.

RegionOpenAI-compatible base URLAnthropic-compatible base URL
global_enhttps://api.minimax.io/v1https://api.minimax.io/anthropic
cn_zhhttps://api.minimaxi.com/v1https://api.minimaxi.com/anthropic
bash
MINIMAX_REGION=cn_zh dg --model=minimax-m3 /path/to/project
MINIMAX_API_MODE=anthropic dgc --model=minimax-m2.7 /path/to/project

Interactive Picker (new in v3.9.99)

bash
graperoot          # shows directory confirm + arrow-key tool picker
graperoot .        # same, picks from current directory
graperoot --version   # print current version
graperoot --update    # force self-update

OpenCode

bash
dgo                             # scan current directory
dgo /path/to/project            # scan a specific project
dgo /path/to/project "refactor" # start with a prompt

All Tools via graperoot

bash
graperoot . --cursor          # Cursor
graperoot . --gemini          # Gemini CLI
graperoot . --opencode        # OpenCode
graperoot . --copilot         # GitHub Copilot
graperoot . --openclaw        # OpenClaw
graperoot . --kilocode        # Kilocode
graperoot . --mimocode        # MiMo Code
graperoot . --kiro            # Kiro CLI
graperoot . --command-code    # Command Code
graperoot /path --gemini "add tests"   # specific project + prompt

Windows

powershell
dgc .                          # from inside the project directory
dgc "D:\projects\my-app"       # any drive, any path
dg "C:\work\backend"           # Codex CLI
dgc --gemini "D:\projects\app" # Gemini CLI on Windows

How It Works

  1. Graph scan — on first run, GrapeRoot extracts files, functions, classes, and import relationships into a local graph stored in .dual-graph/.
  2. Context retrieval — each time you ask a question, the graph ranks the most relevant files and packs them into the prompt before your AI sees it.
  3. Session memory — files you've read, edited, or queried are weighted higher in future turns. Context compounds.
  4. MCP tools — your AI can still drill deeper via graph-aware tools (graph_read, graph_retrieve, graph_neighbors) when it needs to explore.

All processing is local. No code leaves your machine.


Data & Files

All data lives in <project>/.dual-graph/ (auto-added to .gitignore):

FileDescription
info_graph.jsonSemantic graph: files, symbols, edges
chat_action_graph.jsonSession memory: reads, edits, queries
context-store.jsonPersistent decisions/tasks/facts across sessions

Global install at ~/.dual-graph/:

FileDescription
dgc.ps1 / dg.ps1Launcher scripts (auto-updated)
venv/Python virtual environment
version.txtInstalled version

Configuration

All optional, via environment variables:

VariableDefaultDescription
DG_HARD_MAX_READ_CHARS4000Max characters per file read
DG_TURN_READ_BUDGET_CHARS18000Total read budget per turn
DG_FALLBACK_MAX_CALLS_PER_TURN1Max fallback grep calls per turn
DG_RETRIEVE_CACHE_TTL_SEC900Retrieval cache TTL (15 min)
DG_MCP_PORTauto (8080–8099)Force a specific MCP server port

Self-Update

The launcher checks for updates on every run and auto-updates silently. To force an update:

bash
graperoot --update

To disable auto-update (shows a notice instead):

bash
graperoot --no-auto-update

To re-enable:

bash
graperoot --auto-update

Current version: 3.10.19


Telemetry

GrapeRoot collects anonymous crash reports to help us fix bugs. What's sent:

  • Error type and which step failed (e.g. "scan", "mcp start")
  • OS and Python version
  • GrapeRoot version

What's never sent: your code, file paths, project names, prompts, or any personal data.

Telemetry is on by default. To opt out:

bash
graperoot --no-telemetry    # disable
graperoot --telemetry       # re-enable

Troubleshooting

"MCP Server Connection Failed"

Always use dgc instead of claude directly. dgc starts the MCP server automatically.

bash
# Fix:
claude mcp remove dual-graph
dgc   # re-registers everything

Full troubleshooting guide

See TROUBLESHOOTING.md or graperoot.dev/docs.


Contributing

The launcher scripts (bin/) are open source under Apache 2.0. PRs welcome — bug fixes, new AI assistant support, install improvements, docs.

Note: The graph engine (graperoot pip package) is proprietary. The launchers and tooling in this repo are fully open source.


Community

Have a question, found a bug, or want to share feedback?

Join the Discord →


Star History


License

Launcher scripts and tooling in this repository: Apache License 2.0

The graperoot graph engine (PyPI): proprietary. See graperoot.dev.


Made with ❤️ · graperoot.dev · Discord

استخدم MCP الخاص بـ GrapeRoot مع نماذج ذكاء اصطناعي متعددة

يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا بمجرد توصيل GrapeRoot، يمكنك استخدامه مع نماذج ذكاء اصطناعي مختلفة في TypingMind بدلًا من إعداده لكل نموذج على حدة. يعمل تكامل MCP هذا محليًا عبر موصل MCP الخاص بـ TypingMind على جهازك.

دليل الإعداد لاستخدام الموصل المحلي

استخدم هذا الخيار عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات أو موارد خاصة على جهاز الكمبيوتر لديك.

1

فتح إعدادات MCP

في TypingMind، انتقل إلى «الإعدادات»، ثم «الإعدادات المتقدمة»، ثم «بروتوكول سياق النموذج»، واختر «إعداد الموصل».

  1. افتح TypingMind في متصفحك.
  2. انقر على أيقونة الإعدادات.
  3. انتقل إلى الإعدادات المتقدمة.
  4. افتح قسم بروتوكول سياق النموذج.
  5. انقر على «إعداد الموصل» واختر «هذا الجهاز».
شاشة إعداد موصل MCP في TypingMind مع تحديد «هذا الجهاز»
2

تنفيذ أمر الموصل

اختر «هذا الجهاز»، وانسخ الأمر من TypingMind وشغّله في Terminal. أبقِ العملية قيد التشغيل أثناء استخدام MCP.

  1. انسخ أمر الإعداد الذي يعرضه TypingMind.
  2. افتح Terminal على macOS أو Windows Terminal على Windows.
  3. الصق الأمر ونفّذه.
  4. وافق على تثبيت الحزمة إذا طلب منك Terminal تأكيد المتابعة.
  5. أبقِ نافذة Terminal والعملية التي تعمل فيها قيد التشغيل أثناء استخدام أدوات MCP.
3

أضف GrapeRoot كخادم

عندما تظهر حالة الموصل «جاهز»، انقر على «تعديل الخوادم» والصق إعدادات خادم MCP.

  1. انتظر حتى تظهر حالة الموصل «جاهز».
  2. انقر على «تعديل الخوادم».
  3. الصق إعدادات خادم MCP الخاص بـ GrapeRoot.
  4. احفظ قائمة الخوادم.
  5. حدّث الحالة إذا أردت التأكد من أن الموصل لا يزال جاهزًا.
إعدادات MCP في TypingMind تعرض خادمًا نشطًا وزر «تعديل الخوادم»
{
  "mcpServers": {
    "graperoot": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

استخدام الاتصال مع نماذج مختلفة

احفظ قائمة الخوادم، وافتح «الإضافات»، وفعّل أدوات MCP الخاصة بـ GrapeRoot، ثم اختر أي نموذج ذكاء اصطناعي مدعوم في TypingMind واستخدم الأدوات في المحادثة أو أسندها إلى وكيل ذكاء اصطناعي.

  1. افتح صفحة الإضافات في TypingMind.
  2. فعّل أدوات MCP الخاصة بـ GrapeRoot.
  3. ابدأ محادثة واختر نموذج الذكاء الاصطناعي الذي تريد استخدامه.
  4. استخدم أدوات MCP في المحادثة أو عيّنها لوكيل ذكاء اصطناعي.
  5. انتقل إلى نموذج ذكاء اصطناعي آخر عند الحاجة دون إعادة الاتصال بـ MCP.
محادثة في TypingMind تستخدم أدوات MCP المفعّلة مع نموذج ذكاء اصطناعي محدّد
هل يمكنك استخدام GrapeRoot لمساعدتي في هذه المهمة؟
GrapeRoot
بالتأكيد. قرأته.
إليك ما وجدته باستخدام GrapeRoot.

الأسئلة الشائعة

ما استخدامات خادم MCP GrapeRoot؟

GrapeRoot هو خادم MCP يتيح لتطبيقات الذكاء الاصطناعي المتوافقة الاتصال بأدوات ومصادر سياق خارجية. في TypingMind، يمكنك إضافة خادم MCP هذا مرة واحدة وإتاحة أدواته في مساحة عملك للذكاء الاصطناعي.

هل يمكنني استخدام خادم MCP GrapeRoot مع نماذج ذكاء اصطناعي متعددة في TypingMind؟

نعم. يربط TypingMind أدوات MCP على مستوى مساحة العمل، لذا يمكنك استخدام GrapeRoot مع نماذج ذكاء اصطناعي مختلفة مثل Claude أو ChatGPT أو Gemini أو غيرها من النماذج التي أعددتها في TypingMind، دون إعداد خادم MCP لكل نموذج على حدة.

لماذا تستخدم موصل MCP GrapeRoot مع TypingMind؟

يُعد TypingMind من أفضل واجهات المحادثة مع النماذج اللغوية الكبيرة، إذ يجمع نماذج ذكاء اصطناعي متعددة ومطالبات وإضافات ووكلاء ذكاء اصطناعي ومفاتيح API وأدوات MCP في مساحة عمل واحدة. بعد توصيل GrapeRoot، يمكنك استخدام أدوات MCP الخاصة به عبر نماذجك المفضلة مع الحفاظ على سير عمل محادثاتك منظمًا في TypingMind.

كيف أوصّل خادم MCP GrapeRoot بـ TypingMind؟

يعمل GrapeRoot عبر موصل MCP المحلي في TypingMind. هذا هو الخيار الأنسب عندما يحتاج خادم MCP إلى الوصول إلى ملفات محلية أو تطبيقات سطح المكتب أو أدوات سطر الأوامر أو موارد خاصة على حاسوبك.

ما الأدوات التي يوفّرها خادم MCP GrapeRoot في TypingMind؟

يتيح GrapeRoot إمكانات MCP يمكنك تفعيلها من صفحة الإضافات في TypingMind واستخدامها في المحادثات أو تعيينها لوكلاء ذكاء اصطناعي.

هل أحتاج إلى مشاركة مفاتيح API الخاصة بي مع TypingMind لاستخدام خادم MCP GrapeRoot؟

لا. يعطي TypingMind الأولوية للعمل المحلي ويُبقي مزوّدي النماذج ومفاتيح API والمطالبات وإعدادات MCP تحت تحكمك. إذا كان GrapeRoot يتطلب مصادقة، فأضف الترويسات أو إعدادات OAuth أو الإعدادات المحلية المطلوبة لخادم MCP هذا عند إنشاء الاتصال.

خوادم MCP ذات صلة

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇