obsidian-rest-api

Calls the Obsidian Local REST API over HTTP for vault operations missing from MCP tools.

3.4k|487|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/davepoon/buildwithclaude --skill obsidian-rest-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obsidian-rest-api
Source: https://github.com/davepoon/buildwithclaude/tree/main/plugins/all-skills/skills/obsidian-rest-api
Command: npx skills add https://github.com/davepoon/buildwithclaude --skill obsidian-rest-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

The connected obsidian MCP server exposes only a subset of the Obsidian Local REST API, so operations like renaming a note, atomically overwriting a file, acting on the currently open note, running Obsidian commands, or listing vault tags have no MCP tool and would otherwise require fragile workarounds like delete-and-recreate.

Core Features & Use Cases

  • Full REST API coverage: Exposes every endpoint of the Obsidian Local REST API, including the custom MOVE method for renaming/moving notes while preserving history and updating internal links.
  • Authenticated wrapper script: The scripts/olrapi.sh wrapper resolves host, port, and API key from ~/.claude.json or OBSIDIAN_* environment variables and handles the plugin's self-signed TLS certificate.
  • Complete endpoint reference: references/api_reference.md documents all 16 paths, header enums (Operation, Target-Type, Target-Scope), search formats (JsonLogic/Dataview), and periodic-note CRUD.
  • Use Case: Rename 3-Resources/Draft.md to 3-Resources/Final.md with a single MOVE call that returns HTTP 204, preserving file history and updating internal links instead of deleting and recreating the note.

Quick Start

Ask the assistant to rename a note in your Obsidian vault using the obsidian-rest-api skill's MOVE endpoint, for example moving "Inbox/todo.md" into the "Archive/" folder.

Frequently Asked Questions about obsidian-rest-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rename or move a note in Obsidian from the API?

Use the custom MOVE HTTP method on /vault/{filename} with a Destination header containing the new vault-relative path. This preserves file history and updates internal links, returning 204 on success or 409 if the destination exists.

When should I use the Obsidian Local REST API instead of MCP tools?

Use the mcp__obsidian__* tools first for read, append, patch, delete, and search. Fall back to the REST API only for operations with no MCP equivalent: MOVE/rename, atomic PUT overwrites, active-file operations, running commands, opening notes in the UI, and listing tags.

How does the script authenticate with the Obsidian Local REST API?

The olrapi.sh wrapper reads OBSIDIAN_API_KEY, OBSIDIAN_HOST, and OBSIDIAN_PORT from the obsidian MCP server config in ~/.claude.json, with environment variables as overrides. It sends the key as a Bearer token and uses curl -k for the self-signed TLS certificate on port 27124.

Why does a MOVE request return HTTP 409?

A 409 response means the destination file already exists and the default Allow-Overwrite behavior is false. Add the header 'Allow-Overwrite: true' to force the move and replace the existing file.

Can I update only part of a note through the REST API?

Yes, PATCH endpoints accept an Operation header (append, prepend, replace) plus Target-Type (heading, block, frontmatter) and Target headers to modify a specific section of a note instead of the whole file.