# mcp-obsidian-cli [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/stonematt/mcp-obsidian-cli  
**GitHub Stars:** 2  
**npm Downloads (last month):** 525  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-obsidian-cli

## Description
MCP server wrapping the Obsidian CLI — full native API access over the Model Context Protocol.

## Tools
Capabilities this server exposes over MCP:

- **obsidian** — Run any Obsidian CLI command. Pass the full command string exactly as you
would on the terminal (minus the leading 'obsidian' binary name). Leading
`vault=NAME` overrides the active vault and is cached for subsequent calls.

Intent -> verb cheatsheet. Use the canonical verb on the right; the convenience
tools (`obsidian_*`) wrap the same verbs with typed args.

PUT
  put new note from template     -> templater:create-from-template template=… file=…
  create plain note              -> create path=… content=…
  append to today's daily        -> daily:append content=…
GET
  read note                      -> read path=…   (or file=…)
  search content                 -> search:context query=… [path=… limit=…]
  list properties / read one     -> properties [file=…]  |  property:read name=… file=…
  list backlinks                 -> backlinks file=…
MOVE/RENAME
  move or rename note            -> move file=… to=…   (or path=…)
DELETE
  delete note                    -> delete path=…
DISCOVER
  list files                     -> files [folder=… ext=…]
  list tags with counts          -> tags counts [sort=name|count]
  list tasks                     -> tasks [daily todo done path=…]
  recently opened                -> recents
  CLI reference                  -> help [verb]

If you don't see the intent here, the CLI's `help` verb is the source of truth.
- **obsidian_daily_read** — Read today's daily note contents.

Returns the full markdown content of today's daily note. Returns an error if no daily note exists for today.
- **obsidian_daily_path** — Get the file path of today's daily note.

Returns the vault-relative path (e.g. 'Daily/2026-04-03.md'). Useful for constructing paths for other tools.
- **obsidian_daily_append** — Append content to today's daily note.

Parameters:
  content (required) — markdown text to append at the end of today's daily note

Examples:
  obsidian_daily_append({ content: "- Meeting with team at 3pm" })
  obsidian_daily_append({ content: "> [!tip] Remember\n> Review PR before EOD" })
- **obsidian_read** — Read a note by file name (wikilink-style) or exact path.

Parameters:
  file (optional) — note name using wikilink resolution (e.g. 'My Note')
  path (optional) — exact vault-relative path (e.g. 'folder/My Note.md')
  One of file or path is required.

Examples:
  obsidian_read({ file: "Meeting Notes" })
  obsidian_read({ path: "Projects/todo.md" })
- **obsidian_search** — Full-text search across the vault with line context.

Parameters:
  query (required) — search terms, supports Obsidian query syntax
  path (optional) — restrict results to a folder path
  limit (optional) — max number of files to return

Examples:
  obsidian_search({ query: "meeting notes" })
  obsidian_search({ query: "project status", path: "Work/", limit: 5 })
- **obsidian_tags** — List tags in the vault with counts.

Returns structured JSON content (an array of { tag, count } objects) alongside the text form, so clients can consume it without re-parsing.

Parameters:
  sort (optional) — 'name' or 'count' (default: name)

Examples:
  obsidian_tags({})
  obsidian_tags({ sort: "count" })
- **obsidian_tasks** — List tasks from vault notes.

Returns structured JSON content (an array of task objects with status, text, file, and line) alongside the text form, so clients can consume it without re-parsing.

Parameters:
  daily (optional) — true to show only today's daily note tasks
  todo (optional) — true to show only incomplete tasks
  done (optional) — true to show only completed tasks
  path (optional) — filter by file path

Examples:
  obsidian_tasks({ daily: true })
  obsidian_tasks({ todo: true, path: "Projects/" })
- **obsidian_properties** — List or read frontmatter properties.

Parameters:
  file (optional) — note name for wikilink resolution
  path (optional) — exact file path
  name (optional) — specific property name to read (requires file or path)

Examples:
  obsidian_properties({}) — list all properties with counts
  obsidian_properties({ file: "My Note" }) — properties of a specific note
  obsidian_properties({ file: "My Note", name: "status" }) — read one property
- **obsidian_create** — Create a new PLAIN note (no Templater expansion).

This wraps the CLI's `create` verb. It does NOT expand Templater placeholders
like `<% tp.date.now() %>` — if your template contains placeholders, use
`obsidian_create_from_template` instead, which routes to
`templater:create-from-template`.

Parameters:
  name (optional) — file name for the new note
  path (optional) — vault-relative path
  content (optional) — initial markdown content (literal, no placeholder expansion)

Examples:
  obsidian_create({ name: "Meeting 2026-04-03", content: "# Meeting Notes\n\n- Attendees: ..." })
  obsidian_create({ path: "Projects/new-idea.md", content: "# New idea" })
- **obsidian_create_from_template** — Create a new note from a Templater template, expanding placeholders.

This wraps the CLI's `templater:create-from-template` verb. Use this whenever
the template contains Templater placeholders such as `<% tp.date.now() %>`,
`<% tp.file.title %>`, or any other `<% ... %>` expression — those are
evaluated by Obsidian's Templater plugin and substituted into the output.
For plain notes with no placeholder expansion, use `obsidian_create`.

Parameters:
  template (required) — vault-relative path to the Templater template (e.g. "Templates/daily.md")
  file (required) — vault-relative output path for the new note (e.g. "Daily/2026-05-18.md")

Examples:
  obsidian_create_from_template({ template: "Templates/daily.md", file: "Daily/2026-05-18.md" })
  obsidian_create_from_template({ template: "Templates/project.md", file: "Projects/new-idea.md" })
- **obsidian_property_set** — Set a frontmatter property on a note.

Parameters:
  name (required) — property name
  value (required) — property value (see type for multi-valued props)
  type (optional) — property type: text (default) | list | number | checkbox | date | datetime
  file (optional) — note name (wikilink resolution)
  path (optional) — exact file path
  One of file or path is required.

Multi-valued properties (tags, aliases, Links, etc.):
  You MUST pass type="list" AND a JSON-array string as value. Without type="list" the value is written as a single scalar string — a comma-separated value is NOT split into YAML list items, and bracketed wikilinks are never split. Use a JSON array universally; it is unambiguous for both plain strings and wikilinks.

Examples:
  obsidian_property_set({ name: "status", value: "done", file: "My Task" })
  obsidian_property_set({ name: "tags", value: "[\"project\", \"active\"]", type: "list", path: "Work/todo.md" })
  obsidian_property_set({ name: "Links", value: "[\"[[plan]]\", \"[[baseline]]\"]", type: "list", file: "My Task" })
- **obsidian_backlinks** — List backlinks to a note.

Parameters:
  file (optional) — note name (wikilink resolution)
  path (optional) — exact file path

Examples:
  obsidian_backlinks({ file: "Project Plan" })
  obsidian_backlinks({ path: "Ideas/brainstorm.md" })
- **obsidian_files** — List files in the vault or a specific folder.

Parameters:
  folder (optional) — filter by folder path
  ext (optional) — filter by file extension (e.g. 'md', 'canvas')

Examples:
  obsidian_files({})
  obsidian_files({ folder: "Projects/", ext: "md" })
- **obsidian_move** — Move or rename a note, selecting it by file name or exact path.

Wraps the CLI's `move` Verb. Provide one of file or path to select the note, and `to` for the destination. Setting `to` to a new name in the same folder renames the note.

Parameters:
  file (optional) — note name using wikilink resolution (e.g. 'My Note')
  path (optional) — exact vault-relative path (e.g. 'folder/My Note.md')
  to (required) — destination folder or vault-relative path
  One of file or path is required.

Examples:
  obsidian_move({ file: "My Note", to: "Archive/" })
  obsidian_move({ path: "Inbox/idea.md", to: "Projects/idea.md" })
