Purpose: obsidian-mcp-server is a Model Context Protocol (MCP) server that lets AI assistants such as Claude interact with Obsidian vaults, accessing notes, creating content, managing tags, and searching the knowledge base through natural conversation. Requires Node.js 20.19 or newer.
Main capabilities: Notes support create, read, update, delete (with safety confirmation), can overwrite, append, or prepend writes, batch read multiple notes, get metadata without reading content, move/copy notes, read, append, or replace specific sections by heading. For frontmatter and tags, it can parse YAML frontmatter into structured JSON (based on gray-matter), add/remove tags (frontmatter or inline), audit notes missing required tags, list all tags and their usage counts; for search, it supports full-text search of content and filenames (with context), backlink lookup, broken wiki link detection, and regex-enabled batch find and replace. Directory operations include create, delete, rename, and list contents. Optional semantic search is based on Postgres + pgvector with local Ollama embeddings, using heading-aware chunking, hybrid vector and full-text retrieval (RRF fusion), and an incremental indexer (polling rather than inotify, suitable for NFS/SMB), disabled by default, enabled only when DATABASE_URL is set, and embeddings do not leave the local network.
Usage: The server only supports MCP over HTTP + SSE, with no stdio mode. After startup, clients connect http://HOST:PORT/sse;仅支持 clients using stdio need to bridge through mcp-remote. You can use npm start (first export VAULT_PATH and PORT, default port 3000), or use the Docker image ghcr.io/smith-and-web/obsidian-mcp-server:latest (for production it is recommended to pin a version tag), or use Docker Compose to mount /vault:rw and set VAULT_PATH=/vault; health check curl http://localhost:3001/health。语义搜索需 Postgres 16+ with pgvector (set shm_size: 1g when creating the HNSW index), ollama pull nomic-embed-text (768 dimensions) or bge-m3 (1024 dimensions), add DATABASE_URL, OLLAMA_URL, EMBED_MODEL to the server; run the indexer with the same image using command: ["node", "dist/indexer.js"], mount the vault read-only, and node dist/indexer.js --once --verbose can perform a single run. After setting API_KEY, /sse and /message require an Authorization: Bearer header (as of 1.6.0 the ?api_key= query parameter was removed), while /health remains public; optional REQUIRE_TAILSCALE_LOGIN relies on headers from tailscale serve.
Use cases and limitations: Suitable for remotely managing personal or team Obsidian knowledge bases, batch organizing tags and links, and letting AI assistants retrieve notes. Limitations: The server listens on all network interfaces, so API_KEY must be set or it must be bound to loopback; remote exposure must use HTTPS; paths are restricted within VAULT_PATH; semantic search is disabled by default, and once enabled the chunk text is stored in plaintext in Postgres, requiring the same security and backup strategy as the vault; the embedding model and dimensions are fixed on first run, and changing them requires --reindex; CORS currently allows all origins, and it is recommended to restrict it in production. Cost, pricing, and more detailed installation steps are not yet provided.