vault-graph-mcp

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.

Category
Visit Server

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 uv or pip.

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:

  1. Exact match on node ID (relative path)
  2. Case-insensitive match on node ID
  3. Last component match (filename without extension)
  4. Title match (from title: frontmatter or H1 heading)
  5. Normalized match (dashes → spaces: sales-order-header ≈ "sales order header")
  6. 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/recall
  • 0.50 — strict, only strong thematic overlap
  • 0 — disable implicit edges entirely

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