vault-map

vault-map

MCP server that provides a navigable map of an Obsidian vault for coding agents, with tools to outline notes, fetch sections, query frontmatter, and grep content, reducing token usage compared to reading whole notes.

Category
Visit Server

README

vault-map

A navigable map of your Obsidian vault for coding agents (MCP server). Skeletons of your notes — headings with line ranges, queryable frontmatter, outgoing links — so the agent stops loading whole notes just to find its way around.

It is the markdown counterpart of repo-map (which does the same for source code).

Why

An agent that reads a 2 500-line note to answer one question burns ~49 000 tokens. With outline() + get_section() it reads the table of contents and the one chapter it needs: ~5 200 tokens — an 89 % cut, measured on a real vault (python _smoke.py <vault> reproduces the measurement on yours).

The point isn't only cost: an agent that can afford to look around actually looks around, instead of answering from memory.

Tools

Tool What it gives you
vault_map() whole-vault map: folder, key frontmatter, H2 titles, outgoing links
outline(note) one note's heading tree with line numbers — call this before reading
get_section(note, title) the body of a single section, nothing else
query(filter) filter notes by frontmatter without opening them (status:draft, score>5)
grep_notes(pattern) regex search through note text, each hit located as note › section (Ln)
index(path) (re)target the server at another vault / folder of .md files

query also understands two pseudo-fields for finding a note by name: title:<word> and path:<folder>.

Freshness is automatic: the map is rebuilt whenever a note changes (signature = aggregated mtime + size), so an outline never lies. A stale outline is worse than an honest read.

Requirements

Python 3.10+. One dependency (mcp) — the engine itself is pure stdlib.

Install

git clone https://github.com/noambinabout-boop/vault-map.git
cd vault-map
python -m venv .venv
.venv/Scripts/pip install -r requirements.txt     # Windows
# .venv/bin/pip install -r requirements.txt       # macOS / Linux

Then register it with your agent. For Claude Code, from anywhere:

# Windows
claude mcp add vault-map --scope user -- C:\path\to\vault-map\.venv\Scripts\python.exe C:\path\to\vault-map\server.py

# macOS / Linux
claude mcp add vault-map --scope user -- /path/to/vault-map/.venv/bin/python /path/to/vault-map/server.py

Check with /mcp inside Claude Code. Any MCP-capable client works the same way — it is a plain stdio server: <python> server.py.

Point it at your vault

By default the server targets the current working directory. Two ways to change that:

  • Per call: index("/path/to/vault") — retargets on the fly.
  • Always the same vault, whatever project you launched the agent in: set VAULT_MAP_TARGET. In ~/.claude.json, on the server entry:
"vault-map": {
  "type": "stdio",
  "command": "C:\\path\\to\\vault-map\\.venv\\Scripts\\python.exe",
  "args": ["C:\\path\\to\\vault-map\\server.py"],
  "env": {
    "VAULT_MAP_TARGET": "C:\\path\\to\\your\\vault",
    "PYTHONIOENCODING": "utf-8"
  }
}

On Windows, PYTHONIOENCODING: utf-8 avoids a crash when a note contains an emoji.

Make the agent actually use it

Tools nobody calls save nothing. Put the reflex in your CLAUDE.md (or equivalent):

To find your way around the vault, use vault-map, not Read:
1. vault_map() for the big picture, query(filter) to filter by frontmatter
2. outline(note) before opening any note
3. get_section(note, title) to read only the part that matters
4. grep_notes(pattern) to search by content
Raw Grep/Read: last resort only.

If your client defers tool schemas, mark the server "alwaysLoad": true so the tools are there from the first message.

Verify your install

python _handshake.py            # full MCP stdio round-trip
python _smoke.py <your-vault>   # builds the map and prints the token saving

License

MIT

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