Duyệt miễn phí mỗi ngày. Lên Pro để cài đặt và dùng Airsc MCP không giới hạn.

Xem gói Pro
MCP serverAn toànQuy trình & bộ nhớ agentDễ cho người mới Đã chạy thử thật

mcpvault

bitbonsai · bitbonsai/mcpvault

Một MCP server cục bộ cho phép các AI agent đọc, tìm kiếm và chỉnh sửa ghi chú trong Obsidian vault.

A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access

1.7k sao131Giấy phép: MITCập nhật Hôm qua0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Cho phép agent lập trình tham khảo tài liệu dự án được lưu trữ trong Obsidian.
  • Yêu cầu AI tóm tắt các ghi chú hoặc các buổi thảo luận gần đây từ vault của bạn.
  • Tự động hóa việc tạo nhật ký hàng ngày hoặc ghi chú cuộc họp trực tiếp từ giao diện chat.

Đã chạy thử thật · 18 tool

Chúng tôi đã khởi động MCP server này trong máy ảo cách ly, và nó cung cấp các tool sau:

  • read_note

    Read a note from the Obsidian vault

  • write_note

    Write a note to the Obsidian vault

  • patch_note

    Efficiently update part of a note by replacing a specific string. This is more efficient than rewriting the entire note for small changes.

  • list_directory

    List files and directories in the vault (includes non-note filenames, while read/write tools remain note-only)

  • delete_note

    Delete a note from the Obsidian vault (requires confirmation). Supports permanent delete, vault trash, or system trash.

  • search_notes

    Search for notes in the vault by content or frontmatter

  • move_note

    Move or rename a note in the vault

  • move_file

    Move or rename any file in the vault (binary-safe, file-only, requires confirmation)

  • read_multiple_notes

    Read multiple notes in a batch (max 10 files)

  • update_frontmatter

    Update frontmatter of a note without changing content

  • get_notes_info

    Get metadata for notes without reading full content

  • get_frontmatter

    Extract frontmatter from a note without reading the content

  • manage_tags

    Add, remove, or list tags in a note

  • get_vault_stats

    Get vault statistics including total notes, folders, size, and recently modified files. Useful for understanding vault scope before batch operations.

  • list_all_tags

    List all tags across the vault with occurrence counts. Returns both frontmatter tags and inline #hashtags, deduplicated and sorted by frequency. Useful for discovering existing tags before creating or

npx -y @bitbonsai/mcpvault · 21/10/2026

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

MCPVault

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

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:

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

    If using the published package:

    npx @modelcontextprotocol/inspector npx @bitbonsai/mcpvault@latest /path/to/your/vault
    
  3. Configure your AI client:

    Claude Desktop - Copy this to claude_desktop_config.json:

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

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

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

    OpenCode - Copy this to ~/.config/opencode/opencode.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.

  4. Test with your AI:

    • "List files in my Obsidian vault"
    • "Read my note called 'project-ideas.md'"
    • "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 omitt

Xem mã nguồn trên GitHub