vault-graph-mcp
Enables AI agents to explore and analyze a markdown vault as a traversable knowledge graph, with tools for searching, traversing, and finding implicit semantic connections between notes.
README
vault-graph-mcp
MCP server that exposes a markdown vault as a traversable knowledge graph via NetworkX. Runs on Windows, macOS, Linux — zero compilation, just
uvorpip.
What it does
- Walks your vault, parses
[[wikilinks]]AND[text](path.md)links - Builds a directed NetworkX graph with typed edges (wikilink, mdlink, backlink, implicit)
- Implicit edges: Uses sentence-transformers embeddings to find semantically similar notes that were NEVER explicitly linked — the author's blind spots become visible
- Exposes 9 MCP tools for AI agents:
| Tool | Description |
|---|---|
vault_search |
Search notes by title, path, or tag |
vault_read |
Read full markdown content of a note |
vault_neighbors |
Direct neighbors with multi-hop depth |
vault_backlinks |
All notes linking TO a target note |
vault_traverse |
DFS tree walk from a starting note |
vault_path |
Shortest path(s) between two notes |
vault_list |
List notes filtered by folder or tag |
vault_stats |
Graph stats, top connected, orphans, implicit edge metrics |
vault_similar |
Find semantically similar notes (implicit connections via embeddings) |
Quick Start (Windows)
1. Install uv (if you don't have it)
winget install --id=astral-sh.uv
2. Clone the repo
git clone https://github.com/ReneRichartz/vault-graph-mcp.git
cd vault-graph-mcp
3. Install
pip install -e .
Or with uv (recommended):
uv pip install -e .
4. VS Code MCP Configuration
Create .vscode/mcp.json in your workspace:
{
"servers": {
"vault-graph": {
"type": "stdio",
"command": "uvx",
"args": [
"--from", "C:\\Users\\rene\\vault-graph-mcp",
"vault-graph-mcp"
],
"env": {
"VAULT_GRAPH_PATH": "C:\\Users\\rene\\mein-fscm-vault",
"VAULT_IMPLICIT_THRESHOLD": "0.35"
}
}
}
}
Alternatively, if installed via pip:
{
"servers": {
"vault-graph": {
"type": "stdio",
"command": "python",
"args": ["-m", "vault_graph_mcp.server"],
"env": {
"VAULT_GRAPH_PATH": "C:\\Users\\rene\\mein-fscm-vault",
"VAULT_IMPLICIT_THRESHOLD": "0.35"
}
}
}
}
VS Code will auto-detect the server and offer to start it.
5. Use in VS Code Agent Chat
Switch to Agent Mode (Ctrl+Shift+I, then select "Agent") and ask:
"Search my vault for sales order entities and show me their dependencies."
"What notes link to the Pricing Engine?"
"Find the shortest path between Customer Master and Inventory Reservation."
"What notes are similar to my microbiome article — even if I never linked them?"
Environment Variables
| Variable | Description | Default |
|---|---|---|
VAULT_GRAPH_PATH |
Absolute path to your markdown vault root | . (current dir) |
VAULT_IMPLICIT_THRESHOLD |
Cosine similarity threshold for implicit edges (0.0–1.0). Set to 0 to disable. |
0.35 |
Architecture
vault-graph-mcp/
├── pyproject.toml
└── src/vault_graph_mcp/
├── __init__.py
├── parser.py # Link extraction: [[wikilinks]] + [text](path.md)
├── graph.py # NetworkX builder (4 phases, incl. implicit)
├── implicit.py # Semantic similarity via sentence-transformers
└── server.py # MCP server (9 tools)
Link Resolution
The resolver matches link targets to graph nodes in this order:
- Exact match on node ID (relative path)
- Case-insensitive match on node ID
- Last component match (filename without extension)
- Title match (from
title:frontmatter or H1 heading) - Normalized match (dashes → spaces:
sales-order-header≈ "sales order header") - Substring match (target appears anywhere in node ID)
This means your Microsoft Learn-style [text](path.md) links resolve correctly without any conversion to wikilinks.
Implicit Edges
Phase 4 of the graph builder uses sentence-transformers/all-MiniLM-L6-v2 to embed every note and compute pairwise cosine similarity. Pairs above VAULT_IMPLICIT_THRESHOLD become bidirectional implicit edges with a weight attribute.
Example: In a vault with no links between "Schottland Mobile Home Parks" and "Golfplatz-Vergleich", the embedder finds them at sim=0.41 because both discuss Scottish locations — a connection the author never wrote down.
Tune the threshold:
0.30— loose, finds more connections (good for exploration)0.35— default, balanced precision/recall0.50— strict, only strong thematic overlap0— disable implicit edges entirely
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.