feat(mcp): add HugeGraph MCP V1 tools and harden guarded writes#368
Open
UIengF wants to merge 4 commits into
Open
feat(mcp): add HugeGraph MCP V1 tools and harden guarded writes#368UIengF wants to merge 4 commits into
UIengF wants to merge 4 commits into
Conversation
imbajin
reviewed
Jun 29, 2026
imbajin
left a comment
Member
There was a problem hiding this comment.
Reviewed the current MCP/client changes at head 8842bb53007102b47d50e4eaabb6e2cc51e9b526. I found several install/runtime safety issues that should be addressed before relying on the new MCP package independently. Local non-live checks passed, so these comments focus on behavioral and packaging gaps rather than test failures.
VGalaxies
reviewed
Jun 29, 2026
VGalaxies
left a comment
Contributor
There was a problem hiding this comment.
Review summary
- Blocking: yes
- Summary: The PR still has blocking correctness and write-safety issues in the new MCP/Thin API surface.
- Evidence:
- static review of
git diff origin/main...HEAD git diff --check origin/main...HEADonly reports the known blank-line style issue
- static review of
added 3 commits
July 11, 2026 13:19
Change-Id: Iaec68dbf134040f94b6fd13cd257d66542d1ae9d
Change-Id: I110718665ecc71910b699baef9d06de104dc17e6
Change-Id: Ia85907918f09080d00f1546efe45040aede06ee2
Change-Id: I39f965b763bf635927d5b00bf8ad6b6295ae1a2d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds
hugegraph-mcp, a FastMCP-based thin adapter for HugeGraph. It provides a stable V1 tool surface for graph inspection, read-only Gremlin, graph extraction, guarded import/delete, schema design and validation, graph queries, and schema-aware property mutations.主要改动
dry_run -> server-issued plan -> confirm:SQLite 持久化签发记录和已消费 nonce,限制 10 分钟 TTL,跨进程防重放,并保证并发确认只有一个成功。execute_gremlin_write_tool明确为唯一 break-glass 例外,只允许隔离且可信的 admin transport 使用。HUGEGRAPH_AI_TOKEN,不再误用 HugeGraph 数据库密码作为 AI Basic Auth。limitconsistently for every operation and return structured validation errors.hugegraph-python-client>=1.7.0;CI 从同一 checkout 构建并隔离安装两个 wheel,校验版本和 graphspace/auth routing。contents: read。Test
uv run ruff format --check .uv run ruff check .git diff --checkuv lock --check480 passed, 11 deselected27 passed333 passed, 5 skipped57 passed, 67 deselected1.7.0write-path suite:11 passedPLAN_ALREADY_USEDand zero additional writes;Commit Structure
feat(mcp): add HugeGraph MCP V1 core and guarded workflowschore(mcp): add V1 tests, docs, skills, and CIfeat(mcp): add and harden P0a graph toolsetfix(mcp): complete remaining defect hardening范围说明
V1 暂不包含 GraphRAG 问答、SQL/表格数据导入、通用图数据 update 和真实 Schema apply。暂不支持的入口继续返回
FEATURE_DISABLED,后续通过独立 PR 实现。要求 HugeGraph Server
>= 1.7.0。