MCP server for Obsidian
@MarkusPfundstein
MCP server that interacts with Obsidian via the Obsidian rest API community plugin
Overview
What is MCP server for Obsidian?
MCP server to interact with Obsidian via the Local REST API community plugin. It allows MCP clients (like Claude Desktop) to read, search, and modify notes in an Obsidian vault.
How to use MCP server for Obsidian?
First install and enable the Obsidian Local REST API plugin, then copy the API key. Configure the server by setting OBSIDIAN_API_KEY, OBSIDIAN_HOST (default 127.0.0.1), and OBSIDIAN_PORT (default 27124) either in the MCP server config or a .env file. Run the server via uvx mcp-obsidian or using the development configuration with uv.
Key features of MCP server for Obsidian
- List all files and directories in the vault root
- List files in a specific Obsidian directory
- Get the full content of any single file
- Search for documents matching a text query
- Insert content relative to a heading, block, or frontmatter field
- Append content to a new or existing file
- Delete a file or directory from the vault
Use cases of MCP server for Obsidian
- Retrieve and summarize the last architecture call note
- Search all vault files mentioning a topic like Azure CosmosDb
- Summarize meeting notes and save them as a new note with an email‐ready introduction
FAQ from MCP server for Obsidian
What is MCP server for Obsidian?
It is a Model Context Protocol server that enables MCP clients to read, search, and edit notes in Obsidian through the Local REST API plugin.
What are the prerequisites to use MCP server for Obsidian?
You need Obsidian with the Local REST API community plugin installed and enabled, and the API key from that plugin’s configuration.
How do I configure environment variables?
Set OBSIDIAN_API_KEY, OBSIDIAN_HOST (default 127.0.0.1), and OBSIDIAN_PORT (default 27124) either in the MCP server JSON config under env or in a .env file in the working directory.
What tools does MCP server for Obsidian provide?
It provides seven tools: list_files_in_vault, list_files_in_dir, get_file_contents, search, patch_content, append_content, and delete_file.
Where does the data live?
All data resides in your Obsidian vault on your local machine. The server accesses it via the Obsidian Local REST API plugin, which runs locally.