dsebastien_obsidian-cli-rest/docs
2026-02-21 13:43:54 +01:00
..
api-reference.md feat(all): improved MCP and docs 2026-02-21 13:43:54 +01:00
command-reference.md feat(all): updated docs 2026-02-21 09:00:36 +01:00
configuration.md feat(all): initial implementation of the RESTful API and MCP server 2026-02-20 21:27:23 +01:00
mcp-integration.md feat(all): improved MCP and docs 2026-02-21 13:43:54 +01:00
README.md feat(all): improved MCP and docs 2026-02-21 13:43:54 +01:00
release-notes.md chore(release): 0.1.0 2026-02-21 12:21:51 +00:00
SUMMARY.md feat(all): initial implementation of the RESTful API and MCP server 2026-02-20 21:27:23 +01:00
tips.md feat(all): initial implementation of the RESTful API and MCP server 2026-02-20 21:27:23 +01:00
usage.md feat(all): updated docs 2026-02-21 09:00:36 +01:00

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 installed and in your PATH

Verify the CLI is installed:

obsidian --version

Install the plugin

  1. Open Settings > Community plugins in Obsidian
  2. Search for Obsidian CLI REST and select Install
  3. Select Enable

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.