- **obsidian_outline** — List the heading outline of a note, selecting it by file name or exact path.

Wraps the CLI's `outline` Verb. Provide one of file or path. Optional `format` controls the output shape; optional `total` returns just the heading count.

Parameters:
  file (optional) — note name using wikilink resolution (e.g. 'My Note')
  path (optional) — exact vault-relative path (e.g. 'folder/My Note.md')
  format (optional) — output format: 'tree' (default), 'md', or 'json'
  total (optional) — true to return the heading count instead of the outline
  One of file or path is required.

Examples:
  obsidian_outline({ file: "Meeting Notes" })
  obsidian_outline({ path: "Projects/plan.md", format: "json" })
  obsidian_outline({ file: "Long Doc", total: true })
- **obsidian_command** — Execute an Obsidian command by its canonical command ID.

Wraps the CLI's `command` Verb. Triggers any core or plugin command exactly as the user would from the command palette — identified by its stable command ID (e.g. 'editor:toggle-bold', 'app:go-back', 'daily-notes').

Discovering IDs: run the generic `obsidian` tool with the `commands` verb to list every available command ID, or `commands filter=<prefix>` to narrow by prefix (e.g. 'commands filter=editor:').

Parameters:
  id (required) — the command ID to execute

Examples:
  obsidian_command({ id: "editor:toggle-bold" })
  obsidian_command({ id: "daily-notes" })
- **obsidian_history** — List the saved file-history versions of a note, selecting it by file name or exact path.

Wraps the CLI's `history` Verb. Returns the version history (snapshots/sync revisions) recorded for a single note — not a list of recently-modified notes. Provide one of file or path to select the note.

Parameters:
  file (optional) — note name using wikilink resolution (e.g. 'My Note')
  path (optional) — exact vault-relative path (e.g. 'folder/My Note.md')
  One of file or path is required.

Examples:
  obsidian_history({ file: "Project Plan" })
  obsidian_history({ path: "Daily/2026-05-20.md" })
- **obsidian_template_read** — Read the content of a template by name from the vault's templates folder.

Wraps the CLI's `template:read` Verb. Returns the raw template text. Set `resolve` to expand the template's variables (e.g. Templater placeholders) instead of returning them literally; pass `title` to supply the title used during that variable resolution.

Parameters:
  name (required) — template name (as it appears in the templates folder)
  resolve (optional) — true to resolve/expand template variables
  title (optional) — title used for variable resolution (with resolve)

Examples:
  obsidian_template_read({ name: "daily" })
  obsidian_template_read({ name: "meeting", resolve: true, title: "Standup 2026-05-20" })
- **obsidian_rename** — Rename a note, selecting it by file name or exact path.

Wraps the CLI's `rename` Verb. Provide one of file or path to select the note, and `name` for the new file name. Renaming changes only the name within the same folder; use obsidian_move to relocate a note to a different folder.

Parameters:
  file (optional) — note name using wikilink resolution (e.g. 'My Note')
  path (optional) — exact vault-relative path (e.g. 'folder/My Note.md')
  name (required) — the new file name
  One of file or path is required.

Examples:
  obsidian_rename({ file: "Draft", name: "Final" })
  obsidian_rename({ path: "Inbox/idea.md", name: "refined-idea.md" })
- **obsidian_delete** — Delete a note, selecting it by file name or exact path.

Wraps the CLI's `delete` Verb. DESTRUCTIVE: by default the note is moved to the system trash (recoverable). Pass `permanent: true` to skip the trash and delete irrecoverably — there is no undo for a permanent delete.

Parameters:
  file (optional) — note name using wikilink resolution (e.g. 'My Note')
  path (optional) — exact vault-relative path (e.g. 'folder/My Note.md')
  permanent (optional) — true to skip trash and delete permanently (irreversible)
  One of file or path is required.

Examples:
  obsidian_delete({ file: "Old Draft" }) — moves to trash
  obsidian_delete({ path: "Inbox/spam.md", permanent: true }) — irreversible
