graph-query-mcp

graph-query-mcp

Enables fast, targeted queries against an Obsidian vault knowledge graph using tools like search, neighbor traversal, and pathfinding, without needing to load the full graph into LLM context.

Category
Visit Server

README

graph-query-mcp

<!-- mycelium-badges:start -->

<p> <a href="https://github.com/adelaidasofia/graph-query-mcp/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/adelaidasofia/graph-query-mcp?color=blue"></a> <a href="https://github.com/adelaidasofia/graph-query-mcp/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/adelaidasofia/graph-query-mcp?color=eab308"></a> <a href="https://github.com/adelaidasofia/graph-query-mcp/commits/main"><img alt="Last commit" src="https://img.shields.io/github/last-commit/adelaidasofia/graph-query-mcp"></a> <a href="https://github.com/adelaidasofia/graph-query-mcp/issues"><img alt="Open issues" src="https://img.shields.io/github/issues/adelaidasofia/graph-query-mcp"></a> <a href="https://pypi.org/project/adelaidasofia-graph-query-mcp/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/adelaidasofia-graph-query-mcp?color=blue&label=pypi"></a> <a href="https://pypi.org/project/adelaidasofia-graph-query-mcp/"><img alt="PyPI downloads" src="https://img.shields.io/pypi/dm/adelaidasofia-graph-query-mcp?color=blue&label=downloads"></a> <a href="https://myceliumai.co"><img alt="Built by Mycelium AI" src="https://img.shields.io/badge/built_by-Mycelium_AI-15B89A"></a> </p>

<!-- mycelium-badges:end -->

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

Tool What 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 var Default Use for
GRAPH_JSON_PATH ~/Documents/Vault/Meta/graphify-out/graph.json Primary graph (the personal scope)
SECONDARY_GRAPH_JSON_PATH ~/Documents/Vault/Team/Meta/graphify-out/graph.json Secondary 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

<details><summary>Legacy install</summary>

git clone https://github.com/adelaidasofia/graph-query-mcp.git ~/.claude/graph-query-mcp
cd ~/.claude/graph-query-mcp
pip3 install --break-system-packages -r requirements.txt

Register in your project .mcp.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.

</details>

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

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured