MCP server for Obsidian (TypeScript + Bun)

by fazer-ai

51 505 downloads Not rated yet MIT
GitHub

About

Interact with your Obsidian vault using the Local REST API plugin, enabling LLMs to access and manage your notes.

Details

License
MIT

Explore

- 24 tools for reading, writing, and managing notes
- Supports periodic notes (daily, weekly, monthly, etc.)
- Executes Obsidian commands by their ID
- Searches with fuzzy, Dataview-DQL, and JsonLogic queries
- Opens, creates, and deletes files in the vault
- Patches content relative to headings or block references

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP server for Obsidian (TypeScript + Bun)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

You can use the .env.example file as reference to create your own .env file.

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

---

After cloning this repo, you can update Claude's config to run your local version of the server instead of pulling from npm.
This is useful for quickly testing changes before publishing.

>[!NOTE]
>Keep in mind any changes you make on the code will only take effect after restarting the Claude Desktop app.

1. Clone this repo and run bun install to install dependencies.
1. Update your claude_desktop_config.json to point to your local version of the server:

// claude_desktop_config.json
{
  "mcpServers": {
    "@fazer-ai/mcp-obsidian": {
      "command": "bun",
      "args": ["/path/to/repo/src/index.ts"],
      "env": {
        "OBSIDIAN_API_KEY": "your-obsidian-api-key"
      }
    }
  }
}

>[!IMPORTANT]
>Note we use bun instead of bunx here.

| Tool name | Description |
|-----------|-------------|
| 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 |

See Obsidian's Local REST API specifications for more details.

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server for obsidian (typescript + bun)": {
            "mcp-obsidian-fazer-ai": {
                "command": "npx",
                "args": [
                    "@modelcontextprotocol/inspector",
                    "bun",
                    "/path/to/repo/src/index.ts"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-obsidian-fazer-ai": {
        "command": "npx",
        "args": [
            "@modelcontextprotocol/inspector",
            "bun",
            "/path/to/repo/src/index.ts"
        ]
    }
}

NPM Version

> A Model-Context-Protocol (MCP) server that lets Claude (or any MCP-compatible LLM) interact with your Obsidian vault through the Local REST API community plugin – written in TypeScript and runnable with bunx.

---

✨ Components

Tools

| Tool name | Description |
|-----------|-------------|
| 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 |

See Obsidian's Local REST API specifications for more details.

---

Example prompts

```text

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about MCP server for Obsidian (TypeScript + Bun)

Relevant YouTube tutorials, setups, and demos