MCPcopy Create free account
hub / github.com/bitbonsai/mcpvault

github.com/bitbonsai/mcpvault @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
96 symbols 286 edges 29 files 4 documented · 4% updated 5d ago★ 1,6288 open issues

Browse by type

Functions 62 Types & classes 34
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

image

MCPVault

MCP Toplist

A local MCP server that lets compatible clients read, search, and edit notes in an Obsidian vault. MCPVault works directly with vault files, restricts file operations to the configured vault root, and preserves formatting for unchanged frontmatter fields.

https://mcpvault.org

Changelog

GitHub Stars npm version npm downloads GitHub Sponsors Ko-Fi Liberapay

Supported clients

Configuration examples are available for Claude Desktop, Claude Code, ChatGPT Desktop (Enterprise+), OpenCode, Gemini CLI, OpenAI Codex, IntelliJ IDEA 2025.1+, Cursor, Windsurf, and Ontheia. Other clients can use MCPVault if they support local stdio MCP servers.

https://github.com/user-attachments/assets/657ac4c6-1cd2-4cc3-829f-fd095a32f71c

Quick start

  1. Install Node.js runtime:

bash # Download from https://nodejs.org (v20.0.0 or later) # or use a package manager like nvm, brew, apt, etc.

  1. Test the server:

If using the published package:

bash npx @modelcontextprotocol/inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault

  1. Configure your AI client:

Claude Desktop - Copy this to claude_desktop_config.json:

json { "mcpServers": { "obsidian": { "command": "npx", "args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"] } } }

Claude Code - Copy this to ~/.claude.json:

json { "mcpServers": { "obsidian": { "command": "npx", "args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"], "env": {} } } }

OpenCode - Copy this to ~/.config/opencode/opencode.json

json { "mcp": { "obsidian": { "type": "local", "command": [ "npx", "@bitbonsai/mcpvault@latest", "/path/to/your/vault/" ], "enabled": true } } }

Replace /path/to/your/vault with your actual Obsidian vault path.

For other platforms, see detailed configuration guides below.

  1. Test with your AI:
  2. "List files in my Obsidian vault"
  3. "Read my note called 'project-ideas.md'"
  4. "Create a new note with today's date"

To verify the connection, ask your client to list MCPVault tools or read a known note.

How it connects

An MCP client starts MCPVault as a local stdio process and passes the vault path. MCPVault exposes the same tools to each supported client, so the server is not tied to one AI provider. Obsidian does not need to be running, and no Obsidian plugin is required.

Features

  • AST-aware frontmatter updates preserve formatting for unchanged YAML fields.
  • Path checks block traversal, symlink escapes, dotfiles, .obsidian, .git, and node_modules.
  • Eighteen MCP tools cover note and file operations:
  • File operations: read_note, write_note, patch_note, delete_note, move_note, move_file
  • Partial reads: get_note_outline, read_note_lines
  • Directory and batch reads: list_directory, read_multiple_notes
  • Search: search_notes with multi-word matching and BM25 reranking
  • Metadata and tags: get_frontmatter, update_frontmatter, get_notes_info, get_vault_stats, manage_tags, list_all_tags
  • Wiki links: wiki_link resolves names and returns alternative paths when a name is ambiguous
  • write_note supports overwrite, append, and prepend modes.
  • delete_note and move_file require matching confirmation paths.
  • Path arguments are trimmed before validation.
  • Search and batch tools return compact fields by default; set prettyPrint: true for expanded output.
  • The package exports TypeScript declarations and public types.
  • MCPVault requires no Obsidian plugin.

Prerequisites

  • Node.js runtime (v20.0.0 or later)
  • An Obsidian vault (local directory with .md, .markdown, .txt, .base, or .canvas files)
  • MCP-compatible AI client (Claude Desktop, ChatGPT Desktop, Claude Code, etc.)

Installation

For end users

npx downloads and runs the package:

npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault

If you omit the vault path, the server uses your current working directory as the vault root.

