obsidian-mcp

by @StevenStavrakis

Obsidian MCP Server

Read, search, edit, move, and tag Markdown notes inside local Obsidian vaults directly from MCP assistants without keeping the Obsidian app running. Powered by Node.js 22+ over local stdio, it guards mutations with SHA-256 etags, atomic transaction journals, and rollback recovery.

Server facts

obsidian-mcp

GitHub stars

752

Last commit

Oct 8, 2026

Runtime

node

License

MIT

Tech

Runtime
node
Transports
stdio
Remote access
No
Authentication
None (local filesystem allowlist)

Activity

GitHub stars
752
Last commit
Data as of

Tags

  • Obsidian
  • mcp
  • note management

Overview

Local knowledge bases break easily when AI agents overwrite concurrently edited notes or mangle Wikilinks during renames. Steven Stavrakis's obsidian-mcp v2 operates directly on Markdown files inside explicitly allowlisted vault directories, so assistants read, paginate, search, and modify notes without requiring the Obsidian desktop application to stay open. Built on Node.js 22+ and served strictly over local stdio, the server never opens a network listener or transmits telemetry, making it suitable for private notes stored on local, synced, or removable paths. It handles both MCP 2026-07-28 and 2025-era client handshakes out of the box and supports up to 10 distinct vaults per process.

Connect it to Claude Desktop, Claude Code, Codex, or any stdio-capable MCP client by running `obsidian-mcp@2` through `npx` in `serve` mode with explicit `--vault` ID-to-path mappings—no API keys or cloud tokens are needed, only filesystem read/write permission to absolute folders containing an `.obsidian` directory. Across its 12 Zod-typed tools, `obsidian_read_note` returns a SHA-256 `etag` that mutating operations (`obsidian_edit_note`, `obsidian_move_note`, `obsidian_delete_note`, and batch tag tools) verify via `if_match` or `expected_etags` to stop silent overwrites. Moves transactionally rewrite unambiguous Wikilinks, embeds, and Markdown links, while deletions default to `.obsidian-mcp/trash` and recovery snapshots persist for 30 days under `.obsidian-mcp/transactions`.

Install & configure

Requirements

  • Node.js 22 or newer (`node --version`)
  • Existing Obsidian vault directory containing `.obsidian` referenced by absolute path
  • Local stdio MCP client (such as Claude Desktop, Claude Code, or Codex) with read/write vault permissions
Documented launch / install command
npx -y obsidian-mcp@2 serve --vault notes=/absolute/path/to/vault

Launch directly via `npx -y obsidian-mcp@2 serve --vault notes=/absolute/path/to/vault` or install globally with `npm install -g obsidian-mcp@2`. Repeat `--vault id=/path` for up to 10 vaults and run `obsidian-mcp doctor --vault id=/path` to verify startup health.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-mcp@2",
        "serve",
        "--vault",
        "notes=/absolute/path/to/vault"
      ]
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-mcp@2",
        "serve",
        "--vault",
        "notes=/absolute/path/to/vault"
      ]
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "obsidian": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "obsidian-mcp@2",
        "serve",
        "--vault",
        "notes=/absolute/path/to/vault"
      ]
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-mcp@2",
        "serve",
        "--vault",
        "notes=/absolute/path/to/vault"
      ]
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "obsidian": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "obsidian-mcp@2",
        "serve",
        "--vault",
        "notes=/absolute/path/to/vault"
      ]
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
obsidian_list_vaultsReturns configured vault identifiers without leaking underlying host filesystem paths.
obsidian_read_noteReads paginated slices of a Markdown note and supplies its SHA-256 etag for safe subsequent edits.
obsidian_create_noteCreates a brand-new note atomically while refusing to clobber existing files.
obsidian_edit_noteAppends, prepends, or performs exact text replacements inside a note with optional etag validation.
obsidian_delete_noteSends a note to `.obsidian-mcp/trash` by default, or deletes it permanently when `confirm_path` matches.
obsidian_move_noteMoves or renames a note and updates unambiguous Wikilinks, embeds, and Markdown links transactionally.
obsidian_create_directoryCreates a new subdirectory inside an allowlisted vault as a journaled transaction.
obsidian_search_vaultSearches vault notes by body text, filename, or tags with cursor-based pagination.
obsidian_add_tagsAdds YAML frontmatter or inline tags to target notes in an atomic batch.
obsidian_remove_tagsRemoves exact, nested, or wildcard-matched tags across notes atomically.
obsidian_rename_tagRenames a tag across notes throughout the vault within a single transaction.
obsidian_manage_tagsCombines tag additions and removals in a unified transactional operation.

Use cases

  • Refactor folder structures and rename heavily linked research notes while keeping unambiguous Obsidian Wikilinks and embeds intact.
  • Audit and standardize YAML frontmatter and nested tags across personal and work vaults using atomic batch tag tools.
  • Query and summarize long project notes from Claude Desktop or Claude Code using cursor-paginated reads capped at 25,000 characters.
  • Roll back unwanted agent edits cleanly via `obsidian-mcp recovery list` and `obsidian-mcp recovery restore` while the server is stopped.

Strengths

  • Works directly against Markdown files over local stdio without needing Obsidian open, network ports, or API keys.
  • Prevents lost updates via SHA-256 `etag` preconditions (`if_match` / `expected_etags`) and journals every mutation for 30-day recovery.
  • Blocks symlinks, junctions, traversal segments, and reserved folders (`.obsidian`, `.obsidian-mcp`, `.git`, `.backup`, `.trash`).
  • Handles up to 10 allowlisted vaults concurrently while keeping host paths hidden from tool outputs.

Limitations

  • Requires Node.js 22 or newer; older Node runtimes and v1 positional-path CLI invocations are deprecated.
  • Does not expose a network HTTP endpoint, so remote or web-only connectors cannot attach directly without a local stdio host.
  • Ambiguous Wikilinks during note moves are intentionally left unchanged and reported rather than guessed.

obsidian-mcp setup notes

  • obsidian-mcp's stdio example needs a client that launches local processes.

Frequently asked questions

Add a stdio server entry that runs `npx -y obsidian-mcp@2 serve --vault notes=/absolute/path/to/vault` in your MCP client JSON configuration. Ensure Node.js 22 or newer is installed and each vault path is absolute and contains an `.obsidian` folder. You can pass multiple `--vault` flags for up to 10 vaults, and no API keys or plugins are required.

Related MCP servers