obsidian-cli-mcp
Enables interaction with Obsidian vaults through the official Obsidian CLI, allowing note management, search, and vault operations without plugins or API keys.
README
obsidian-cli-mcp
An MCP server that wraps the official Obsidian CLI
(obsidian, bundled with the Obsidian desktop app) instead of the Local REST API plugin.
Each server instance is pinned to a single vault, so you run one entry per vault.
Why the CLI instead of the REST API?
The REST-API MCP (mcp-obsidian) needs the Local REST API community plugin, an API key,
and a dedicated port per vault. This server drives the Obsidian app through its built-in
CLI, which needs no plugin and no API key, and exposes a much richer surface:
tasks, frontmatter properties, backlinks, search-with-context, vault metadata, and more.
Requirement: the Obsidian desktop app must be running with the target vault open. The CLI talks to the live app, not the files on disk.
Install
The server is a uv project. No global install is needed —
MCP clients launch it on demand with uv run.
git clone <this repo> && cd obsidian-cli-mcp
uv sync # install dependencies
uv run pytest # run the test suite (no live Obsidian needed)
Configure (per vault)
Add one entry per vault to your MCP client config (e.g. Claude Desktop's
claude_desktop_config.json). The vault is selected with the OBSIDIAN_VAULT
environment variable — run obsidian vaults to see the exact names.
{
"mcpServers": {
"obsidian-cli-void": {
"command": "uv",
"args": ["run", "--directory", "/ABSOLUTE/PATH/TO/obsidian-cli-mcp", "obsidian-cli-mcp"],
"env": { "OBSIDIAN_VAULT": "void" }
},
"obsidian-cli-notebook": {
"command": "uv",
"args": ["run", "--directory", "/ABSOLUTE/PATH/TO/obsidian-cli-mcp", "obsidian-cli-mcp"],
"env": { "OBSIDIAN_VAULT": "notebook" }
}
}
}
Environment variables
| Variable | Required | Default | Purpose |
|---|---|---|---|
OBSIDIAN_VAULT |
yes | — | Vault name this instance targets (injected as vault= on every call). |
OBSIDIAN_CLI_PATH |
no | obsidian |
Path to the CLI binary if it isn't on PATH. |
OBSIDIAN_VERIFY_READS |
no | true |
Run the vault guard before reads too (not just writes). |
OBSIDIAN_ALLOW_PERMANENT_DELETE |
no | false |
Allow delete_note(permanent=True) to bypass trash. |
OBSIDIAN_TIMEOUT |
no | 30 |
Per-command subprocess timeout (seconds). |
OBSIDIAN_GUARD_TTL |
no | 5 |
Seconds to cache a successful vault-guard check. |
OBSIDIAN_LOG_LEVEL |
no | INFO |
Log level (logs go to stderr). |
Tools
Read / navigate: read_note, search_vault, list_files, list_folders,
note_info, list_backlinks, list_tags, list_tasks, list_properties,
read_property, vault_info, list_vaults
Write / organise: create_note, add_to_note, set_property,
remove_property, move_note, rename_note, delete_note, update_task
Escape hatch: run_obsidian — run any other CLI command (e.g. bookmarks,
wordcount, history). Disruptive commands (restart, reload, eval,
devtools, plugins:restrict, and all dev:*) are blocked.
Notes are addressed by file (resolve by name, like a wikilink) or path
(exact folder/note.md). Most read tools fall back to the active note when both
are omitted; write tools require an explicit target.
Safety: the vault guard
The Obsidian CLI silently falls back to the active vault when vault=<name>
names a vault that isn't currently open. To prevent acting on the wrong vault,
this server verifies — via vault info=name — that the configured vault is the
one actually responding before every write (and before reads, by default). If it
isn't, the tool fails with a clear message instead of touching another vault.
This also means the CLI reports failures on stdout with exit code 0; the server detects them by inspecting the output, so genuine errors surface as MCP tool errors rather than being mistaken for success.
License
MIT © digster
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。