Get the FREE Ultimate OpenClaw Setup Guide →

Obsidian

MCP server for bidirectional knowledge flow between Claude Code and Obsidian vaults

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adrianv101-obsidian-mcp npx -y pkm-mcp-server \
  --env VAULT_PATH="/absolute/path/to/your/obsidian/vault"

How to use

This MCP server exposes a suite of Obsidian vault tools to Claude Code (or any MCP-compatible client). It provides read and write access to your vault through a comprehensive set of tools such as vault_read for reading note contents, vault_write for templated note creation, vault_update_frontmatter for atomic frontmatter edits, vault_search and vault_semantic_search for locating notes by content or meaning, and vault_links/vault_neighborhood for exploring wikilinks and graph context. Additional helpers like vault_suggest_links, vault_tags, vault_recent, vault_activity, vault_trash, and vault_move enable more advanced maintenance and memory management. With semantic search enabled, you can leverage OpenAI embeddings to perform semantic queries across your notes, and the system maintains a persistent activity log to support session continuity across Claude Code sessions. The server is designed to be invoked via MCP clients, with Node-based installation (npm/pnpm) or source-based execution, and it expects a VAULT_PATH environment variable pointing to your Obsidian vault.

To use, install the server, point VAULT_PATH at your Obsidian vault, and register the MCP server in Claude Code (or another MCP client). The server will then surface the full set of vault tools to Claude Code, enabling you to read, create, update, and search notes, as well as traverse the vault graph through wikilinks. If you enable semantic search, ensure OPENAI_API_KEY is provided and note that an embeddings index is stored locally in your vault (e.g., .obsidian/semantic-index.db) and can be rebuilt by deleting the DB file.

How to install

Prerequisites:

  • Node.js v20 or later
  • npm or yarn
  • A vault path where you want to store or access your Obsidian vault

Install from npm (recommended):

npm install -g pkm-mcp-server

Install from source (clone and install):

git clone https://github.com/AdrianV101/Obsidian-MCP.git
cd Obsidian-MCP
npm install

Register the MCP server client in Claude Code (or your MCP client) by configuring the mcpServers entry with the appropriate command. For npm-installed usage, you typically run the server via npx as shown in the Quick Start. Ensure VAULT_PATH is set to the absolute path of your Obsidian vault.

Optional: Enable semantic search by providing an OpenAI API key in the environment (OPENAI_API_KEY) and restart the server. This enables vault_semantic_search and vault_suggest_links using a vector index stored at .obsidian/semantic-index.db.

Additional notes

Tips and notes:

  • VAULT_PATH should be an absolute path to your Obsidian vault directory. The MCP server reads from and writes to this location.
  • If you enable semantic search, the server uses OpenAI embeddings and stores a vector index locally. If you need to rebuild the index, delete the semantic-index.db file within your vault.
  • Some native dependencies (like better-sqlite3) may require C++ build tools on your platform. Ensure the prerequisites listed in the README are satisfied.
  • The server supports path resolution helpers (short names, folder-based filters) to make vault navigation easier when issuing tool calls from Claude Code.
  • For production deployments, consider running the server in a managed environment and securing the VAULT_PATH and OPENAI_API_KEY as environment variables.

Related MCP Servers

Sponsor this space

Reach thousands of developers