obsidian-mcp
Wraps the official Obsidian CLI to expose vault tools for MCP clients, enabling note management, search, tasks, properties, and more through Obsidian's internal API.
README
obsidian-mcp
An MCP server that wraps the official Obsidian CLI (obsidian, see
https://obsidian.md/help/cli) and exposes your vault as a set of tools that any
MCP client (Claude Desktop, Claude Code, etc.) can use.
Each tool translates its parameters into a call to the obsidian binary and
returns the result to the model. Because every operation goes through Obsidian's
internal API, wikilinks and the index stay up to date automatically — the
underlying filesystem is never touched directly.
Requirements
- Obsidian running on the same machine as this server.
- Obsidian CLI enabled: Settings → General → enable CLI support and follow
the instructions to register it (this installs the
obsidiancommand on your PATH). - Node.js 18+.
Check everything is ready with:
obsidian files total
If that fails, make sure Obsidian is open and the CLI is enabled before continuing.
Installation
npm install
npm run build
This compiles src/ into dist/. For development with automatic rebuilds:
npm run dev
Try it standalone (without an MCP client)
node scripts/smoke-test.mjs
It lists the registered tools and makes one real test call (obsidian_read) to
confirm the server talks to the CLI correctly.
Configure it in Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
(on Windows: %APPDATA%\Claude\claude_desktop_config.json) and add the block
below, replacing /absolute/path/to/obsidian-mcp with the path where you cloned
this repo (pwd from inside the folder gives it to you):
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/absolute/path/to/obsidian-mcp/dist/index.js"]
}
}
}
If
nodeisn't on the PATH your MCP client uses (this can happen on macOS), setcommandto the absolute path of your Node binary (find it withwhich node) instead of"node".
Restart Claude Desktop and the obsidian_* tools should appear.
Configure it in Claude Code
Register the server with the CLI (user scope makes it available in every
project; drop -s user to scope it to the current repo):
claude mcp add obsidian -s user "$(which node)" /absolute/path/to/obsidian-mcp/dist/index.js
Check what
which nodereturns before using it: on some setups it resolves to an ephemeral/cached Node (e.g. under~/.cache/…) that may disappear. Prefer a stable absolute path (your nvm/Homebrew Node) as thecommand.
Verify it connected with claude mcp list (look for obsidian … ✔ Connected).
Because the tool list is loaded at startup, restart Claude Code once after
registering so the obsidian_* tools appear.
Environment variables
| Variable | What it does | Default |
|---|---|---|
OBSIDIAN_CLI_BIN |
Path/name of the binary if obsidian isn't on the PATH |
obsidian |
OBSIDIAN_VAULT |
Which vault to use when you have several open | (none) |
OBSIDIAN_CLI_TIMEOUT_MS |
Timeout per CLI call | 20000 |
OBSIDIAN_MCP_DISABLE_EXEC |
If 1, removes the obsidian_exec tool (see security below) |
(empty) |
Included tools
Escape hatch: obsidian_exec runs any CLI subcommand directly (files,
folders, links, orphans, unresolved, tags:rename, plugin:enable,
publish:list, sync:status, history, eval, dev:*, etc.) — it covers
everything without a dedicated tool.
Notes: obsidian_read, obsidian_create, obsidian_append,
obsidian_prepend, obsidian_move, obsidian_delete, obsidian_list_files,
obsidian_list_folders.
Search: obsidian_search (supports filters such as [tag:project],
[status:active], [priority:>3] inside the query).
Daily notes: obsidian_daily_read, obsidian_daily_append,
obsidian_daily_prepend.
Properties (frontmatter): obsidian_properties_get,
obsidian_properties_set, obsidian_properties_remove.
Tags and links: obsidian_tags, obsidian_backlinks, obsidian_links,
obsidian_orphans, obsidian_unresolved_links.
Tasks: obsidian_tasks_list, obsidian_task_create,
obsidian_task_complete.
Security note
obsidian_exec (and, within it, commands like eval or dev:*) can run
arbitrary JavaScript inside your Obsidian instance or inspect its UI. If you'd
rather expose only the curated set of tools above, start the server with
OBSIDIAN_MCP_DISABLE_EXEC=1.
A note on filenames
Obsidian Sync applies cross-platform (Windows/iOS) naming rules. Never put
: * ? " < > | / \ in a note's filename — a single one can send Obsidian
Sync into a loop. These characters are fine in the note title (frontmatter /
# H1), just not in the .md filename. When creating or renaming notes through
this server, sanitize filenames accordingly.
Project layout
src/
cli.ts -> helper that invokes the `obsidian` binary and parses its output
index.ts -> MCP server definition and all the tools
scripts/
smoke-test.mjs -> quick manual test without needing an MCP client
Disclaimer
This is an independent, community-built project. It is not affiliated with,
endorsed by, sponsored by, or associated with Obsidian, Obsidian.md, or Dynalist
Inc. in any way. "Obsidian" is a trademark of its respective owner; it is used
here only to describe interoperability. This software wraps the official Obsidian
CLI and is provided "as is", without warranty of any kind (see the license). You
are responsible for any changes it makes to your vault — back up your data and
review the security note above before enabling obsidian_exec.
License
MIT © fodaveg
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.