- **obsidian_recents** — List recently opened files.

Returns the most recently opened files in the vault, ordered by last access time.
- **obsidian_help** — Get Obsidian help: a live verb index from the CLI, or reference docs by slug.

Parameters:
  topic (optional) — a verb name (e.g. "read", "daily:append", "property:set") OR a reference-doc slug (cli, markdown, bases, canvas)

Behavior:
  - No topic — returns the live, category-grouped verb index parsed from the CLI's `help` output (Read, Write, Edit, Discover, Tasks, Daily, Properties, Plugins, Dev, Eval).
  - Verb name — returns that verb's description and flag list from the live manifest.
  - Doc slug — returns the Kepano-derived reference prompt (markdown / bases / canvas / cli syntax).
  - Collision rule: the four reserved doc slugs (cli, markdown, bases, canvas) always return their reference doc, even when a CLI verb shares the name (e.g. `bases`). The shadowed verb still appears in the no-arg verb index.

Examples:
  obsidian_help({}) — browse the verb catalog
  obsidian_help({ topic: "read" }) — live verb help for `read`
  obsidian_help({ topic: "markdown" }) — Obsidian-flavored markdown reference
  obsidian_help({ topic: "bases" }) — Bases YAML schema, filters, formulas
  obsidian_help({ topic: "canvas" }) — JSON Canvas reference
  obsidian_help({ topic: "cli" }) — CLI command syntax reference

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-obsidian-cli": {
    "command": "npx",
    "args": ["-y","mcp-obsidian-cli"]
  }
}
```

## Documentation & README

# mcp-obsidian-cli

[![Obsidian CLI](https://img.shields.io/badge/Obsidian-CLI-7C3AED?logo=obsidian&logoColor=white)](https://help.obsidian.md/cli)
[![npm version](https://img.shields.io/npm/v/mcp-obsidian-cli.svg)](https://www.npmjs.com/package/mcp-obsidian-cli)
[![npm downloads](https://img.shields.io/npm/dm/mcp-obsidian-cli.svg)](https://www.npmjs.com/package/mcp-obsidian-cli)
[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=stonematt%2Fmcp-obsidian-cli)
[![Node](https://img.shields.io/node/v/mcp-obsidian-cli.svg)](https://nodejs.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Your thinking starts in Claude Desktop, not in Obsidian. You research, draft, argue with the model, and when something's worth keeping you say "save this to my vault." It lands in the right place: your template, your properties, today's daily note, wired into your link graph. No tab-switch, no copy-paste.

**Installing this?** Start at [Install](#install). One prompt in Claude Code handles the whole setup.

![Saving a Claude Desktop conversation into an Obsidian vault, then searching the vault from chat](https://raw.githubusercontent.com/stonematt/mcp-obsidian-cli/master/docs/assets/demo.gif)

Two halves:

- **Capture** — turn a conversation into a real note, filed where it belongs.
- **Augment** — pull what's already in the vault (backlinks, full-text search) back into the chat to inform or update a note.

Needs Obsidian running. It can sit minimized, so you never switch to it.

Using this from Claude Code? The native `obsidian-cli` skill fits better there: direct CLI, no MCP layer. Installing is separate. The prompt below runs in Claude Code.

## Install

Run the prompt below in Claude Code. It checks Node, enables the Obsidian CLI, writes your Claude Desktop config, and verifies the connection. Only hand-edit the config if that path fails.

```text
Fetch https://raw.githubusercontent.com/stonematt/mcp-obsidian-cli/master/docs/INSTALL.md
and follow it end to end to install the mcp-obsidian-cli MCP server for my Claude Desktop.
Ask me for my Obsidian vault name and folder path, then handle everything else — check Node,
enable the Obsidian CLI, edit my Claude Desktop config, and verify it works.
```

Full walkthrough, including failure modes: **[docs/INSTALL.md](https://github.com/stonematt/mcp-obsidian-cli/blob/master/docs/INSTALL.md)**.

**Run the server directly.** This starts the server in your terminal and installs nothing:

```bash
npx mcp-obsidian-cli
```

## Requirements

The install prompt checks each of these. Listed here for reference:

- Obsidian running with its command line interface enabled (Settings → General → Advanced → **Command line interface**). The CLI ships built into Obsidian — nothing extra to install.
- `obsidian-cli` reachable. macOS auto-detects it inside the Obsidian app bundle, so there is nothing to configure. Linux and Windows have no auto-detection: point `OBSIDIAN_CLI_PATH` at the binary yourself.
- Node.js >= 18

## How it works

The server exposes Obsidian CLI commands as MCP tools. A generic pass-through tool handles the full CLI surface (80+ commands), plus typed convenience tools for common operations:

| Tool | Description |
|------|-------------|
| `obsidian` | Generic pass-through — run any CLI command (ships intent→verb cheatsheet, pre-call manifest validation, reload detection) |
| `obsidian_help` | Manifest-backed help — list verbs by category, or look up a single verb / doc topic |
| `obsidian_daily_read` | Read today's daily note |
| `obsidian_daily_append` | Append to daily note |
| `obsidian_read` | Read a note by name or path |
| `obsidian_search` | Full-text search with context |
| `obsidian_tags` | List tags with counts |
| `obsidian_tasks` | Query tasks (daily, todo, done) |
| `obsidian_properties` | Read frontmatter properties |
| `obsidian_create` | Create a new plain note (no Templater expansion) |
| `obsidian_create_from_template` | Create a note from a Templater template (expands `<% ... %>` placeholders) |
| `obsidian_property_set` | Set a frontmatter property |
| `obsidian_backlinks` | List backlinks to a note |
| `obsidian_files` | List vault files |
| `obsidian_recents` | Recently opened files |

The generic `obsidian` tool means the MCP server never falls behind the CLI — new CLI commands work immediately without a server update.

## What it can do

It talks to the running Obsidian instance, so it works with your vault the way Obsidian sees it:

- **Backlinks and full-text search** across your resolved link graph and search index (the augment half).
- **Templater templates** and typed **frontmatter properties** when creating or updating notes.
- **Daily notes**, task queries, and tag counts.
- **80+ commands** through the generic pass-through. No API keys, no REST plugin. Just the official Obsidian CLI.

<details>
<summary><strong>Manual config (if you're not using Claude Code)</strong></summary>

Automated installers should use the prompt under [Install](#install), which handles vault name, CLI path, and verification. This block is the hand-edit fallback.

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "mcp-obsidian-cli"],
      "env": {
        "OBSIDIAN_VAULT": "my-vault"
      }
    }
  }
}
```

</details>

## Environment variables

| Variable | Default | Description |
|---|---|---|
| `OBSIDIAN_VAULT` | _(none)_ | Target vault by name |
| `OBSIDIAN_CLI_PATH` | `obsidian-cli` | Path to CLI binary |
| `OBSIDIAN_TIMEOUT_MS` | `15000` | Command timeout |
| `XDG_CONFIG_HOME` | `~/.config` | Base path for config file |

## Config file

The server can read settings from a YAML config file:

- Default: `~/.config/mcp-obsidian-cli/config.yaml`
- With `XDG_CONFIG_HOME`: `$XDG_CONFIG_HOME/mcp-obsidian-cli/config.yaml`

Config file format:
```yaml
vault: "my-vault"
cliPath: "obsidian-cli"
timeoutMs: 15000
```

Config precedence: env vars > config file > hardcoded defaults

## Bugs / requests

File an issue: https://github.com/stonematt/mcp-obsidian-cli/issues/new/choose. Bug template asks for version, MCP client, tool call, and response — quick to fill, fast to act on.

## License

MIT

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Z8Z41G13PX)

Maintained by [@stonematt](https://github.com/stonematt)
Licensed under the MIT License

**Trademark Notice:** "Obsidian" is a trademark of Obsidian Publishing, Inc. This project is not affiliated with or endorsed by Obsidian Publishing.

