Skip to main content
Glama
obsidian-local-mcp

obsidian-local-mcp

obsidian-local-mcp

A standalone Model Context Protocol (MCP) server that exposes an Obsidian vault as tools to any MCP-capable agent (Claude Desktop, OpenCode, etc.) — enabling read / write / search / organize operations on vault notes without requiring Obsidian to be running.

Design principles

  • Local stdio MCP server — no HTTP, no API keys. Launched as a subprocess by the MCP client.

  • File-based by design — operates directly on the vault's Markdown files, not through the Obsidian app.

  • Safe — all operations are restricted to paths inside the vault root (path-traversal guard). The .obsidian/ config folder is never touched unless explicitly allowed.

Related MCP server: obsidian-gate

Tools (planned v1)

Tool

Purpose

list_notes

Recursive listing of .md files, excluding .obsidian/

read_note

Return full note content (UTF-8)

search_notes

Regex/literal grep over vault content, filenames, or tags

create_note

Create note, auto-creating parent folders; refuses to overwrite unless allowed

edit_note

Exact string replacements (old/new pairs)

move_note

Move a note, optionally rewriting [[wikilinks]] across the vault

delete_note

Soft-delete into a vault-local .trash/ folder

manage_frontmatter

Parse/modify YAML frontmatter while preserving the body

Install

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "obsidian-local-mcp"],
      "env": { "OBSIDIAN_VAULT_PATH": "C:\\path\\to\\MyVault" }
    }
  }
}

Configuration

Option

Env var

Meaning

--vault <path>, -v

OBSIDIAN_VAULT_PATH

Vault root (required). Validated at startup: must contain a .obsidian/ folder.

--allow-config

OBSIDIAN_ALLOW_CONFIG=1

Permit access to .obsidian/ (blocked by default).

All tool paths are vault-relative; a path-traversal guard keeps every operation inside the vault root.

Development

Requires Node 20+.

npm install        # install dependencies
npm run build      # compile TypeScript to dist/
npm test           # run the 49-test suite (unit + MCP integration over in-memory transport)
npm run inspector  # open the MCP Inspector UI against dist/index.js

Headless smoke test with the MCP Inspector CLI:

npx -y @modelcontextprotocol/inspector --cli node dist/index.js --vault /path/to/vault --method tools/list

Note: the Inspector CLI passes --tool-arg values as raw strings, so array/object arguments (e.g. edit_note's edits) are rejected by schema validation there — use the Inspector UI, or point an MCP client at the server, to exercise those.

Status

✅ v1 built and smoke-tested — all 8 tools from the spec implemented, 49 tests passing, verified end-to-end with the MCP Inspector.

Install from npm (works on Windows, macOS, and Linux with Node 20+):

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "obsidian-local-mcp", "--vault", "C:\\path\\to\\MyVault"]
    }
  }
}

Prefer installing from source? npx -y github:davidcastaneda838/obsidian-local-mcp --vault <path> works too. macOS/Linux users usually have node on PATH and can use "command": "node", "args": ["obsidian-local-mcp", "--vault", "/Users/me/MyVault"] after a global install. Windows GUI clients that don't inherit your PATH should use the absolute path to node.exe and the installed package's dist/index.js.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables reading, writing, searching, and managing Obsidian vault notes through MCP tools and prompts, allowing AI agents to interact with local knowledge bases.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to list, read, search, create, update, rename, and delete markdown notes in a local Obsidian vault via an HTTP MCP endpoint.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP clients to search, read, list, and append to markdown notes in a local Obsidian vault or folder of .md files.
      -