Obsidian Vault API
Provides tools for interacting with an Obsidian vault, enabling file listing, reading, writing, deleting, frontmatter management, folder operations, search, and local command execution.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Obsidian Vault APIsearch my vault for meeting notes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Obsidian Vault API — Docker
Which version should I use?
If you are only using the MCP server on your desktop together with Obsidian, use the Obsidian Vault API plugin instead. It runs inside the Obsidian desktop application and is the simpler option for local desktop use.
Use this Docker version, Obsidian Vault API Docker, when you want the MCP server to run 24/7 on a server, NAS, or other always-on machine without requiring the Obsidian desktop app.
Desktop use with Obsidian open: use Obsidian Vault API.
24/7 server or NAS deployment: use this Docker version.
Docker-compatible version of Obsidian Vault API. Exposes your Obsidian vault as an MCP server — no Obsidian desktop app required. Runs 24/7 on any server or NAS.
The original plugin runs inside Obsidian and uses the Obsidian API + Electron's Canvas for image processing. This version runs as a standalone Node.js process in Docker, using direct fs operations and sharp for image resizing. All 13 MCP tools from the original are preserved.
Related MCP server: obsidian-remote-mcp
Quick Start
docker-compose (recommended)
services:
vault-api:
build: .
container_name: obsidian-vault-api
restart: unless-stopped
ports:
- "2768:2768"
volumes:
- /path/to/your/vault:/vault
- vault-api-data:/data
environment:
- VAULT_API_KEY=your-secret-key-here
volumes:
vault-api-data:docker compose up -ddocker run
docker run -d \
--name obsidian-vault-api \
-p 2768:2768 \
-v /path/to/your/vault:/vault \
-v vault-api-data:/data \
-e VAULT_API_KEY=your-secret-key-here \
ghcr.io/alexandre1116/obsidian-vault-api-docker:latestWeb UI
After starting the container, open your browser and go to:
http://localhost:2768/The dashboard lets you:
View server status (running/stopped, port, vault name)
Edit configuration (port, bind address, allowed commands) — changes are saved to
/data/config.jsonand persist across restartsRegenerate API key — generates a new secret, requires reconnecting clients
Automatic updates — optionally checks GitHub once a day and installs newer stable versions
Manual updates — checks for and installs the latest stable GitHub version from the Updates card
Restart / Stop the MCP server without stopping the container
Copy connection info — SSE URL, Claude Desktop JSON config, API key
The web UI itself does not require authentication (it's the config page). The MCP endpoints (/sse, /message, /raw) require the API key.
Configuration
Configuration is stored in /data/config.json and persists across container restarts. Environment variables act as initial overrides on first boot — after that, the config file is the source of truth.
Variable | Default | Description |
|
| Path to the vault directory inside the container |
|
| Path for persistent config file |
|
| Port to listen on |
|
| Bind address ( |
| (auto-generated) | API key for MCP authentication. If empty, one is generated and saved |
|
| Glob patterns for allowed shell commands (comma-separated). |
|
| Enable daily GitHub update checks on first boot. The Web UI setting is saved in |
|
| Host reported in image URLs (set to your external address if behind a proxy) |
Automatic updates use the latest stable GitHub release, or the newest semantic-version tag when no release is available. The server downloads the source, builds it inside the container, replaces the compiled application, and exits so Docker can restart it. Keep restart: unless-stopped enabled for automatic restarts.
Connecting Your AI Client
LM Studio / Open WebUI / Any MCP client with SSE support
Add MCP server URL:
http://localhost:2768/sse?key=YOUR_API_KEYClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"obsidian": {
"url": "http://localhost:2768/sse?key=YOUR_API_KEY"
}
}
}Or copy the JSON directly from the Web UI dashboard.
Authentication
Either:
Query parameter:
?key=YOUR_API_KEYHTTP header:
X-Api-Key: YOUR_API_KEY
Available Tools
Tool | Description |
| List vault files — filter by folder or extension |
| Read text files, view images, get binary data as base64 |
| Create or update a text file |
| Create or overwrite a binary file from base64 data |
| Append text to an existing file |
| Delete a file |
| Read YAML frontmatter as parsed key-value pairs |
| Set, update, or delete frontmatter fields |
| Create a new folder |
| Delete a folder |
| Rename or move a folder |
| Keyword search across filenames and content |
| Run a shell command inside the container, in the vault directory |
Image Support
Large images are auto-resized using sharp (pure Node.js, no Electron):
File size | Max dimension | Format |
<= 4 MB | Original | As-is |
4–20 MB | 1024 px | JPEG 85% |
20–100 MB | 800 px | JPEG 85% |
> 100 MB | 512 px | JPEG 85% |
NFS / Network Mounts
The server reads files fresh from the filesystem on every tool call — no caching. NFS mounts work in real-time:
volumes:
- nfs-vault:/vault
volumes:
nfs-vault:
driver: local
driver_opts:
type: nfs
device: ":/path/on/nfs"
o: addr=10.0.0.1,nfsvers=4Health Check
curl http://localhost:2768/healthReturns { "status": "ok", "version": "1.1.2" } publicly. Authenticated requests also return vault, port, and sessions.
Building from Source
git clone https://github.com/Alexandre1116/Obsidian-Vault-API-Docker
cd Obsidian-Vault-API-Docker
docker compose build
docker compose up -dOr without Docker:
npm install
npm run build
VAULT_PATH=/path/to/vault VAULT_API_KEY=secret npm startDifferences from the Original Plugin
Original (Obsidian plugin) | Docker version | |
Runtime | Inside Obsidian desktop app | Standalone Node.js in Docker |
File access | Obsidian Vault API ( | Node.js |
Image resize | Electron Canvas API |
|
File deletion | System trash (recoverable) | Permanent delete |
Settings UI | Obsidian settings tab | Web UI at |
Config storage | Obsidian plugin data |
|
Bind address |
| Configurable ( |
Bridge.js / Claude config | Auto-written by plugin | Copy from Web UI |
License
CC BY-NC-SA 4.0 — same as the original project.
This server cannot be deployed
Maintenance
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides an MCP server that allows AI assistants to interact with Obsidian vaults, enabling reading/writing notes, managing metadata, searching content, and working with daily notes.37MIT
- FlicenseNot gradedqualityCmaintenanceSelf-hosted MCP server that provides remote AI clients with read and write access to Obsidian vaults over HTTPS without needing the Obsidian desktop app running.2-
- AlicenseNot gradedqualityCmaintenanceExposes a local Obsidian vault as a stateless MCP server, letting AI coding agents search, read, browse, and edit notes in real time.7 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents and development tools to interact with Obsidian vaults via MCP, providing direct filesystem access for reading, writing, searching, and managing notes without requiring Obsidian to be running.Apache 2.0