For developers

  1. Clone this repository
  2. Use the correct Node.js version:
nvm use  # Uses Node 24 from .nvmrc
  1. Install dependencies with npm:
npm install  # Corepack automatically uses npm 10.9.0
  1. Test locally with MCP inspector:
npx @modelcontextprotocol/inspector npm start /path/to/your/vault

Use MCP Inspector to test the server before adding it to a client:

# Install globally for easier access
npm install -g @modelcontextprotocol/inspector

# Test with any vault
mcp-inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault

Usage

Running the Server

End users:

npx @bitbonsai/mcpvault@latest
npx @bitbonsai/mcpvault@latest /path/to/your/obsidian/vault
npx @bitbonsai/mcpvault@latest ./Vault

Developers:

npm start
npm start /path/to/your/obsidian/vault
npm start ./Vault

AI Client Configuration

Claude Desktop

Add to your Claude Desktop configuration file:

Single Vault:

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": [
        "@bitbonsai/mcpvault@latest",
        "/Users/yourname/Documents/MyVault"
      ]
    }
  }
}

Multiple Vaults:

{
  "mcpServers": {
    "obsidian-personal": {
      "command": "npx",
      "args": [
        "@bitbonsai/mcpvault@latest",
        "/Users/yourname/Documents/PersonalVault"
      ]
    },
    "obsidian-work": {
      "command": "npx",
      "args": [
        "@bitbonsai/mcpvault@latest",
        "/Users/yourname/Documents/WorkVault"
      ]
    }
  }
}

Read-only mode:

Add --read-only after the vault path to expose only read tools. Mutating tools are omitted from discovery and rejected if called directly.

{
  "mcpServers": {
    "obsidian-read-only": {
      "command": "npx",
      "args": [
        "@bitbonsai/mcpvault@latest",
        "/Users/yourname/Documents/ResearchVault",
        "--read-only"
      ]
    }
  }
}

The CLI also accepts --read-only true and --read-only=true for configuration systems that require explicit values. Omit the option, or set it to false, to keep normal read/write access.

Configuration File Locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: C:\Users\{username}\AppData\Roaming\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

You can also access this through Claude Desktop → Settings → Developer → Edit Config

ChatGPT Desktop

Requirements: ChatGPT Enterprise, Education, or Team subscription (not available for individual Plus users)

ChatGPT uses MCP through Deep Research and developer mode. Configuration is done through the ChatGPT interface:

  1. Access ChatGPT developer mode (beta feature)
  2. Configure MCP servers through the built-in MCP client
  3. Create custom connectors for your organization

Note: ChatGPT Desktop's MCP integration is currently limited to enterprise subscriptions and uses a different setup process than file-based configuration.

Claude Code

Claude Code uses .claude.json configuration file:

User-scoped (recommended): Edit ~/.claude.json:

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"],
      "env": {}
    }
  }
}

Project-scoped: Edit .claude.json in your project or add to the projects section:

{
  "projects": {
    "/path/to/your/project": {
      "mcpServers": {
        "obsidian": {
          "command": "npx",
          "args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"]
        }
      }
    }
  }
}

Using Claude Code CLI:

claude mcp add obsidian --scope user npx @bitbonsai/mcpvault /path/to/your/vault

Goose Desktop

On Goose Desktop settings, click Add custom extension, and on the command field add:

npx @bitbonsai/mcpvault@latest /path/to/your/vault

Other MCP-Compatible Clients (2025)

Confirmed MCP Support:

  • IntelliJ IDEA 2025.1+ - Native MCP client support
  • Cursor IDE - Built-in MCP compatibility
  • Windsurf IDE - Full MCP integration
  • Ontheia - Self-hosted, open-source AI agent platform
  • Zed, Replit, Codeium, Sourcegraph - In development
  • Microsoft Copilot Studio - Native MCP support with one-click server connections

Most modern MCP clients use similar JSON configuration patterns. Refer to your specific client's documentation for exact setup instructions.

Examples

