home / mcp / obsidian mcp server
Provides multi-vault Obsidian access via MCP for reading, writing, searching, and managing notes through the Obsidian Local REST API.
Configuration
View docs{
"mcpServers": {
"boweylou-obsidian-mcp-server-enhanced": {
"url": "https://your-mcp-remote-endpoint.example/mcp",
"headers": {
"MCP_AUTH_KEY": "YOUR_MCP_AUTH_KEY",
"MCP_HTTP_PORT": "3010",
"OBSIDIAN_VAULTS": "JSON array of vault configurations (multi-vault mode)",
"OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY",
"OBSIDIAN_BASE_URL": "http://127.0.0.1:27123",
"MCP_HTTP_STATELESS": "true",
"MCP_TRANSPORT_TYPE": "http"
}
}
}
}You run an MCP server that securely exposes your Obsidian vaults to AI agents and MCP clients. It lets you read, write, search, and manage notes via the Obsidian Local REST API, with multi‑vault support, remote integrations, and robust tooling to integrate AI workflows into your notes ecosystem.
Start the server with a client that understands MCP. You can connect via HTTP for remote access or run a local (stdio) instance that the MCP client can import directly. Use the multi‑vault routing to target a specific vault by setting the vault parameter when invoking tools. The server ships with a rich set of Obsidian tools for reading files, updating content, performing global searches, managing frontmatter and tags, and querying Dataview and Tasks across your vaults. When you issue commands, you can specify the vault to operate on and receive structured results suitable for further automation or prompting.
Prerequisites you need to prepare before installation: Node.js (v18 or later recommended) and npm, Obsidian installed with the Local REST API Plugin enabled, and a configured API key from the Obsidian plugin settings. If you plan remote access, you may also install and configure Tailscale for secure connectivity.
Step by step install and run flow:
# 1) Clone the enhanced MCP server repo
git clone https://github.com/BoweyLou/obsidian-mcp-server-enhanced.git
cd obsidian-mcp-server-enhanced
# 2) Install dependencies
npm install
# 3) Build the project
npm run build
# 4) Start the HTTP server (default port 3010)
npm run start:httpConfigure your environment to tell the server how to connect to your Obsidian instances and how to authenticate clients. You can run in single‑vault mode or multi‑vault mode. Core environment variables include MCP_AUTH_KEY for client authentication and OBSIDIAN_VAULTS or OBSIDIAN_API_KEY/OBSIDIAN_BASE_URL for vault access. The stateless Claude.ai integration, TLS/SSL settings, and cache options are configurable as shown in the examples.
The server supports multiple Obsidian instances through a JSON vault configuration. Each vault has its own API key and base URL. Remote access can be secured with Tailscale Funnel, providing end‑to‑end encryption and automatic certificates without port forwarding. For Claude.ai Remote MCP integration, the server can operate in stateless HTTP mode or traditional session mode, with a dedicated MCP_AUTH_KEY used for authentication.
Security is handled via a dual authentication model: MCP_AUTH_KEY for server access and individual vault API keys for vault access. Enable the in‑memory vault cache to improve performance and resilience, with automatic background refresh and a fallback for global search. Enterprise features include health checks, auto‑restart, and logging with sensitive data redaction.
If you encounter port conflicts, the server can manage ports in the 3010–3013 range and adjust automatically. Ensure your Obsidian Local REST API plugin is running on each vault with its own base URL and API key. When using remote Claude.ai or ChatGPT workflows, use the provided MCP_AUTH_KEY for authentication and point clients to the appropriate MCP HTTP URL or local stdio entry as configured.
Use the Obsidian tools to read, update, and search notes across vaults. For example, read a file from a specific vault, update a note with new content, or run a global text search, all through MCP tooling. For advanced automation, combine vault routing with Tasks and Dataview queries to generate summaries or dashboards that AI agents can consume.
Retrieves the content and metadata of a specified file, with optional formatting and stats.
Modifies a note by appending, prepending, or overwriting content.
Performs search-and-replace within a target note with support for regex and options.
Searches the entire vault with text or regex queries and supports paging.
Lists files and subfolders with optional filters and a tree view.
Atomically get, set, or delete YAML frontmatter keys.
Add, remove, or list tags in a note both in frontmatter and inline.
Permanently delete a file with optional case-insensitive path fallback.
Execute Dataview DQL queries and generate reports.
Query and analyze tasks across vaults with various filters.
Create and manage daily, weekly, monthly, or yearly notes.
Work with block references and heading operations.
Analyze note connections and vault relationships.
Create files from templates with variable substitution.
Get intelligent link suggestions and recommendations.