mcp-obsidian
Author: MarkusPfundstein
Description: MCP server that interacts with Obsidian via the Local REST API community plugin, exposing tools for listing, reading, searching and modifying notes inside an Obsidian vault.
Stars: 1.6k
Forks: 197
License: MIT License
Category: Specialized
Overview
Installation
git clone https://github.com/MarkusPfundstein/mcp-obsidian.git
cd mcp-obsidianpython -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activatepip install -r requirements.txtOBSIDIAN_BASE_URL=https://127.0.0.1:27123 # URL where the Obsidian REST-API plugin is listening
OBSIDIAN_API_TOKEN=<your-obsidian-token> # Token generated in the plugin
MCP_HOST=0.0.0.0
MCP_PORT=8000python -m mcp_obsidian # or: uvicorn mcp_obsidian.app:app --host $MCP_HOST --port $MCP_PORTcurl http://localhost:8000/healthz # Should return OKConfigure nginx/Caddy/Traefik if you want TLS or a public URL.list_files_in_vault
Lists all files and directories in the root directory of the Obsidian vault.
list_files_in_dir
Lists all files and directories inside a specified directory within the Obsidian vault.
get_file_contents
Returns the content of a single file in the vault.
search
Searches across all files in the vault for documents matching a given text query.
patch_content
Inserts content into an existing note relative to a heading, block reference, or front-matter field.
append_content
Appends content to a new or existing file in the vault.
delete_file
Deletes a file or directory from the vault.