FastMCP server for surgical queries against a vault knowledge graph (NetworkX no

io.github.adelaidasofia由 GitHub 账号 adelaidasofia 发布v0.1.0更新于 Oct 25, 2026

FastMCP server for surgical queries against a vault knowledge graph (NetworkX node-link JSON).…

发布方自己的服务:Fastio

概览

AI 生成的概览

本地 MCP 服务器,一次性加载知识库图谱,并针对节点、邻居、路径和社区回答精准问题。

可以做什么
按名称模糊搜索节点,按完全匹配、前缀匹配、包含匹配排序。探索关联:N 跳内的邻居、概念间最短路径、围绕一组概念的子图。查看单个节点的元数据与主要邻居,或列出其社区聚类中的全部节点。列出图中度数最高的节点。可查询主图谱或次图谱范围。
适用场景
当你已从 Obsidian 或类似知识库生成 graph.json,并希望助手在不把庞大图谱报告读入上下文的情况下回答概念及其关联的具体问题时使用。最好配合能生成 NetworkX node-link JSON 的建图工具。
运行要求
本地 Python 3.10+ 进程,需安装 FastMCP 与 NetworkX,通过 stdio 运行。需要一个 NetworkX node-link JSON 格式的图谱文件,由 GRAPH_JSON_PATH 指定(清单标为必填,README 视为可选并有默认路径)。可通过 SECONDARY_GRAPH_JSON_PATH 配置第二个图谱。无需账号或 API 密钥。
安装前请注意
首次加载时每台机器会向外部站点发送一次匿名安装信号,可用 MYCELIUM_NO_PING=1 关闭。它会读取你指定路径的本地图谱文件,请只指向你愿意让助手看到的数据。查询为只读,不会构建或修改图谱。

安装

在 SourceWeft 中

  1. 打开 控制台中的 FastMCP server for surgical queries against a vault knowledge graph (NetworkX no,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

graph-query-mcp

[License] [GitHub stars] [Last commit] [Open issues] [PyPI version] [PyPI downloads] [Built by Mycelium AI]

Surgical queries against an Obsidian / vault knowledge graph. Loads a graph.json (NetworkX node-link format) once at startup and answers targeted questions without making Claude read a 50K-line graph report.

Designed to pair with graphify (the graph-building skill in ai-brain-starter), but the server accepts any graph in NetworkX node-link JSON. Supports up to two scopes (primary + secondary, e.g. personal + team).

Why use this

If you've already run graphify on a vault, you've got a graph.json and a GRAPH_REPORT.md. Reading the full report into Claude burns thousands of tokens for every question. This MCP loads the graph once at startup, answers in <50ms, and never spills the whole graph into context.

Tools

ToolWhat it does
search_nodes(query, scope, limit)Fuzzy match against node names. Returns node IDs ranked by exact / starts-with / contains.
get_neighbors(node_id, scope, max_hops, limit)Connected nodes within N hops, sorted by degree.
find_path(source, target, scope)Shortest path between two concepts. Auto-fuzzy-matches both ends.
get_top_nodes(scope, n)Highest-degree nodes (the "god nodes").
query_subgraph(concepts, scope, max_hops, limit)Subgraph around a list of concepts; reports node + edge counts.
get_node_info(node_id, scope)Full metadata + top neighbors for one node.
get_community_members(node_id, scope, limit)All nodes in the same community-detection cluster.

Scope defaults to personal; pass scope="onde" (or whatever secondary scope name you've configured) for the second graph.

Configuration

Two env vars, both optional:

Env varDefaultUse for
GRAPH_JSON_PATH~/Documents/Vault/Meta/graphify-out/graph.jsonPrimary graph (the personal scope)
SECONDARY_GRAPH_JSON_PATH~/Documents/Vault/Team/Meta/graphify-out/graph.jsonSecondary graph (the onde scope, historical name)

ONDE_GRAPH_JSON_PATH is also accepted as a backward-compat alias for SECONDARY_GRAPH_JSON_PATH.

If a path doesn't exist at startup, the server logs a warning and the tools return a friendly error when that scope is queried. The server still starts — a missing secondary graph never blocks the primary.

Install

Open Claude Code, paste:

/plugin marketplace add adelaidasofia/graph-query-mcp/plugin install graph-query-mcp@graph-query-mcp
Legacy install
bash
git clone https://github.com/adelaidasofia/graph-query-mcp.git ~/.claude/graph-query-mcpcd ~/.claude/graph-query-mcppip3 install --break-system-packages -r requirements.txt

Register in your project .mcp.json:

json
{  "mcpServers": {    "graph-query": {      "type": "stdio",      "command": "fastmcp",      "args": ["run", "/Users/YOU/.claude/graph-query-mcp/server.py"],      "env": {        "GRAPH_JSON_PATH": "/path/to/your/vault/Meta/graphify-out/graph.json"      }    }  }}

Restart Claude Code, then claude mcp list should show graph-query connected.

Generating the graph

This MCP doesn't build the graph; it queries one. Use graphify (a skill in ai-brain-starter) to produce a graph.json from your vault, or any other NetworkX-compatible builder. The expected format is the output of networkx.node_link_data(G).

Verification

bash
python3 tests/integration/test_smoke.py# expected: PASSED — graph-query-mcp smoke (4 steps green)

Architecture

FastMCP, stdio transport, Python 3.10+. Graphs are loaded once at startup and cached in memory. No daemons, no listeners, no external services. NetworkX in-memory for query primitives.

Related MCPs

Same author, same architecture pattern (FastMCP, draft+confirm on writes where applicable, vault auto-export, MIT):

Telemetry

This plugin sends a single anonymous install signal to myceliumai.co the first time it loads in a Claude Code session on a given machine.

What is sent:

  • Plugin name (e.g. slack-mcp)
  • Plugin version (e.g. 0.1.0)

What is NOT sent:

  • No user identifiers, names, emails, tokens, or API keys
  • No file paths, message content, or anything from your work
  • No IP address is stored after dedup processing

Why: Helps the maintainer know which plugins people actually install, so attention goes to the ones that get used.

Opt out: Set the environment variable MYCELIUM_NO_PING=1 before launching Claude Code. The hook will skip the network call entirely. Already-pinged installs leave a sentinel at ~/.mycelium/onboarded-<plugin> — delete it if you want to reset state.

License

MIT. See LICENSE.

来源:README.md,提交 9d1c461

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Fast 集成