Connect an Obsidian vault
Give your agents read and write access to a live Obsidian vault through the Local REST API plugin — set up in four fields, with the key never leaving your machine.
Connecting a vault gives your agents the vault’s own tools — read a note, write one, search, list, move, run a command — against your live Obsidian, not a copy.
This is independent from project memory, which stays managed by OFM. Turning one on or off never affects the other.
Prerequisites
- Obsidian running, with the vault open.
- The Local REST API community plugin installed and enabled.
- The plugin’s API key, copied from its settings.
No sidecar, no extra process: the plugin serves MCP over HTTP itself.
Setup
In the Memory panel, open the Obsidian vault tab. When the open folder is a vault, OFM says so. Fill in:
| Field | Value |
|---|---|
| Protocol | http |
| Host | 127.0.0.1 |
| Port | 27123 |
| Plugin API key | paste from the plugin settings |
Then tick Connect this vault to the agents and press Test connection. Four possible answers, each actionable:
- Not configured — enter the plugin API key.
- Vault reachable and authenticated — you are done.
- Vault unreachable — Obsidian is closed, or the plugin is off, or it is on another port.
- Vault reachable but key rejected — wrong key; copy it again from the plugin.
The key is stored locally and never leaves your machine. Leaving the field empty on a later save keeps the existing key; Clear key removes it and disables the connection.
Which CLIs get the vault
| CLI | Mechanism |
|---|---|
| Claude Code | Generated --mcp-config file at launch |
| Codex | -c mcp_servers.obsidian.… overrides, token via bearer_token_env_var |
| Antigravity | Project-scoped plugin, bridged through mcp-remote — best effort, see below |
| All others | Not wired |
The Antigravity caveat
Antigravity’s CLI exposes no MCP flag, and its descriptor format understands stdio and SSE but
has no header field — while the Obsidian plugin is HTTP with an Authorization: Bearer header.
OFM bridges the two with mcp-remote launched in stdio, writing the descriptor into
.agents/plugins/ofm/ inside your project rather than into the global ~/.gemini/config/,
which is shared with the Antigravity desktop app and IDE.
Plugin-provided servers could not be observed loading during compatibility testing, so the vault may remain inactive for Antigravity sessions. Details and the documented fallback are in Antigravity.
Why a vault instead of copying notes
OFM never ingests your vault into its own store. Your notes stay in Obsidian, versioned and synced however you already do it, and the agent works on the live files. That means an agent can write a meeting note or update a page — and that you see the change in Obsidian immediately.
Conceptual background: Local knowledge and Obsidian.
Frequently asked
- Do I need to install an extra MCP server for Obsidian?
- No. The Local REST API plugin serves MCP over HTTP itself, so there is no sidecar to install or keep running. Enable the plugin, paste its key, done.
- Why port 27123 rather than 27124?
- Port 27124 is HTTPS with a self-signed certificate, which many clients reject. Port 27123 is plain HTTP on localhost and avoids the certificate problem entirely.