obsidian-self-mcp
An MCP server providing direct programmatic access to Obsidian vaults through CouchDB, the database used by Obsidian LiveSync. It enables AI agents to read, write, and manage notes and metadata in headless environments without requiring the Obsidian desktop app.
README
obsidian-self-mcp
An MCP server and CLI that gives you direct access to your Obsidian vault through CouchDB — the same database that Obsidian LiveSync uses to sync your notes.
No Obsidian app required. Works on headless servers, in CI pipelines, from AI agents, or anywhere you can run Python.
How it works
If you use Obsidian LiveSync, your vault is already stored in CouchDB. This tool talks directly to that CouchDB instance — reading, writing, searching, and managing notes using the same document/chunk format that LiveSync uses. Changes sync back to Obsidian automatically.
Who this is for
- Self-hosted LiveSync users who want programmatic vault access
- Homelab operators running headless servers with no GUI
- AI agent builders who need to give Claude, GPT, or other agents access to an Obsidian vault via MCP
- Automation pipelines that read/write notes (changelogs, daily notes, project docs)
How this differs from Obsidian's official CLI
Obsidian has an official CLI that requires the Obsidian desktop app running locally and a Catalyst license. This project requires neither — just a CouchDB instance with LiveSync data.
| Feature | Official CLI | obsidian-self-mcp |
|---|---|---|
| Requires Obsidian app | Yes (must be running) | No |
| Requires Catalyst license | Yes ($25+) | No (MIT, free) |
| Read/write notes | Yes | Yes |
| Search | Yes | Yes |
| Frontmatter/properties | Yes | Yes |
| Tags | Yes | Yes |
| Backlinks | Yes (via app index) | Yes (content scanning) |
| Templates | Yes | No (planned) |
| Canvas | Yes | No |
| Graph view | No | No |
| Works headless/CI | No | Yes |
| MCP server | No | Yes |
| Transport | Local REST API | CouchDB (network) |
Requirements
- Python 3.10+
- A CouchDB instance with Obsidian LiveSync data
- The database name, URL, and credentials
Installation
pip install obsidian-self-mcp
Or install from source:
git clone https://github.com/suhasvemuri/obsidian-self-mcp.git
cd obsidian-self-mcp
pip install -e .
Configuration
Set these environment variables:
export OBSIDIAN_COUCH_URL="http://your-couchdb-host:5984"
export OBSIDIAN_COUCH_USER="your-username"
export OBSIDIAN_COUCH_PASS="your-password"
export OBSIDIAN_COUCH_DB="obsidian-vault" # optional, defaults to "obsidian-vault"
MCP Server Setup
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"obsidian-self-mcp": {
"command": "python",
"args": ["-m", "obsidian_self_mcp.server"],
"env": {
"OBSIDIAN_COUCH_URL": "http://your-couchdb-host:5984",
"OBSIDIAN_COUCH_USER": "your-username",
"OBSIDIAN_COUCH_PASS": "your-password",
"OBSIDIAN_COUCH_DB": "obsidian-vault"
}
}
}
}
Claude Code
Add to your Claude Code settings (.claude/settings.json or global):
{
"mcpServers": {
"obsidian-self-mcp": {
"command": "python",
"args": ["-m", "obsidian_self_mcp.server"],
"env": {
"OBSIDIAN_COUCH_URL": "http://your-couchdb-host:5984",
"OBSIDIAN_COUCH_USER": "your-username",
"OBSIDIAN_COUCH_PASS": "your-password",
"OBSIDIAN_COUCH_DB": "obsidian-vault"
}
}
}
}
Available MCP Tools
| Tool | Description |
|---|---|
list_notes |
List notes with metadata, optionally filtered by folder |
read_note |
Read the full content of a note |
write_note |
Create or update a note |
search_notes |
Search note content (case-insensitive) |
append_note |
Append content to an existing note |
delete_note |
Delete a note and its chunks |
list_folders |
List all folders with note counts |
read_frontmatter |
Read frontmatter properties from a note |
update_frontmatter |
Set/update frontmatter properties (JSON input) |
list_tags |
List all tags in the vault with counts |
search_by_tag |
Find notes containing a specific tag |
get_backlinks |
Find notes that link to a given note |
get_outbound_links |
List wikilinks from a note |
CLI Usage
The obsidian command provides the same operations from the terminal:
# List notes
obsidian list
obsidian list "Dev Projects" -n 10
obsidian ls # alias
# Read a note
obsidian read "Notes/todo.md"
obsidian cat "Notes/todo.md" # alias
# Write a note
obsidian write "Notes/new.md" "# Hello"
obsidian write "Notes/new.md" -f local-file.md
echo "content" | obsidian write "Notes/new.md"
# Search
obsidian search "kubernetes" -d "Dev Projects" -n 5
obsidian grep "kubernetes" # alias
# Append to a note
obsidian append "Notes/log.md" "New entry"
# Delete a note
obsidian delete "Notes/old.md"
obsidian rm "Notes/old.md" -y # skip confirmation
# Frontmatter properties
obsidian props "Notes/todo.md" # read properties
obsidian props "Notes/todo.md" --set status=done # set a property
obsidian props "Notes/todo.md" --set 'tags=["a","b"]' status=active
# Tags
obsidian tags # list all tags with counts
obsidian tags "Dev Projects" # tags in a folder
obsidian tags --find "project" # find notes with a tag
# Backlinks and links
obsidian backlinks "Notes/todo.md" # notes linking to this note
obsidian links "Notes/todo.md" # outbound wikilinks from this note
# List folders
obsidian folders
obsidian tree # alias
How LiveSync stores data
LiveSync splits each note into a parent document (metadata + ordered list of chunk IDs) and one or more chunk documents (the actual content). This tool handles all of that transparently — reads reassemble chunks in order, writes create proper chunk documents, and deletes clean up both the parent and all chunks.
Document IDs are lowercased vault paths. Paths starting with _ (like _Changelog/) get a / prefix since CouchDB reserves _-prefixed IDs.
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 模型以安全和受控的方式获取实时的网络信息。