obsidian-mcp
A Python MCP server for accessing and managing Obsidian vaults, providing tools for reading, writing, searching, and organizing notes across multiple vaults.
README
obsidian-mcp
Python MCP server for Obsidian vault access. A port of bitbonsai/mcpvault using uv Python instead of Node.js — designed for local use across multiple vaults.
Features
- 15 tools covering all vault operations: read, write, patch, search, move, delete, tag management, frontmatter, and vault stats
- BM25 full-text search with multi-word relevance reranking
- Safe frontmatter — YAML parsed with
yaml.safe_load, key order preserved on writes - Security hardened — path traversal prevention with lexical + symlink boundary checks (mirrors mcpvault v0.9.1), PathFilter blocks
.obsidian/,.git/, and non-note extensions, destructive ops require path confirmation - Multi-vault — run one instance per vault, each with its own MCP server name
- Pure Python — no Node.js required, managed entirely by
uv
Requirements
- macOS (tested) or Linux
- uv — Python package manager (
brew install uv) - Python 3.11+ (installed automatically by
uv) - Claude Desktop or Claude Code
Quick Start (no clone required)
Install uv, then point your MCP client config at the GitHub repo directly — uvx handles the rest.
brew install uv
Claude Code
claude mcp add --scope user obsidian-my-vault \
uvx -- \
--from git+https://github.com/Sub-Lime-Time/mcp-obsidian \
obsidian-mcp "/path/to/your/vault" obsidian-my-vault
Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json
Note: Claude Desktop's "Add custom connector" UI (Settings → Connectors) only supports remote HTTP/SSE servers. Local stdio servers like this one require JSON config editing.
Claude Desktop doesn't inherit your shell PATH, so use the full path to uvx (find it with which uvx):
{
"mcpServers": {
"obsidian-my-vault": {
"command": "/opt/homebrew/bin/uvx",
"args": [
"--from", "git+https://github.com/Sub-Lime-Time/mcp-obsidian",
"obsidian-mcp",
"/path/to/your/vault",
"obsidian-my-vault"
]
}
}
}
Common
uvxpaths:/opt/homebrew/bin/uvx(macOS Apple Silicon),/usr/local/bin/uvx(macOS Intel),~/.local/bin/uvx(Linux).
iCloud Vault Path (macOS)
/Users/<username>/Library/Mobile Documents/iCloud~md~obsidian/Documents/<Vault Name>
Multiple vaults
Run one instance per vault, each with a unique server name:
claude mcp add --scope user obsidian-work \
uvx -- \
--from git+https://github.com/Sub-Lime-Time/mcp-obsidian \
obsidian-mcp "/path/to/work/vault" obsidian-work
Updating
uvx caches the installed package. To pull the latest version:
uvx cache clean
Tools
| Tool | Description |
|---|---|
read_note |
Read a note with frontmatter |
write_note |
Create or update a note (overwrite / append / prepend) |
patch_note |
Edit part of a note via find-and-replace |
list_directory |
Browse vault folders |
delete_note |
Delete a note (requires path confirmation) |
search_notes |
Full-text BM25 search across content and/or frontmatter |
move_note |
Move or rename a note |
move_file |
Move any file with dual path confirmation |
read_multiple_notes |
Batch read up to 10 notes |
update_frontmatter |
Update YAML frontmatter without touching body |
get_notes_info |
File metadata without reading content |
get_frontmatter |
Extract frontmatter only |
manage_tags |
Add, remove, or list tags |
get_vault_stats |
Total notes, folders, size, recently modified |
list_all_tags |
All tags across vault with occurrence counts |
Development
# Clone and install
git clone https://github.com/Sub-Lime-Time/mcp-obsidian.git
cd mcp-obsidian
uv sync
# Verify
uv run obsidian-mcp --help
# Run against a vault
uv run obsidian-mcp /path/to/vault
# Add a dependency
uv add <package>
See CLAUDE.md for architecture notes and rules for AI assistants working in this repo.
Contributing
Bug fixes and clear improvements are welcome — open a PR. For new features, please open an issue first to discuss before writing code. I'll merge fixes that are unambiguously correct, but make no guarantees on feature additions.
Credits
Based on bitbonsai/mcpvault (MIT). Security model mirrors mcpvault v0.9.1.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。