Skip to main content
Glama
obsidian-vault-mcp

obsidian-vault-mcp

by TOMO0904

obsidian-vault-mcp

CI License: MIT Python

A small, read-only MCP server that lets any MCP-compatible chat AI (Claude Desktop, OpenMausBot, etc.) read your Obsidian vault: search notes, fetch a note's content, and list its [[internal links]].

  • 日本語: README.ja.md

  • Read-only by design: the server never writes to or deletes from the vault.

  • Local-first: vault content goes only to the MCP client that asked. Nothing is sent anywhere else.

  • Respects the vault's own AGENTS.md rule: 90_System/Indexes/catalog.jsonl is searched before broad note reads.

Table of contents

Related MCP server: Recalla

Quick start

pip install .                                   # or: pip install obsidian-vault-mcp from PyPI
export OBSIDIAN_VAULT_PATH="/path/to/your/Obsidian Vault"
# Windows: set OBSIDIAN_VAULT_PATH=C:\Users\you\Documents\Obsidian Vault

Register the server in your MCP client (template: examples/mcp_client_config.example.json):

{
  "mcpServers": {
    "obsidian-vault": {
      "command": "obsidian-vault-mcp",
      "args": [],
      "env": { "OBSIDIAN_VAULT_PATH": "/path/to/your/Obsidian Vault" }
    }
  }
}

Then just ask the AI, e.g. "search my vault for X" — the catalog index is searched first, per the vault's AGENTS.md.

Tools

Tool

Description

search_catalog(query, limit)

Search the vault index 90_System/Indexes/catalog.jsonl (searched first, per the vault's AGENTS.md).

search_notes(query, limit)

Catalog hits first, then full-text search over note paths/contents with snippets.

get_note(path, max_chars)

Read one note (path relative to the vault root). Path escapes outside the vault are rejected.

list_links(path)

List the [[internal links]] of a note (target + optional alias).

list_notes()

List all markdown notes in the vault.

Install

python -m venv .venv
.venv/Scripts/pip install -r requirements.txt        # Windows
# .venv/bin/pip install -r requirements.txt          # macOS / Linux
# for development (tests): pip install -r requirements-dev.txt

Or install the package directly: pip install . (provides the obsidian-vault-mcp command). Requires Python 3.10+.

Configure an MCP client

Point your client at the server and set the vault path via the OBSIDIAN_VAULT_PATH environment variable (or pass --vault PATH).

Example (Claude Desktop style mcpServers config) — a ready-to-edit copy lives in examples/mcp_client_config.example.json:

{
  "mcpServers": {
    "obsidian-vault": {
      "command": "obsidian-vault-mcp",
      "args": ["--vault", "C:/Users/you/Documents/Obsidian Vault"],
      "env": { "OBSIDIAN_VAULT_PATH": "C:/Users/you/Documents/Obsidian Vault" }
    }
  }
}

Run standalone for a manual smoke test (stdio, JSON-RPC):

obsidian-vault-mcp --vault "C:/Users/you/Documents/Obsidian Vault"

Examples

Tests and CI

pip install .[dev]
python -m pytest -q

Covers the vault layer (catalog-first search, path-escape rejection, link extraction) and an end-to-end stdio MCP handshake (initialize, tools/list, tools/call) against a temporary vault. GitHub Actions runs the same suite on every push/PR across Python 3.10-3.13 (see the CI badge above).

Known limitations

  • Automated tests cover the vault layer and the stdio JSON-RPC handshake. Connecting from a real desktop MCP client and long-running sessions have not been verified yet.

  • If 90_System/Indexes/catalog.jsonl does not exist, catalog search returns an empty list; full note search still works.

  • get_note truncates content at 20,000 characters by default (override with max_chars).

  • Hidden folders/files (names starting with .) are skipped when listing and searching notes.

  • Read-only by design: there are no write tools at all.

Layout

obsidian-vault-mcp/
├── .github/workflows/test.yml      # CI (pytest on Python 3.10-3.13)
├── examples/                       # sample MCP client config (no secrets)
├── src/obsidian_vault_mcp/
│   ├── vault.py     # read-only vault access (stdlib only, unit-testable)
│   └── server.py    # MCP (FastMCP) stdio server exposing the tools
├── tests/
│   ├── test_vault.py        # unit tests
│   ├── test_vault_paths.py  # path-traversal rejection tests
│   └── test_server_stdio.py # end-to-end MCP-over-stdio smoke test
├── LICENSE  CHANGELOG.md  pyproject.toml
├── README.md  README.ja.md
└── requirements.txt / requirements-dev.txt

Security notes

  • Read-only: no tool can create, modify, or delete vault files.

  • Path traversal guard: any path resolving outside the vault (including via .., absolute paths, or symlinks) is rejected.

  • No secrets are read, logged, or sent; the server only reads local files and answers the connected MCP client.

License

MIT — see LICENSE.

Changelog

See CHANGELOG.md.

Available Tools

5 tools
get_noteA

Read one note's content (read-only). "path" is relative to the vault root.

Inputs: path (required), max_chars. Returns: result

list_notesA

List all markdown notes in the vault as vault-relative paths (JSON array).

Inputs: no named parameters. Returns: result

search_catalogB

Search the vault index 90_System/Indexes/catalog.jsonl.

The vault's AGENTS.md requires searching this catalog before broad note reads, so prefer this tool first. Returns matching catalog entries as JSON.

Inputs: query (required), limit. Returns: result

search_notesB

Search the whole vault: catalog hits first, then note paths/contents.

Returns JSON with "catalog_hits" (index matches) and "note_hits" (note path + snippet). This is the broad read the vault AGENTS.md guards with the catalog-first rule.

Inputs: query (required), limit. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation3/5

    search_catalog is a strict subset of search_notes (which returns catalog hits first, then note hits), so the boundary between the two is blurred and an agent must rely on the AGENTS.md rationale rather than on distinct semantics. Similarly, list_notes and search_notes both return note paths, differing mainly in filtering. get_note and list_links are cleanly distinct, and the descriptions do provide guidance, keeping this from being worse.

    Naming Consistency5/5

    All five tools follow a consistent snake_case verb_noun pattern: search_catalog, search_notes, get_note, list_links, list_notes. Verbs (search/get/list) map predictably to retrieval semantics with no camelCase or stylistic drift.

    Tool Count5/5

    Five tools is well-scoped for a read-oriented vault access server; each tool covers a distinct access pattern (index lookup, broad search, single note read, link listing, enumeration) with no filler tools.

    Completeness3/5

    The surface is entirely read-only: there is no create, update, append, move, or delete operation, and no way to inspect frontmatter/tags or incoming backlinks (list_links is outgoing-only). This is coherent for a deliberately read-only server, but leaves notable gaps for typical vault note management workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to read and search your Obsidian vault through a local MCP server, keeping everything private and local.
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables MCP-compatible AI hosts to read, search, link, and write notes in a local Obsidian vault with sandboxed file access.
      1
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for browsing Obsidian-compatible Markdown vaults, searching notes, viewing backlinks and knowledge graphs, and adding selected content to chat context.
      MIT