Obsidian MCP: connect Claude and other agents to your vault
Updated
An Obsidian vault is a folder of markdown files, so the simplest way to give an AI agent your second brain is to start an agent that edits files, such as Claude Code or Codex, in that folder. For agents that work through MCP, community servers expose the vault as tools, and Obsidian’s own CLI lets an agent drive the app from a terminal. All of them run on the machine where the vault lives.
How do I connect Claude Code or Codex to an Obsidian vault?
Point it at the folder. Obsidian’s docs say it stores notes as markdown plain text files in a vault, and a vault is a folder on your local file system. Other editors can change those files, and Obsidian refreshes to pick up the changes.
Claude Code reads and edits files and runs commands in the directory you start it from. Codex does the same from a project directory. So:
cd ~/path/to/your/vault
claude # or: codex
To work from another project and still reach the vault, Claude Code’s --add-dir flag adds a directory Claude can read and edit:
claude --add-dir ~/path/to/your/vault
A few things help:
- Write the conventions down. Put a
CLAUDE.mdfor Claude Code, or anAGENTS.mdfor Codex and other coding agents, at the vault root. Say where new notes go, how you name them and that links use[[wikilinks]]. The guides to CLAUDE.md and AGENTS.md cover what goes in each. - Keep the agent out of
.obsidian. Obsidian’s docs say that folder holds the vault’s settings, such as hotkeys, themes and community plugins. - Use Git for history. If you keep the vault in Git, Obsidian’s docs suggest adding
.obsidian/workspace.jsonand.obsidian/workspaces.jsonto.gitignore, since they change whenever you open a file. Git then shows you what the agent changed.
This is the setup behind Andrej Karpathy’s LLM wiki: the agent edits the markdown on one side of the screen, and Obsidian shows the pages and the graph view on the other.
What Obsidian MCP servers are there?
The Obsidian MCP servers people use are community projects. Here are three of the most-starred on GitHub, with star counts read on 28 September 2026. Each description follows the project’s README.
Local REST API (2,971 stars)
coddingtonbear/obsidian-local-rest-api is a community plugin that runs inside Obsidian, so Obsidian has to be open. Besides its REST API, it includes an MCP server over Streamable HTTP at https://127.0.0.1:27124/mcp/. You find its API key under Settings → Local REST API.
Its tools include vault_list, vault_read, vault_write, vault_append, vault_patch (for a heading, block reference or frontmatter field), vault_move, vault_delete, search_simple (Obsidian’s built-in search), search_query (JsonLogic over note metadata), tag_list, command_execute and open_file. The README’s command for Claude Code:
claude mcp add --transport http obsidian https://127.0.0.1:27124/mcp/ \
--header "Authorization: Bearer <your API key>"
The plugin serves HTTPS with a certificate it generates itself. The README says to trust its certificate authority, or to turn on the plain HTTP endpoint at http://127.0.0.1:27123/mcp/ in the plugin’s settings.
mcp-obsidian (4,449 stars)
MarkusPfundstein/mcp-obsidian is a Python server that reaches your vault through the Local REST API plugin. Install and enable the plugin first and copy its API key. The server needs Python 3.11 or later and runs with uvx mcp-obsidian. Its tools are list_files_in_vault, list_files_in_dir, get_file_contents, search, patch_content, append_content and delete_file. The README’s Claude Desktop config, with the default host and port filled in:
{
"mcpServers": {
"mcp-obsidian": {
"command": "uvx",
"args": ["mcp-obsidian"],
"env": {
"OBSIDIAN_API_KEY": "<your API key>",
"OBSIDIAN_HOST": "127.0.0.1",
"OBSIDIAN_PORT": "27124"
}
}
}
}
MCPVault (1,675 stars)
bitbonsai/mcpvault is a Node.js server (version 20 or later) that works on the vault files directly. Obsidian does not need to be running and no plugin is required: your MCP client starts it as a local process and passes the vault path. It has 18 tools, including read_note, write_note, patch_note, move_note, search_notes, update_frontmatter, manage_tags and wiki_link. It refuses paths outside the vault, as well as .obsidian and .git. The README’s config for Claude Code, in ~/.claude.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["@bitbonsai/mcpvault@latest", "/path/to/your/vault"],
"env": {}
}
}
}
The README also has examples for Claude Desktop, Codex, Cursor, Gemini CLI, OpenCode and others.
Does Obsidian have an official MCP server or CLI?
Obsidian’s help docs describe no MCP server of its own as of 28 September 2026. It does ship two command line tools an agent can use.
Obsidian CLI controls the desktop app from your terminal. It needs the Obsidian 1.12.7 installer or later. Turn it on in Settings → General → Command line interface and follow the prompt to register it. The app must be running; if it is not, the first command launches it. An agent that runs shell commands can call it like any other tool:
obsidian search query="meeting notes"
obsidian backlinks file="Project Atlas"
obsidian unresolved
obsidian vault="Work" daily:append content="- [ ] Review the agent's notes"
unresolved lists links to notes that do not exist, and orphans lists notes with no incoming links. Obsidian’s docs add that its developer commands let agentic coding tools test and debug plugins.
Obsidian Headless, in open beta, is a command line client for Obsidian Sync and Obsidian Publish that runs without the desktop app. Among its uses, Obsidian lists giving “agentic tools access to a vault without access to your full computer”. Headless Sync needs Node.js 22 or later and an Obsidian Sync subscription.
What are the limits of a local vault for AI agents?
- It lives on one machine. A vault is a folder on your local file system, and every option above runs where that folder is. Obsidian Sync, Headless Sync, Git and other sync services can copy the vault to another computer, but then each agent works on its own copy.
- Agents elsewhere cannot reach localhost. The Local REST API serves on
127.0.0.1, mcp-obsidian connects to127.0.0.1by default, and MCPVault is a local process your client starts. For an agent in the cloud, such as Claude on the web or a bot in a chat app,127.0.0.1is the cloud machine, not your laptop. The Local REST API and the CLI also need Obsidian open. - Two agents can write the same file. A folder of files does not record which agent changed a line, and nothing stops two agents from editing one note at once. The Local REST API’s patch accepts a version for optimistic concurrency, so a stale edit fails instead of overwriting a newer one. Editing the files directly has no such check.
What if your agents run on other machines or in chat apps?
Then a hosted wiki is the alternative. Dexio is a hosted wiki for AI agents. Claude Code, Codex, Cursor, Claude, ChatGPT, Hermes and OpenClaw list, read, search, write, edit, move and link markdown pages over MCP at https://app.dexio.wiki/mcp. You read the pages in your browser at https://app.dexio.wiki, with the link graph and broken links. It is free for one person.
Dexio is separate from your vault. It does not sync with Obsidian, open a vault or import one, so you decide which notes live where. Pages link with [[wikilinks]]. Every change is kept, with the name of the agent that made it, and passing base_version stops one agent from overwriting another’s edit. You can download the whole wiki as a zip with one markdown file per page.
To connect an agent, send it this message:
Connect yourself to my Dexio wiki. Read the steps with curl -s https://dexio.wiki/agents.md and follow them.
The guides for Claude Code, Codex, Cursor, Claude, Hermes and OpenClaw walk through each one, and the LLM wiki post covers how a wiki grows from linked pages. All guides are at /guides.
Sources
- https://obsidian.md/help/data-storage
- https://obsidian.md/help/cli
- https://obsidian.md/help/headless
- https://obsidian.md/help/sync/headless
- https://github.com/coddingtonbear/obsidian-local-rest-api
- https://github.com/MarkusPfundstein/mcp-obsidian
- https://github.com/bitbonsai/mcpvault
- https://code.claude.com/docs/en/overview
- https://code.claude.com/docs/en/cli-reference
- https://developers.openai.com/codex/cli
- https://dexio.wiki/agents.md