setup-kgrag-mcp
KGRAG - KnowledgeGraph RAG
Install / Use
npx skills add Flux-Frontiers/KGRAGInstalls into whichever agent you are using.
Claude Commands
Claude Code slash commands
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of setup-kgrag-mcp
setup-kgrag-mcp scores 58/100 on our quality scale, 4123rd of 4,592 Development & Engineering skills we index.
Its Claude Commands is 9.5 KB long, well organised into 16 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- We could not determine when the repository was last updated.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
setup-kgrag-mcp compared with similar skills
All 4 of these similar skills score higher than setup-kgrag-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| setup-kgrag-mcp (this skill)by Flux-Frontiers | 58 | 0 | — | Claude Commands |
| claude-memby thedotmack | 100 | 103.3k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 102.9k | 1d ago | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 102.7k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 88.3k | today | CLAUDE.md |
Frequently asked questions
- How do I install setup-kgrag-mcp?
- Run
npx skills add Flux-Frontiers/KGRAG. The install tabs above show the steps for each supported agent. - Which AI agents does setup-kgrag-mcp work with?
- It is written for Claude Code, as a Claude Commands file. Other agents that read the same format can often use it too.
- Is setup-kgrag-mcp safe to use?
- It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is setup-kgrag-mcp still maintained?
- We could not determine when the repository was last updated.
Skill content
View source on GitHubKGRAG MCP Setup & Verification
Set up the KGRAG MCP server, register a target repository, and configure it for use with Claude Code and/or Claude Desktop. Execute the following steps in sequence.
Command Argument Handling
This command accepts an optional repository path argument:
Usage:
/setup-kgrag-mcp— Interactive mode; prompts for the target repository path/setup-kgrag-mcp /path/to/repo— Register and configure the specified repository
Step 0: Resolve the Target Repository
- If a path argument was provided, use it as
REPO_ROOT. - If no argument was provided, ask the user:
"Which repository do you want to register with KGRAG? Please provide the absolute path."
- Verify the path exists and is a directory:
ls "$REPO_ROOT" - If the path does not exist, stop and report the issue.
Step 1: Verify KGRAG Installation
Prefer poetry run for all CLI calls. If poetry run fails with a Python version
conflict (e.g. "Current Python version is not allowed by the project"), fall back to
the .venv binaries directly — they are already built against the correct interpreter.
Establish the runner upfront:
# Try poetry run first
poetry run kgrag --version 2>&1
If that prints a version, set RUNNER="poetry run". If it errors with a Python version
conflict, set RUNNER="" and use .venv/bin/kgrag directly for all subsequent calls:
# Fallback — use .venv binaries directly
$REPO_ROOT/.venv/bin/kgrag --version
Use whichever runner succeeds for all remaining steps. Document which runner was used in the final report.
-
Check that the
kgragentry point resolves:$RUNNER kgrag --version # or $REPO_ROOT/.venv/bin/kgrag --version -
If not found, check whether the package is installed:
$RUNNER python -m pip show kg-rag 2>/dev/null # or .venv/bin/pip show kg-rag -
If missing, instruct the user to install it:
poetry add "kg-rag @ git+https://github.com/Flux-Frontiers/KGRAG.git"Then stop — the user must install before continuing.
-
Confirm the
mcpPython package is importable (it is a required dependency, not an optional extra):$RUNNER python -c "import mcp; print('mcp OK')"If this fails, run
poetry installand retry. There is no[mcp]extra to add. -
Check the KGRAG version:
$RUNNER python -c "import kg_rag; print(kg_rag.__version__)"
Step 2: Run kgrag init on the Target Repository
kgrag init auto-detects applicable KG layers (code, doc), builds each one using the
appropriate backend CLI (codekg build / dockg build), and registers the results.
-
Check whether KG databases already exist:
ls "$REPO_ROOT/.codekg" 2>/dev/null ls "$REPO_ROOT/.dockg" 2>/dev/null -
If they exist, ask the user:
"KG databases already exist for this repository. Rebuild from scratch (--wipe), or re-register the existing databases without rebuilding?"
- Wipe: proceed with
--wipe - Re-register only: skip to Step 3
- Wipe: proceed with
-
Run
kgrag init:poetry run kgrag init "$REPO_ROOT" --wipeTo force specific layers only:
poetry run kgrag init "$REPO_ROOT" --layer code --layer doc --wipe -
Review the summary table printed by the command. Each layer should show status
registered. -
If a layer shows
skipped(backend CLI not on PATH), warn the user:- Missing
codekg: install code-kg (poetry add "code-kg @ git+https://github.com/Flux-Frontiers/code_kg.git") - Missing
dockg: install doc-kg (poetry add "doc-kg @ git+https://github.com/Flux-Frontiers/doc_kg.git")
- Missing
Step 3: Smoke-Test the Registry
Confirm that the layers were registered successfully:
-
List all registered KGs:
poetry run kgrag listEach registered layer should appear with
built: true. -
Run a quick stats check:
poetry run python -c " from kg_rag import KGRegistry with KGRegistry() as reg: s = reg.stats() print(f'total={s.total} built={s.built} by_kind={s.by_kind}') " -
If
builtis 0 or a layer showsbuilt: false, the database was not created. Re-runkgrag initwith--wipeand inspect the build output for errors.
Step 4: Configure MCP Clients
Configure .mcp.json (Claude Code / Kilo Code), .vscode/mcp.json (GitHub Copilot),
and claude_desktop_config.json (Claude Desktop) as applicable.
The KGRAG MCP server is started with kgrag mcp. It reads the registry automatically —
no --repo or --db flag is needed unless a non-default registry path is used.
MCP config by agent — quick reference
| Agent | Config file | Per-repo? | Key name |
|-------|-------------|-----------|----------|
| GitHub Copilot | .vscode/mcp.json | ✅ Yes | "servers" |
| Kilo Code | .mcp.json (project root) | ✅ Yes | "mcpServers" |
| Claude Code | .mcp.json (project root) | ✅ Yes | "mcpServers" |
| Cline | ~/...saoudrizwan.claude-dev/settings/cline_mcp_settings.json | ❌ Global only | "mcpServers" |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json | ❌ Global only | "mcpServers" |
4a: Kilo Code / Claude Code (.mcp.json)
-
Check if
.mcp.jsonexists in$REPO_ROOT:cat "$REPO_ROOT/.mcp.json" 2>/dev/null -
If a
kgragentry already exists, ask the user to replace or keep it. -
The
kgragentry to add/update:"kgrag": { "command": "<venv_path>/bin/kgrag", "args": ["mcp"] }Get
<venv_path>with:poetry env info --path -
To use a non-default registry, add
--db:"kgrag": { "command": "<venv_path>/bin/kgrag", "args": ["mcp", "--db", "/abs/path/to/registry.sqlite"] } -
Merge into the existing
mcpServersobject — do not overwrite other entries.
4b: GitHub Copilot (.vscode/mcp.json)
Note: uses "servers" key and requires "type": "stdio".
-
Check if
.vscode/mcp.jsonexists:cat "$REPO_ROOT/.vscode/mcp.json" 2>/dev/null -
The
kgragentry to add/update:{ "servers": { "kgrag": { "type": "stdio", "command": "<venv_path>/bin/kgrag", "args": ["mcp"] } } } -
Merge into the existing
serversobject. After saving, VS Code will prompt to Trust the server.
4c: Claude Desktop (claude_desktop_config.json)
Claude Desktop does not have Poetry on its PATH — use the absolute venv binary.
-
Config path:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Get the venv binary path:
poetry env info --path # binary: <venv_path>/bin/kgrag -
The
kgragentry to add/update:"kgrag": { "command": "<venv_path>/bin/kgrag", "args": ["mcp"] } -
Merge into the existing
mcpServersobject — do not overwrite other entries.
Step 5: Final Report
Present a summary of everything that was done:
✓ KGRAG version: <version>
✓ Repository: <REPO_ROOT>
✓ KG layers registered: <list of name/kind pairs>
✓ Registry stats: total=<N> built=<N>
✓ Smoke test: passed
✓ Claude Code config: <REPO_ROOT>/.mcp.json (kgrag entry)
✓ Claude Desktop config: <CONFIG_PATH> (kgrag entry)
Restart Claude Code / Claude Desktop to activate the kgrag MCP server.
Available tools once active:
• stats() — registry summary (total KGs, built status)
• list_kgs([kind]) — list registered KGs, optionally filtered by kind
• kg_info(name) — full detail for a single registered KG
• query(q, [k, kinds]) — federated semantic query across all registered KGs
• pack(q, [k, kinds]) — federated snippet pack for LLM context
Suggested first query after restart:
stats()
Important Rules
- Do NOT modify source files in the target repository.
- Do NOT run
git commitor any destructive git operations. - Use absolute paths everywhere — relative paths will break MCP clients.
- Prefer
poetry runfor CLI calls; fall back to.venv/bin/kgragif Poetry reports a Python version conflict. mcpis a required main dependency of KGRAG — there is no[mcp]extra to add.- If any step fails, stop and report the error clearly before proceeding.
| Error | Fix |
|-------|-----|
| Current Python version is not allowed by the project | Use .venv/bin/kgrag directly instead of poetry run kgrag |
| kgrag: command not found | Run poetry install; if venv exists use .venv/bin/kgrag |
| ModuleNotFoundError: No module named 'mcp' | Run poetry install — mcp is a required dep, not an extra |
| Layer shows built: false after kgrag list | Re-run kgrag init "$REPO_ROOT" --wipe and check build output |
| kgrag mcp server not appearing in Claude Code | Use absolute venv path in .mcp.json; restart Claude Code |
Re-registering After Rebuilding KGs
When the underlying CodeKG or DocKG databases are rebuilt, re-run kgrag init to
refresh the registry entries (sqlite/vectors paths are re-verified):
$RUNNER kgrag init "$REPO_ROOT" # or $REPO_ROOT/.venv/bin/kgrag init "$REPO_ROOT"
Add --wipe to also rebuild the KG databases from scratch:
$RUNNER kgrag init "$REPO_ROOT" --wipe
The MCP client configs do not need to change — they point to the shared registry, not to individual database files.
Related Skills
claude-mem
103.3kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
102.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
taste-skill
102.7kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Understand-Anything
88.3kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
