Local REST APICAUTION
A secure REST API and Model Context Protocol (MCP) server for your vault.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Give your scripts, browser extensions, and AI agents a direct line into your Obsidian vault via a secure, authenticated REST API.
- Interactive API docs: https://coddingtonbear.github.io/obsidian-local-rest-api/
- Obsidian Community page: https://community.obsidian.md/plugins/obsidian-local-rest-api/
- What you can do
- Quick start
- REST API
- MCP clients
- Claude Code
- Claude Desktop
- Cursor
- Other clients
- API overview
- Browser clients and response headers
- Patching notes
- Raw-content mode
- Targeting specific sections
- Searching
- MCP (Model Context Protocol)
- Protocol revisions
- Connecting a client
- Available tools
- Binary files and attachments
- Signed URLs
- Available resources
- API Extensions
- Typed extension API
- Known extensions
- Contributing
- Credits
What you can do
Access your vault through the REST API or the built-in [MCP server](https://modelcontextprotocol.io/) — both interfaces expose the same core capabilities, so scripts, browser extensions, and AI agents all speak the same language.
- Read, create, update, or delete notes — full CRUD on any file in your vault, including binary files
- Surgically patch specific sections — target a heading, block reference, or frontmatter key and append, prepend, replace, delete, or move just that section without touching the rest of the file
3205801641e5OBSERVED · 2026-09-22Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add obsidian-local-rest-api --env OBSIDIAN_API_KEY=${OBSIDIAN_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"obsidian-local-rest-api": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"OBSIDIAN_API_KEY": "${OBSIDIAN_API_KEY}"
}
}
}
}Exposed tools (7)
7 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
custom_tool | read | First |
extension_tool | read | From an extension |
my_tool | read | Does something |
notifying_tool | read | From an extension |
removable_tool | read | Desc |
temporary_tool | read | Goes away |
vault_list | read | Override |
Trust audit
CAUTIONgrade B · trust 87/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (3 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (14)
expect(crypto.privateKey).toMatch(/^-----BEGIN RSA PRIVATE KEY-----/);
expect(crypto.caPrivateKey).toMatch(/^-----BEGIN RSA PRIVATE KEY-----/);
await expect(cb({ path: "a.md", destination: "../../../etc/passwd" })).rejects.toThrow(await expect(cb({ path: "a.md", destination: "../../../etc/passwd" })).rejects.toThrow(["relative traversal", "../../Ausserhalb.md"],
["deep relative traversal", "../../../../some/other/writable/path/file.md"],
["traversal in the middle", "notes/../../outside.md"],
curl -k https://127.0.0.1:27124/
https://127.0.0.1:27124/vault/
https://127.0.0.1:27124/vault/path/to/note.md
https://127.0.0.1:27124/vault/path/to/note.md/heading/My%20Section
https://127.0.0.1:27124/vault/path/to/note.md
{ host: hostname, port: Number(port), rejectUnauthorized: false, servername: hostname },@eslint/js, @types/cors, @types/express, @types/glob-to-regexp, @types/jest, @types/mime-types, @types/node, @types/node-forge
Gates applied: no_behavioural_pass.
3205801641e5full audit observations/trust-audit/mcp-server/coddingtonbear__local-rest-api.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-22 | 3205801641e5 | CAUTION | B | 87 | score 88 -> 87 |
| 2026-09-18 | 47c34ac34b2c | CAUTION | B | 88 | first audit |
Questions
What is the Local REST API MCP server?
A secure REST API and Model Context Protocol (MCP) server for your vault.
What tools does Local REST API expose?
7 in total: 7 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Local REST API safe to connect to an agent?
With care. The audit graded it B (87/100) and found 14 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does Local REST API need?
It reads OBSIDIAN_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Local REST API run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as obsidian-local-rest-api at 5.2.0.
How current is this page?
The grade is for one exact copy of the source (3205801641e5), read on 2026-09-22. The repository is watched and re-audited when it changes.