MCP server for Obsidian

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OBSIDIAN_API_KEYYesYour API key for the Obsidian REST API. This key can be found in the Obsidian plugin config.

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
list_files_in_dirLists all files and directories that exist in a specific Obsidian directory.
list_files_in_vaultLists all files and directories in the root directory of your Obsidian vault.
get_file_contentsReturn the content of a single file in your vault.
simple_searchSimple search for documents matching a specified text query across all files in the vault. Use this tool when you want to do a simple text search
patch_contentInsert content into an existing note relative to a heading, block reference, or frontmatter field.
append_contentAppend content to a new or existing file in the vault.
complex_searchComplex search for documents using a JsonLogic query. Supports standard JsonLogic operators plus 'glob' and 'regexp' for pattern matching. Results must be non-falsy. Use this tool when you want to do a complex search, e.g. for all documents with certain tags etc.