Obsidian

Provides an MCP interface to Obsidian via the Local REST API for vault read/write actions and commands.
  • typescript

38

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "fazer-ai-mcp-obsidian": {
      "command": "bunx",
      "args": [
        "@fazer-ai/mcp-obsidian@latest"
      ],
      "env": {
        "OBSIDIAN_HOST": "localhost",
        "OBSIDIAN_PORT": "27123",
        "OBSIDIAN_API_KEY": "your-obsidian-api-key",
        "OBSIDIAN_PROTOCOL": "http"
      }
    }
  }
}

You can run an MCP server that lets Claude or any MCP-compatible LLM interact with your Obsidian vault using Obsidian’s Local REST API. This server translates model requests into vault actions and returns results, enabling automation, summarization, search, and content manipulation inside Obsidian from your MCP client.

How to use

Set up your MCP client to talk to the Obsidian MCP server through a local or remote endpoint. You will authenticate with your Obsidian Local REST API key and then issue commands through the MCP interface. You can perform actions such as retrieving the active note, patching or appending content, listing files, running Obsidian commands, and performing vault-wide searches.

How to install

{
  "mcpServers": {
    "@fazer-ai/mcp-obsidian": {
      "command": "bunx",
      "args": ["@fazer-ai/mcp-obsidian@latest"],
      "env": {
        "OBSIDIAN_API_KEY": "your-obsidian-api-key"
      }
    }
  }
}

Additional setup and usage notes

Environment variables control how the server connects to Obsidian. Use the following example in your environment file or directly in your MCP client configuration.

OBSIDIAN_API_KEY=   # Obtain this from the Obsidian Local REST API settings
OBSIDIAN_PROTOCOL=http
OBSIDIAN_HOST=localhost
OBSIDIAN_PORT=27123   # Port the Local REST API plugin is bound to

Configuration options you will set

Two ways to provide the Obsidian API key to the server exist. You can pass it directly in your MCP client configuration or supply it via an .env file placed in the working directory where the MCP server runs.

// claude_desktop_config.json
{
  "mcpServers": {
    "@fazer-ai/mcp-obsidian": {
      "command": "bunx",
      "args": ["@fazer-ai/mcp-obsidian@latest"],
      "env": {
        "OBSIDIAN_API_KEY": "your-obsidian-api-key"
      }
    }
  }
}

Debugging and development

If you are developing locally, you can run a dev version directly from your source. The MCP server can be started with Bun so you can point to the source entry file.

# Development start example (local source)
bun /path/to/repo/src/index.ts

Note: open the MCP Inspector URL to monitor requests and logs in real time.

## Security considerations

Keep your Obsidian API key secure. Do not share your key in logs or configuration files that are publicly accessible. Use environment variables to protect sensitive values and restrict access to the MCP server. If you revoke or rotate the API key, update all clients accordingly.

## Troubleshooting

If the server cannot reach Obsidian, verify that Obsidian is running with the Local REST API plugin enabled, the API key is valid, and the host/port match what you configured. Use the MCP Inspector tool to observe requests and logs as they flow through the server.

## Notes

This MCP server exposes actions such as getting the active note, patching content, posting content, listing vault files, executing Obsidian commands, and performing searches across the vault. You can combine these actions in conversations with your MCP client to automate routine vault tasks.

## Available tools

### obsidian\_status

Returns basic details about the Obsidian Local REST API server and your authentication status

### obsidian\_delete\_active

Deletes the note that is currently active in the Obsidian UI

### obsidian\_get\_active

Retrieves the full content of the active note (Markdown or JSON view)

### obsidian\_patch\_active

Inserts, replaces or prepends content in the active note relative to a heading, block reference, or front-matter field

### obsidian\_post\_active

Appends Markdown to the end of the active note

### obsidian\_put\_active

Replaces the entire body of the active note

### obsidian\_get\_commands

Lists every command available in Obsidian’s command palette

### obsidian\_execute\_command

Executes a specific Obsidian command by its ID

### obsidian\_open\_file

Opens the given file inside Obsidian (creates it if missing); optional flag to open in a new leaf

### obsidian\_delete\_periodic

Deletes the current daily / weekly / monthly / quarterly / yearly note for the requested period

### obsidian\_get\_periodic

Returns the content of the current periodic note for the requested period

### obsidian\_patch\_periodic

Inserts / replaces content in a periodic note relative to a heading, block reference, or front-matter field

### obsidian\_post\_periodic

Appends Markdown to the periodic note (creates it if it doesn’t exist)

### obsidian\_put\_periodic

Replaces the entire body of a periodic note

### obsidian\_search\_dataview

Runs a Dataview-DQL query across the vault and returns matching rows

### obsidian\_search\_json\_logic

Runs a JsonLogic query against structured note metadata

### obsidian\_simple\_search

Performs a plain-text fuzzy search with optional surrounding context

### obsidian\_list\_vault\_root

Lists all files and directories at the root of your vault

### obsidian\_list\_vault\_directory

Lists files and directories inside a specific folder of the vault

### obsidian\_delete\_file

Deletes a specific file (or directory) in the vault

### obsidian\_get\_file

Retrieves the content of a file in the vault (Markdown or JSON view)

### obsidian\_patch\_file

Inserts / replaces content in an arbitrary file relative to a heading, block reference, or front-matter field

### obsidian\_post\_file

Appends Markdown to a file (creates it if it doesn’t exist)

### obsidian\_put\_file

Creates a new file or replaces the entire body of an existing file
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational