Obsidian CLI REST — User guide

Obsidian CLI REST exposes all Obsidian CLI commands as a local HTTP API and MCP server, enabling programmatic control of your vault from scripts, tools, and AI assistants.

Key features

  • REST API — All CLI commands available at /api/v1/cli/* via standard HTTP
  • MCP server — 2-tool Code Mode interface at /mcp for AI assistants (search + execute)
  • API key authentication — Auto-generated Bearer token for secure access
  • Safety controls — Dangerous command gating, per-command blocklist
  • Configurable — Port, bind address, CORS, timeouts, independent REST/MCP toggles

Getting started

Prerequisites

  1. Obsidian desktop app (v1.4.0+)
  2. Obsidian CLI enabled in Obsidian: Settings > General > Advanced > Command line interface

Verify the CLI is available:

obsidian --version

Installation

  1. In Obsidian, go to Settings → Community plugins.
  2. Disable Restricted mode if it’s enabled.
  3. Select Browse, search for REST and MCP server, install it, then enable it.

You can also browse the catalog on the Obsidian Community website.

Manual installation

If the plugin isn’t listed in the community catalog yet (or you want a specific version):

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <Vault>/.obsidian/plugins/cli-rest-mcp/.
  3. Reload Obsidian and enable REST and MCP server in Settings → Community plugins.

BRAT (bleeding edge)

BRAT (Beta Reviewers Auto-update Tool) installs plugins straight from a GitHub repo and keeps them updated automatically. Use this if you want the latest commits — things might break.

  1. Install Obsidian42 - BRAT from Settings → Community plugins → Browse and enable it.
  2. Run BRAT: Add a beta plugin for testing from the command palette.
  3. Paste https://github.com/dsebastien/obsidian-cli-rest.
  4. Select the latest version and confirm.
  5. Enable REST and MCP server in Settings → Community plugins.

Once enabled, the server starts automatically on http://127.0.0.1:27124.

Get your API key

  1. Go to Settings > Obsidian CLI REST
  2. In the Security section, select Copy API key
  3. Use this key in the Authorization header for all requests

Make your first request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  http://127.0.0.1:27124/api/v1/cli/files

You should see a JSON response listing all files in your vault.

Status bar

When the server is running, the status bar shows:

  • CLI REST: 127.0.0.1:27124 — Server is running with the displayed address
  • CLI REST: off — Server is stopped

Select the status bar item to toggle the server on/off.

Obsidian commands

The plugin registers two commands accessible from the command palette:

Command Description
Toggle REST/MCP server Start or stop the server
Copy API key Copy the API key to clipboard

Further reading

About

Created by Sebastien Dubois. Licensed under MIT.

My other Obsidian plugins

Plugin What it does
Agentic Resource Discovery Server Local-first Agentic Resource Discovery publisher and registry that serves your AI skills and tools to agents over a local HTTP and MCP server
Book Exporter Export books (one manifest note + linked chapter notes) to EPUB and PDF via Pandoc
Bookshelf Base Display your notes as a visual bookshelf via a custom Bases view
Dataview Serializer Serialize Dataview queries to Markdown, and keep the Markdown representation up to date
Expander Replace variables across your vault using HTML comment markers. Supports static values and dynamic functions
Ghost Publish Publish your vault notes to a Ghost blog with configurable presets for tags, newsletters, and frontmatter conventions
Graph Explorer Base View A custom Bases view that renders notes as an interactive force-directed graph with explored/unexplored tracking
Hidden Folders Access Index hidden root-level folders (e.g. .claude) so they appear in the file tree, metadata cache, and Bases
Journal Bases Custom Base views for journaling and periodic reviews
Kanban Action Planner Render your notes as configurable Kanban boards and calendars inside Bases, with statuses, ordering, relationships, and scheduling
Life Tracker Capture and visualize the data that matters in your life
Note Village A 2D pixel art village where your notes become villagers you can explore and chat with using AI
Obsidian Starter Kit Adds strong typing support and powerful automation support for notes
Remarkable Synchronizer Connect to the reMarkable cloud, list, download, and sync notebook pages as images
Replicate Use AI models with ease via the Replicate.com integration
Time Machine Browse, compare, and restore previous versions of your notes using built-in file-recovery snapshots
Transcriber Transcribe images to markdown using Ollama vision models
Typefully Publish social media posts with ease using the Typefully integration
Update Time Automatically update front matter to include creation and last update times

Everything I build is documented in my newsletter and on my YouTube channel.

News & support

To stay up to date about this plugin, Obsidian in general, Personal Knowledge Management and note-taking:

If this plugin is useful to you, here are the best ways to support my work ❤️: