Skip to main content
Glama
Alexandre1116

Obsidian Vault API

Obsidian Vault API — Docker

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.

Quick Start

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 -d

docker 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:latest

Web 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.json and persist across restarts

  • Regenerate API key — generates a new secret, requires reconnecting clients

  • 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

VAULT_PATH

/vault

Path to the vault directory inside the container

DATA_DIR

/data

Path for persistent config file

VAULT_API_PORT

2768

Port to listen on

VAULT_API_BIND

0.0.0.0

Bind address (0.0.0.0 for Docker / network access)

VAULT_API_KEY

(auto-generated)

API key for MCP authentication. If empty, one is generated and saved

VAULT_API_ALLOWED_COMMANDS

*

Glob patterns for allowed shell commands (comma-separated). * = all

VAULT_API_HOST

127.0.0.1:2768

Host reported in image URLs (set to your external address if behind a proxy)

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_KEY

Claude 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_KEY

  • HTTP header: X-Api-Key: YOUR_API_KEY

Available Tools

Tool

Description

list_files

List vault files — filter by folder or extension

read_file

Read text files, view images, get binary data as base64

write_file

Create or update a text file

write_binary

Create or overwrite a binary file from base64 data

append_file

Append text to an existing file

delete_file

Delete a file

read_frontmatter

Read YAML frontmatter as parsed key-value pairs

update_frontmatter

Set, update, or delete frontmatter fields

create_folder

Create a new folder

delete_folder

Delete a folder

rename_folder

Rename or move a folder

search

Keyword search across filenames and content

run_local_command

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=4

Health Check

curl http://localhost:2768/health

Returns { "status": "ok", "version": "1.1.0" } 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 -d

Or without Docker:

npm install
npm run build
VAULT_PATH=/path/to/vault VAULT_API_KEY=secret npm start

Differences from the Original Plugin

Original (Obsidian plugin)

Docker version

Runtime

Inside Obsidian desktop app

Standalone Node.js in Docker

File access

Obsidian Vault API (app.vault)

Node.js fs

Image resize

Electron Canvas API

sharp (native, no GUI dependency)

File deletion

System trash (recoverable)

Permanent delete

Settings UI

Obsidian settings tab

Web UI at http://host:2768/

Config storage

Obsidian plugin data

/data/config.json (Docker volume)

Bind address

127.0.0.1 only

Configurable (0.0.0.0 by default)

Bridge.js / Claude config

Auto-written by plugin

Copy from Web UI

License

CC BY-NC-SA 4.0 — same as the original project.

-
license - not tested
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Alexandre1116/Obsidian-Vault-API-Docker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server