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
/mcpfor 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
- Obsidian desktop app (v1.4.0+)
- Obsidian CLI enabled in Obsidian: Settings > General > Advanced > Command line interface
Verify the CLI is available:
obsidian --version
Installation
Community plugins (recommended)
- In Obsidian, go to Settings → Community plugins.
- Disable Restricted mode if it’s enabled.
- 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):
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Copy them into
<Vault>/.obsidian/plugins/cli-rest-mcp/. - 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.
- Install Obsidian42 - BRAT from Settings → Community plugins → Browse and enable it.
- Run BRAT: Add a beta plugin for testing from the command palette.
- Paste
https://github.com/dsebastien/obsidian-cli-rest. - Select the latest version and confirm.
- 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
- Go to Settings > Obsidian CLI REST
- In the Security section, select Copy API key
- Use this key in the
Authorizationheader 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
- Usage guide — Detailed usage examples and patterns
- API reference — Endpoints, request/response formats, status codes
- MCP integration — Connect AI assistants
- Command reference — All supported commands
- Configuration — All settings explained
- Tips and troubleshooting — Common issues and solutions
About
Created by Sebastien Dubois. Licensed under MIT.