obsidian_delete_active
Deletes the currently-active file.
Read, append to, patch and replace notes in an Obsidian vault, search it with plain text, Dataview or JsonLogic, and run any command Obsidian itself exposes.
LABSCO SUMMARY
The patch tools are what separate this from a file-writing server: content goes in relative to a heading, block or frontmatter target, so appending to today's note does not mean reading it, rebuilding it and putting it back. Everything routes through the running app, which is also the constraint — the vault has to be open, and the active-file tools follow whichever tab was last touched rather than a path you chose.
A server over a running Obsidian vault with 24 tools, addressing three targets — the active file, a periodic note by period, or any vault file by name.
Obsidian running with the vault open — every tool acts on that vault, on its currently-active file, or on its command list. MIT licensed.
One command plus a key — bunx @fazer-ai/mcp-obsidian@latest, then supply credentials
USE CASES
Address the daily note by period, read what is already there, and patch the new line in under the right heading instead of appending to the bottom of the file.
Start with a text search wide enough to catch a paraphrase, tighten with a Dataview query when the notes carry structure, then pull the file that matched.
Look at what is already in the directory so the new file matches its neighbours, write it, and open it in the app for the edit that follows.
Read the active file, insert into it at a target rather than at the end, and replace it outright only when the rewrite is the point.
List the command IDs Obsidian exposes and run one of them, which is how plugin actions with no tool of their own get triggered.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
obsidian_delete_activeDeletes the currently-active file.
obsidian_delete_fileDeletes a file in the vault.
obsidian_delete_periodicDeletes the periodic note for a given period.
obsidian_execute_commandExecutes a specified command.
obsidian_get_activeReturns the content of the currently-active file.
obsidian_get_commandsReturns a list of available commands.
obsidian_get_fileReturns content of a vault file.
obsidian_get_periodicReturns the periodic note for a given period.
obsidian_list_vault_directoryLists files in a specified directory.
obsidian_list_vault_rootLists files in the root of the vault.
obsidian_open_fileOpens a file, optionally in a new leaf.
obsidian_patch_activeInserts content into the active file relative to a target.
obsidian_patch_fileInserts content into a vault file relative to a target.
obsidian_patch_periodicInserts content into a periodic note relative to a target.
obsidian_post_activeAppends content to the active file.
obsidian_post_fileAppends content to a vault file.
obsidian_post_periodicAppends content to the periodic note.
obsidian_put_activeReplaces content of the active file.
obsidian_put_fileCreates or replaces a vault file.
obsidian_put_periodicReplaces content of the periodic note.
obsidian_search_dataviewSearches using a Dataview query.
obsidian_search_json_logicSearches using a JsonLogic query.
obsidian_simple_searchSearches for text in vault with optional context.
obsidian_statusReturns basic details about the server.
BEFORE YOU INSTALL
24 tools when we connected. Post appends, put replaces the whole note, patch inserts relative to a heading or front-matter field, and delete removes the note. obsidian_execute_command can run any Obsidian palette command.
CONTEXT COST
Rated by the size of the 24 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
bunx @fazer-ai/mcp-obsidian@latest{
"mcpServers": {
"@fazer-ai/mcp-obsidian": {
"command": "bunx",
"args": [
"@fazer-ai/mcp-obsidian@latest"
],
"env": {
"OBSIDIAN_API_KEY": "<YOUR_OBSIDIAN_API_KEY>"
}
}
}
}<YOUR_OBSIDIAN_API_KEY> is the API key shown in the Local REST API plugin's settings in Obsidian. The plugin has to be installed and enabled, and Obsidian running, for any tool to work.
git clone https://github.com/fazer-ai/mcp-obsidian
cd mcp-obsidian
bun installAdd this block; <YOUR_PATH_TO_REPO> is the absolute path of your clone and <YOUR_OBSIDIAN_API_KEY> the key from the Local REST API plugin's settings:
{
"mcpServers": {
"@fazer-ai/mcp-obsidian": {
"command": "bun",
"args": [
"<YOUR_PATH_TO_REPO>/src/index.ts"
],
"env": {
"OBSIDIAN_API_KEY": "<YOUR_OBSIDIAN_API_KEY>"
}
}
}
}