pablo-obsidian-mcp
An MCP server that provides full read/write access to an Obsidian vault, enabling searching, task management, wiki-link graph analysis, and attachment organization from an MCP client like Claude Code.
README
pablo-obsidian-mcp
An MCP server that gives Claude Code (or any MCP client) full read/write access to your Obsidian vault. Search notes, manage tasks, analyze the wiki-link graph, and organize attachments -- all from your terminal.
Built with Bun, Model Context Protocol SDK, and Zod.
Why
Obsidian stores everything as local markdown files, but AI coding assistants can't access them natively. This server bridges that gap: Claude can read your notes for context, create documentation as you work, search across hundreds of files instantly, and keep your vault organized -- without you ever leaving the terminal.
Features
- 22 tools across 7 categories (read, write, search, graph, tasks, attachments, meta)
- Lazy discovery -- tools are exposed via
discover_tools+get_tool_infoso the LLM only loads what it needs - Auto-compaction -- large result sets (800+ notes) are automatically compacted with previews to save context window
- Wiki-link graph -- backlinks, outgoing links, full graph analysis, orphan detection
- Task management -- list and toggle checkboxes across the entire vault
- Image insertion -- embed base64-encoded images (PNG, JPEG, WebP, GIF) directly into notes
- Metadata without content --
show_notereturns tags, links, tasks, frontmatter without reading the full file
Quick start
1. Clone and install
git clone https://github.com/90PabloRomero/pablo-obsidian-mcp.git
cd pablo-obsidian-mcp
bun install
2. Add to Claude Code
Add to ~/.claude/settings.json (or project .claude/settings.json):
{
"mcpServers": {
"obsidian": {
"command": "bun",
"args": ["run", "/absolute/path/to/pablo-obsidian-mcp/src/index.ts"],
"env": {
"OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/vault"
}
}
}
}
3. Use it
Once configured, Claude Code automatically discovers the tools. Ask it things like:
- "Search my vault for notes about authentication"
- "Create a new note summarizing today's work"
- "Show me all incomplete tasks across my vault"
- "Which notes link to my architecture decisions note?"
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
OBSIDIAN_VAULT_PATH |
Yes | -- | Absolute path to your Obsidian vault |
OBSIDIAN_COMPACTION_THRESHOLD |
No | 20 |
Results above this count get compacted |
OBSIDIAN_PREVIEW_COUNT |
No | 5 |
Number of items shown in compacted previews |
Tools
Meta
| Tool | Description |
|---|---|
discover_tools |
List all 22 tools with short descriptions |
get_tool_info |
Get detailed docs for a specific tool |
Read
| Tool | Description |
|---|---|
list_notes |
List note names and paths (auto-compacted for large vaults) |
read_note |
Read the full markdown content of a note |
show_note |
Get metadata (size, tags, links, tasks, frontmatter) without content |
get_vault_stats |
Vault-wide statistics |
Write
| Tool | Description |
|---|---|
create_note |
Create a new markdown note |
edit_note |
Replace the entire content of a note |
delete_note |
Delete a note |
delete_folder |
Delete a folder and all its contents |
append_to_note |
Append content to the end of a note |
Search
| Tool | Description |
|---|---|
search_notes |
Full-text search with matching lines |
search_by_tag |
Find notes by hashtag |
find_notes_by_name |
Find notes by filename substring |
Graph
| Tool | Description |
|---|---|
get_backlinks |
Find notes linking to a given note |
get_outgoing_links |
Get all wiki-links from a note |
get_graph |
Complete link graph with orphan detection |
Tasks
| Tool | Description |
|---|---|
list_tasks |
List all checkboxes, filterable by status |
toggle_task |
Toggle a checkbox between done and open |
Attachments
| Tool | Description |
|---|---|
list_attachments |
List non-markdown files with reference status |
organize_attachments |
Move attachments to a folder and update references |
insert_image |
Save a base64 image and embed it in a note |
How compaction works
When a result set exceeds the threshold (default 20), the server returns a compacted response instead of dumping everything into the context window:
{
"compacted": true,
"total": 847,
"showing": 5,
"preview": ["... first 5 items ..."],
"hint": "Showing 5 of 847 notes. Use read_note for details, or narrow with path/query filters."
}
This keeps token usage low even on vaults with thousands of notes. The LLM can then drill down into specific notes or narrow its search.
Architecture
src/
index.ts -- MCP server entry point and tool registration
vault.ts -- Vault filesystem operations and path resolution
parser.ts -- Markdown parsing (frontmatter, wiki-links, tags, tasks)
compact.ts -- Auto-compaction logic for large result sets
tools/
meta.ts -- discover_tools, get_tool_info
read.ts -- list_notes, read_note, show_note, get_vault_stats
write.ts -- create_note, edit_note, delete_note, delete_folder, append_to_note
search.ts -- search_notes, search_by_tag, find_notes_by_name
graph.ts -- get_backlinks, get_outgoing_links, get_graph
tasks.ts -- list_tasks, toggle_task
attachments.ts -- list_attachments, organize_attachments, insert_image
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 模型以安全和受控的方式获取实时的网络信息。