Sébastien Dubois608 downloadsExposes CLI commands as RESTful API endpoints and an MCP server for AI tool integration.
Control your Obsidian vault programmatically. This plugin turns all Obsidian CLI commands into a local HTTP API and MCP server, letting you automate your workflow from scripts, tools, and AI assistants.
You can also browse the catalog on the Obsidian Community website.
If the plugin isn't listed in the community catalog yet (or you want a specific version):
main.js, manifest.json, and styles.css from the latest release.<Vault>/.obsidian/plugins/cli-rest-mcp/.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.
https://github.com/dsebastien/obsidian-cli-rest.Once enabled, the server starts automatically on http://127.0.0.1:27124.
Copy your API key from Settings > REST and MCP server > Security, then start making requests:
# List all files in your vault
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://127.0.0.1:27124/api/v1/cli/files
# Search your vault
curl -H "Authorization: Bearer YOUR_API_KEY" \
"http://127.0.0.1:27124/api/v1/cli/search?query=meeting+notes"
# Create a new note
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"params": {"name": "My Note", "content": "Hello world"}}' \
http://127.0.0.1:27124/api/v1/cli/create
# Read today's daily note
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://127.0.0.1:27124/api/v1/cli/daily/read
# Append to your daily note
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"params": {"content": "- Task from my script"}}' \
http://127.0.0.1:27124/api/v1/cli/daily/append
The plugin exposes all CLI commands organized into categories:
| Category | Examples |
|---|---|
| Files | List, create, read, append, prepend, move, rename, delete |
| Search | Full-text search, search with context |
| Properties | Read, set, and remove frontmatter properties |
| Daily notes | Open, read, append, prepend to daily notes |
| Tags | List tags, get tag info |
| Tasks | List and manage tasks |
| Links | Outgoing links, backlinks, orphans, dead ends |
| Templates | List, read, and insert templates |
| Bookmarks | List and add bookmarks |
| Plugins | List, install, enable, disable, uninstall |
| Themes | List, set, install, uninstall |
| Sync | Status, history, restore |
| Publish | Status, publish, unpublish |
| Workspaces | List, save, load, delete layouts |
| And more | Bases, CSS snippets, file history, word count... |
Standard HTTP endpoints at /api/v1/cli/*. Use from any language or tool that can make HTTP requests.
GET /api/v1/cli/files # Read-only commands use GET
POST /api/v1/cli/create # Write commands use POST
DELETE /api/v1/cli/delete # Delete commands use DELETE
CLI colons become slashes in URLs: property:set becomes /api/v1/cli/property/set.
An MCP endpoint at /mcp for AI assistant integration. Uses the Code Mode pattern — just 2 tools (search and execute) enable progressive discovery of all commands, keeping the tool count fixed regardless of how many CLI commands exist.
search — Discover commands by name, description, or categoryexecute — Run any CLI command by nameConfigure your MCP client with:
http://127.0.0.1:27124/mcpThe plugin is designed with security in mind:
eval, restart, and devtools are blocked unless you explicitly opt inexecFile, not execTo expose the server on your network, change the bind address to 0.0.0.0 in settings. An API key is enforced in this mode.
All settings are accessible from Settings > REST and MCP server.
| Setting | Default | Description |
|---|---|---|
| Port | 27124 |
HTTP server port |
| Bind address | 127.0.0.1 |
127.0.0.1 (local) or 0.0.0.0 (network) |
| Auto-start | On | Start server when plugin loads |
| REST API | On | Enable REST endpoints |
| MCP server | On | Enable MCP endpoint |
| Dangerous commands | Off | Allow eval, restart, devtools, etc. |
| Blocked commands | (none) | Comma-separated list of commands to block |
| CORS | Off | Allow cross-origin requests |
| Request timeout | 30s | Max CLI command execution time |
| Default vault | (none) | Fallback vault for requests without a vault parameter |
MIT License — see LICENSE for details.