Labsco
MCP SERVER

Obsidian MCP Server

by cyanheads

Read, search and edit an Obsidian vault down to a single heading or frontmatter key, without opening the app.

Note-Taking & Personal Knowledge BasesVerified
Summary
It edits the part of a note that should change, instead of rewriting the file around it.

The patch call targets a heading, a block reference or a frontmatter field, so an agent appending to your meeting log leaves the rest of the note untouched — and the document-map projection is how it finds those targets first. The folder allowlists are the other half: point writes at one project folder and the rest of the vault is out of reach.

What it is

A local server over an Obsidian vault, talking to the vault through Obsidian's own Local REST API plugin: reading with a choice of projection, listing, text and predicate search, whole-file writes, in-place section edits, frontmatter and tag management, and deletion.

What you get
  • A note read by path, the active file, or a periodic note — daily, weekly, monthly, quarterly or yearly — in one of four projections: raw body, the full object with frontmatter, tags and stat, a structural document map, or a single section
  • Notes and subdirectories listed under a path, with depth, extension and name-pattern filters and a 1000-entry cap
  • Search by text substring, a JSONLogic predicate, or BM25 ranking when the Omnisearch plugin is reachable, paginated by cursor
  • Whole-file writes that refuse to clobber an existing note unless you say overwrite, and appends that create the file when it is missing
  • Surgical edits: append to, prepend to or replace a heading, block reference or frontmatter field in place
  • Search and replace inside one note, literal or regex, with whole-word, whitespace-flexible and case options and capture-group replacement
  • Frontmatter handled a key at a time — get, set or delete, atomically — and tags added, removed or listed in the frontmatter array, inline in the body, or both
  • Every tag in the vault with usage counts, hierarchical parents included, so work/tasks counts toward work as well
  • Deletion that asks the user to confirm before it happens, and a call that opens a file in the Obsidian window
  • Folder allowlists for reads and writes, and a read-only switch that denies every write regardless of the rest
Requirements

Node.js, Obsidian running, and its Local REST API community plugin installed and enabled — that plugin issues the bearer token this server reads from OBSIDIAN_API_KEY, and nothing works until it is on. OBSIDIAN_BASE_URL defaults to http://127.0.0.1:27123, which needs the plugin's non-encrypted HTTP server switched on; the always-on HTTPS port is 27124 and uses a self-signed certificate, which is why TLS verification is off by default. OBSIDIAN_READ_PATHS and OBSIDIAN_WRITE_PATHS narrow the agent to named folders, and OBSIDIAN_READ_ONLY overrides both. The command-palette pair stays hidden unless OBSIDIAN_ENABLE_COMMANDS is true, because Obsidian commands are opaque and some destroy things. Apache-2.0.

Setup effort

One command plus a key — npx -y obsidian-mcp-server, then supply credentials