obsidian
An MCP server for Obsidian that uses the local REST API plugin
claude mcp add --transport stdio thomastaylor312-obsidian-mcp-server docker run -i obsidian-mcp-server-image
How to use
The Obsidian MCP Server provides programmatic access to an Obsidian vault through the Local REST API plugin. It exposes a set of MCP commands for vault management, search, and interaction with Obsidian UI commands. Through the MCP protocol, clients can authenticate using the Local REST API token, browse and manage files, perform content patches, execute Obsidian commands, and open files in the Obsidian UI. All communication is designed to be local and self-contained, making it suitable for automation, tooling, and integrations that need direct vault access without a GUI.
Once the server is running, you can connect a compatible MCP client via stdin/stdout. Use the available tools to list vault files, read and modify content, search with simple or advanced queries, and execute Obsidian commands. The toolset includes file management (get, create, update, patch, delete), content patching relative to headings or frontmatter, robust search capabilities (including Dataview DQL and JsonLogic), and command/navigation actions (list, execute, open). Ensure you provide the Obsidian Local REST API token for authentication to enable secure access to your vault.
How to install
Prerequisites:
- Obsidian with the Local REST API plugin installed and enabled
- Go 1.22+ (for building from source)
- Optional: Nix (for development environment)
Installation options:
From Docker (recommended for quick start):
- Ensure Docker is installed and running.
- Pull or build the Docker image for the Obsidian MCP Server from your registry:
- docker pull obsidian-mcp-server-image
- or build your own image from a Dockerfile if provided by the project maintainer.
- Run the container (provide your API token via environment or config):
- docker run -i -e OBSIDIAN_API_TOKEN=your-token obsidian-mcp-server-image
From Source (Go-based build):
- Install Go 1.22+.
- Clone the repository: git clone https://github.com/obsidian-mcp-server/obsidian-mcp-server.git
- Build the binary: cd obsidian-mcp-server make build
- Run the binary (example): ./bin/obsidian-mcp-server
Environment setup (required for authentication):
- OBSIDIAN_API_TOKEN: Your Obsidian Local REST API token. Provide this token to the server for authenticated access.
- If you run via Docker, pass the token as an environment variable or via a config file as appropriate for your image.
Post-install validation:
- Start the server and verify it is listening locally.
- Use a MCP client to connect and issue basic commands like get_server_info and list_vault_files to confirm connectivity.
Additional notes
Tips and common issues:
- Ensure the Obsidian Local REST API token is current and has read/write permissions for the vault.
- When using Docker, make sure the container has access to the host's Obsidian vault if needed, or mount the vault path into the container as a volume.
- The MCP protocol communicates via stdin/stdout; ensure your client handles these streams correctly and respects the token-based authentication flow.
- If you encounter connection errors, check that the Local REST API plugin is running in Obsidian and that the default URL (http://127.0.0.1:27123) is reachable from the MCP server environment.
- For patch_file_content and patch-like operations, provide precise targeting (headings, blocks, or frontmatter) to avoid unintended edits.
- When using search, tune context length to balance result relevance and payload size.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go