MCP Vault

MCP Vault

Installable
bitbonsai
GitHubnpm

About

A universal AI bridge for Obsidian vaults using the Model Context Protocol (MCP) standard. Connect any MCP-compatible AI assistant to your knowledge base - works with Claude, ChatGPT, and future AI tools.

Features

  • Safe frontmatter parsing and validation using gray-matter with AST-aware updates
  • Path filtering to exclude .obsidian directory and other system files
  • Complete MCP toolkit: 14 methods covering all vault operations
    • File operations: read_note, write_note, patch_note, delete_note, move_note, move_file
    • Directory operations: list_directory
    • Batch operations: read_multiple_notes
    • Search: search_notes with multi-word matching and BM25 relevance reranking
    • Metadata: get_frontmatter, update_frontmatter, get_notes_info, get_vault_stats
    • Tag management: manage_tags (add, remove, list)
  • Write modes: overwrite, append, prepend for flexible content editing
  • Safe deletion with confirmation requirement to prevent accidents
  • Token-optimized responses: 40-60% smaller responses with minified field names
  • Optional pretty-printing: Set prettyPrint: true for human-readable debugging
  • Zero dependencies: No Obsidian plugins required

Tools

read_note

Read a note from the vault with parsed frontmatter.

write_note

Write a note with optional frontmatter. Supports three modes:

  • overwrite (default): Replace entire file
  • append: Add content to end
  • prepend: Add content to beginning

patch_note

Efficiently replace an exact string inside an existing note without rewriting the full file.

delete_note

Delete a note with confirmation requirement. Supports trash modes: none (permanent), local (vault .trash), or system (OS trash).

move_note

Move or rename a note file (.md, .markdown, .txt, .base, .canvas).

move_file

Move or rename any file with binary-safe operations. Requires confirmation of both source and destination paths.

list_directory

List files and directories in the vault. Includes all file types for structure visibility.

search_notes

Search notes by content or frontmatter with multi-word matching and BM25 relevance reranking. Returns excerpts, match counts, and Obsidian deep links.

get_frontmatter

Extract only the frontmatter without reading full content.

update_frontmatter

Update frontmatter without changing content. Supports merge mode.

manage_tags

Add, remove, or list tags in notes. Manages frontmatter tags and detects inline tags.

read_multiple_notes

Batch read up to 10 notes at once. Configurable inclusion of content and frontmatter.

get_notes_info

Get metadata for notes (size, modified date, frontmatter presence) without reading content.

get_vault_stats

Get vault statistics: note count, folder count, total size, and recently modified notes.

Security

  • Path traversal protection
  • Relative path enforcement
  • Automatic exclusion of .obsidian, .git, system files
  • YAML frontmatter validation
  • Safe data type checking

Usage Examples

  • "List files in my Obsidian vault"
  • "Read my note called 'project-ideas.md'"
  • "Create a new note with today's date"
  • "Add tags 'project' and 'urgent' to my task note"
  • "Search for all notes mentioning 'machine learning'"
  • "Append today's journal entry to my daily note"

This server runs through your single 1Server connection. No extra config required.

0Installs
--Stars

Categories

ProductivityDocumentationFiles