obsidian-vault-mcp

obsidian-vault-mcp

Enables Claude to read, write, search, and manage an Obsidian vault with tools for notes, tags, folders, and full-text search.

Category
访问服务器

README

Obsidian Vault MCP Server

An MCP server that gives Claude full read/write access to your Obsidian vault. Works with Claude Code and Claude Desktop.

What it does

Gives Claude 10 tools to work with your vault:

Tool Description
search_vault Full-text search across all notes
read_note Read a note's content
list_recent List recently modified notes
list_folder Browse folders and notes
search_tags Find notes by #tag
create_note Create a new note
update_note Replace or append to a note
delete_note Delete a note
create_folder Create a new folder
move_note Move or rename a note

Quick start

1. Clone and build

git clone <this-repo>
cd obsidian-vault-mcp
npm install
npm run build

2. Find your vault path

Your Obsidian vault is just a folder on your filesystem. You need the absolute path to it.

Common locations:

  • macOS: ~/Documents/My Vault or ~/Obsidian
  • Windows: C:\Users\YourName\Documents\My Vault
  • Linux: ~/Documents/My Vault
  • iCloud (macOS): ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/My Vault
  • Google Drive: ~/Library/CloudStorage/GoogleDrive-you@gmail.com/My Drive/My Vault

To check: open Obsidian, click the vault icon (bottom-left), and look at the path shown under your vault name.

3. Configure Claude

Pick the setup that matches how you use Claude.


Option A: Claude Code

Add to ~/.claude/mcp.json (create the file if it doesn't exist):

{
  "mcpServers": {
    "obsidian-vault": {
      "command": "node",
      "args": ["/absolute/path/to/obsidian-vault-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
      }
    }
  }
}

Then restart Claude Code.


Option B: Claude Desktop

Open Claude Desktop settings (gear icon) > Developer > Edit Config, and add:

{
  "mcpServers": {
    "obsidian-vault": {
      "command": "node",
      "args": ["/absolute/path/to/obsidian-vault-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
      }
    }
  }
}

Then restart Claude Desktop.


4. Test it

Ask Claude:

"List the folders in my Obsidian vault"

or

"Search my vault for notes about project planning"

Requirements

  • Node.js 18+
  • Obsidian vault (any vault — it reads/writes markdown files directly)
  • ripgrep (optional, but makes search much faster)

Installing ripgrep (recommended)

Search is ~10x faster with ripgrep. Without it, the server falls back to a basic Node.js file search which works fine for smaller vaults.

# macOS
brew install ripgrep

# Ubuntu/Debian
sudo apt install ripgrep

# Windows (with Chocolatey)
choco install ripgrep

# Windows (with Scoop)
scoop install ripgrep

How it works

The server reads and writes .md files directly on your filesystem — it doesn't go through the Obsidian app or its API. This means:

  • Obsidian doesn't need to be running
  • Changes sync instantly (Obsidian picks them up when it's open)
  • It works with any sync setup (iCloud, Google Drive, Syncthing, etc.)
  • Only .md files are visible — attachments, images, and hidden files are ignored

Permissions note

This server has full read/write access to your vault. Claude can create, edit, move, and delete notes. If you want read-only access, remove the write tools (create_note, update_note, delete_note, create_folder, move_note) from the source, or deny those tools in your Claude Code permissions.

Troubleshooting

"Missing required environment variable: OBSIDIAN_VAULT_PATH" You haven't set the vault path. Check your config — OBSIDIAN_VAULT_PATH must be set in the env block.

"Vault path does not exist" The path is wrong. Double-check the absolute path to your vault folder. Make sure there are no typos, and that you're using the right path separator for your OS.

"Cannot find module" errors Run npm run build — the TypeScript needs to be compiled to JavaScript first.

Search returns no results but you know the content exists If ripgrep isn't installed, the fallback search is slower and may time out on very large vaults. Install ripgrep for better performance.

Claude doesn't see the tools Restart Claude Code or Claude Desktop after changing the config. Check the MCP server logs in Claude Desktop (Developer > Logs).

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选