Ask your AI assistant about your notes:

  • "What files are in my Obsidian vault?"
  • "Read my note called 'project-ideas.md'"
  • "Show me all notes with 'AI' in the title"

Have your AI assistant help with note management:

  • "Create a new note called 'meeting-notes.md' with today's date in the frontmatter"
  • "Append today's journal entry to my daily note"
  • "Prepend an urgent task to my todo list"
  • "Add the tags 'project' and 'urgent' to my task note"
  • "List all tags in my research note"
  • "Remove the 'draft' tag from my completed article"
  • "List all markdown files in my 'Projects' folder"
  • "Delete the old draft note 'draft-ideas.md' (with confirmation)"

Example workflows

  • "Summarize my research notes tagged with 'machine-learning' from the last month"
  • "Update the status in my project notes to 'completed' and add today's date"
  • "Find notes that mention 'API design' and draft a guide from them"
  • "Review my untagged notes and suggest tags based on their content"

Troubleshooting

Common Issues

"command not found: npx"

  • Solution: Install Node.js runtime from nodejs.org
  • Alternative: Use global install: npm install -g @bitbonsai/mcpvault

"File not found" when paths look correct

  • Cause: The server is using the wrong vault root
  • Solution: Either run the command from your vault directory or pass the vault path explicitly

"Permission denied" errors

  • Cause: Insufficient file system permissions
  • Solution: Ensure the vault directory is readable/writable by your user

"Path traversal not allowed"

  • Cause: Trying to access files outside the vault
  • Solution: All file paths must be relative to the vault root

AI client not recognizing the server

  1. Check the configuration file path is correct for your OS
  2. Ensure JSON syntax is valid (use a JSON validator)
  3. Restart your AI client after configuration changes
  4. Check your AI client's logs for error messages
  5. Verify your AI client supports MCP (Model Context Protocol)

".obsidian files still showing up"

  • Expected: The path filter automatically excludes .obsidian/** patterns
  • If still seeing them: The filter is working as designed for security

Debug Mode

Run with error logging:

npx @bitbonsai/mcpvault /path/to/vault 2>debug.log

Getting Help

  • Open an issue on GitHub
  • Include your OS, Node.js version, and error messages
  • Provide the vault directory structure (without sensitive content)

Testing

Run the test suite:

npm test

API Methods

read_note

Read a note from the vault with parsed frontmatter.

Request:

{
  "name": "read_note",
  "arguments": {
    "path": "project-ideas.md",
    "prettyPrint": false
  }
}

Compact response:

{
  "fm": {
    "title": "Project Ideas",
    "tags": ["projects", "brainstorming"],
    "created": "2023-01-15T10:30:00.000Z"
  },
  "content": "# Project Ideas\n\n## AI Tools\n- MCP server for Obsidian\n- Voice note transcription\n\n## Web Apps\n- Task management system"
}

Response (with prettyPrint: true):

{
  "fm": {
    "title": "Project Ideas",
    "tags": ["projects", "brainstorming"],
    "created": "2023-01-15T10:30:00.000Z"
  },
  "content": "# Project Ideas\n\n## AI Tools\n- MCP server for Obsidian\n- Voice note transcription\n\n## Web Apps\n- Task management system"
}

write_note

Write a note to the vault with optional frontmatter and write mode.

Write Modes:

  • overwrite (default): Replace enti

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 38
Interface 26
Function 24
Class 8

Languages

TypeScript100%

Modules by API surface

src/types.ts22 symbols
src/filesystem.ts22 symbols
src/frontmatter.ts11 symbols
src/pathfilter.ts10 symbols
src/search.ts8 symbols
website/src/pages/api/unsubscribe.ts3 symbols
website/src/components/InteractiveDemo.tsx3 symbols
src/createServer.ts3 symbols
website/src/pages/api/subscribe.ts2 symbols
website/src/pages/api/downloads.json.ts2 symbols
website/src/components/ThemeToggle.tsx2 symbols
website/src/components/ResponseRenderer.tsx2 symbols

For agents

$ claude mcp add mcpvault \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page