Skip to main content
Glama
obsidian-mcp

obsidian-mcp

by LWaetzig

obsidian-mcp

An MCP (Model Context Protocol) Server that gives AI assistants direct access to your Obsidian vault. Read, write, search, and navigate notes using natural language — with any MCP-compatible client.

Contents


Related MCP server: Obsidian MCP Server

Prerequisites

  • Node.js 18+ — nodejs.org

  • An Obsidian vault (a folder of .md files — no Obsidian app required at runtime)


Installation

You don't run the server manually — your AI client (Claude Desktop, Cursor, etc.) launches it automatically when it starts. All you need to do is build the project once and point your client's config at the output file.

1. Clone and build:

git clone <repo-url> obsidian-mcp
cd obsidian-mcp
npm install
npm run build

This produces dist/index.js — the file every client config will reference.

2. Find your vault path. This is the folder Obsidian opens as your vault, e.g. /Users/yourname/Documents/MyVault.

3. Follow the setup for your client below. Each config tells the client:

  • where the built file is (dist/index.js)

  • what vault to use (OBSIDIAN_VAULT_PATH)


Client Setup

All clients use stdio transport — the server runs as a local subprocess on your machine. No hosting required.


Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "obsidian": {
      "command": "node",
      "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

Quit and relaunch Claude Desktop. A hammer icon (🔨) in the chat input confirms the server is connected.


Claude Code (CLI)

Register the server with the claude mcp add command:

claude mcp add obsidian \
  node /absolute/path/to/obsidian-mcp/dist/index.js \
  -e OBSIDIAN_VAULT_PATH=/path/to/your/vault

Verify it's registered:

claude mcp list

The tools are now available in any Claude Code session.


Cursor

Open Settings → Cursor Settings → MCP (or edit ~/.cursor/mcp.json):

{
  "mcpServers": {
    "obsidian": {
      "command": "node",
      "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

Restart Cursor. The tools appear automatically in Cursor's AI chat and Composer.


VS Code

VS Code supports MCP servers through several extensions. Configuration goes in .vscode/mcp.json (project-scoped) or your user settings.json (global).

GitHub Copilot (VS Code 1.99+)

Create .vscode/mcp.json in your project, or add to User Settings (JSON):

{
  "servers": {
    "obsidian": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

In GitHub Copilot Chat, switch to Agent mode (@workspace) — the obsidian tools will be available automatically.

Cline

Open Cline's settings panel → MCP Servers → Add Server → paste:

{
  "obsidian": {
    "command": "node",
    "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
    "env": {
      "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
    }
  }
}

Continue

Edit ~/.continue/config.json:

{
  "mcpServers": [
    {
      "name": "obsidian",
      "command": "node",
      "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  ]
}

Zed

Edit ~/.config/zed/settings.json:

{
  "context_servers": {
    "obsidian": {
      "command": {
        "path": "node",
        "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
        "env": {
          "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
        }
      }
    }
  }
}

The tools are available in Zed's AI Assistant panel.


Ollama (via mcphost)

Ollama doesn't support MCP natively. Use mcphost as a bridge — it wraps any MCP server and connects it to a local Ollama model.

1. Install mcphost:

go install github.com/mark3labs/mcphost@latest

2. Create a config file (~/.mcphost/config.json):

{
  "mcpServers": {
    "obsidian": {
      "command": "node",
      "args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault"
      }
    }
  }
}

3. Start a chat session with any Ollama model:

mcphost --model ollama:qwen2.5:14b

Tool-use quality depends heavily on the model. Recommended: qwen2.5:14b, llama3.1:8b, mistral-nemo. Models need to support function/tool calling to use MCP tools reliably.


Available Tools

Tool

Description

obsidian_list_notes

List notes in the vault, optionally filtered to a folder. Paginated.

obsidian_read_note

Read the full content of a note by vault-relative path.

obsidian_create_note

Create a new note with optional YAML frontmatter.

obsidian_update_note

Overwrite an existing note's content and frontmatter.

obsidian_append_to_note

Append content to a note (creates it if missing).

obsidian_delete_note

Permanently delete a note.

obsidian_move_note

Move or rename a note to a new path.

obsidian_get_note_metadata

Read only the frontmatter and tags, without loading the body.

obsidian_search_notes

Full-text search across all notes (case-insensitive).

obsidian_search_by_tag

Find all notes with a specific #tag.

obsidian_get_backlinks

Find all notes that [[link]] to a given note.

obsidian_list_folders

List folders in the vault with note counts.

obsidian_create_folder

Create a new folder (parents created automatically).

All tools accept a response_format parameter: "markdown" (default, human-readable) or "json" (structured, for programmatic use).

Example prompts

"Summarise everything in my projects folder"
"Create a note called 'Meeting Notes 2025-04-11' with today's agenda"
"Find all notes tagged #todo and list what's incomplete"
"What notes link back to my 'Home' note?"
"Search for anything mentioning the Q2 launch"
"Append '- [ ] Follow up with design team' to my Daily Note"

Security

  • Path traversal protection — all paths are validated to stay within OBSIDIAN_VAULT_PATH

  • Symlink protection — symlinks inside the vault that point outside it are blocked

  • File size limit — notes larger than 5 MB are rejected to prevent memory exhaustion

  • Response size limit — responses are truncated at 25,000 characters with a clear notice

  • No network access — the server reads and writes local files only; no outbound requests


Extending

The codebase is modular by design. To add a new set of tools:

  1. Create src/tools/my-feature.ts and export a registerMyFeatureTools(server, vault) function

  2. Add it to src/tools/index.ts:

import { registerMyFeatureTools } from './my-feature.js';

export function registerAllTools(server: McpServer, vault: VaultService): void {
  registerNoteTools(server, vault);
  registerSearchTools(server, vault);
  registerFolderTools(server, vault);
  registerMyFeatureTools(server, vault);  // ← add this
}
  1. Run npm run build

To add vault capabilities (e.g. reading canvas files, template expansion), extend VaultService in src/services/vault.ts and call the new methods from your tool handlers.

Available Tools

14 tools
obsidian_append_to_noteAppend to NoteA

Append content to the end of a note. Creates the note if it does not exist.

A newline separator is inserted automatically if the existing content does not end with one. Useful for daily notes, logs, and running task lists.

Args:

  • path (string): Vault-relative path to the note

  • content (string): Markdown content to append

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Updated note metadata.

Inputs: path (required), content (required), response_format.

obsidian_create_folderCreate FolderA
Idempotent

Create a new folder in the vault. Parent folders are created as needed.

Creating a folder that already exists is a no-op (idempotent).

Args:

  • path (string): Vault-relative path for the new folder, e.g. "projects/2025"

Returns: Confirmation message.

Inputs: path (required).

obsidian_create_noteCreate NoteA

Create a new Obsidian note. Fails by default if the note already exists.

Parent folders are created automatically. Frontmatter is serialized as YAML at the top of the file. Use overwrite=true to replace an existing note.

Args:

  • path (string): Vault-relative path for the new note, e.g. "projects/new-idea"

  • body (string): Markdown content for the note body

  • frontmatter (object, optional): Key-value pairs to include as YAML frontmatter

  • overwrite (boolean): Replace the note if it already exists (default: false)

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Metadata of the created note.

Errors:

  • "Note already exists" if the note exists and overwrite=false

Inputs: body (required), path (required), overwrite, frontmatter, +1 more.

obsidian_delete_noteDelete NoteA
Destructive

Permanently delete an Obsidian note from the vault.

This action removes the file from disk and cannot be undone (unless the vault uses a version-control system). Does NOT update backlinks in other notes.

Args:

  • path (string): Vault-relative path to the note

Returns: Confirmation message.

Errors:

  • "Note not found" if the file does not exist

Inputs: path (required).

obsidian_get_note_metadataGet Note MetadataA
Read-onlyIdempotent

Read only the frontmatter metadata of a note, without returning its full body.

More efficient than obsidian_read_note when you only need tags, dates, or custom frontmatter fields.

Args:

  • path (string): Vault-relative path to the note

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Note path, name, frontmatter key-value pairs, tags, and timestamps.

Inputs: path (required), response_format.

obsidian_healthHealth CheckA
Read-only

Check whether the Obsidian MCP server and vault are accessible and responding. Useful for diagnosing connectivity or timeout issues.

Inputs: no named parameters.

obsidian_list_foldersList FoldersA
Read-onlyIdempotent

List all folders in the vault (or a subfolder), with note counts.

Hidden directories (those starting with .) such as .obsidian and .trash are automatically excluded.

Args:

  • folder (string, optional): Vault-relative path to list subfolders of (default: vault root)

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: List of folders with vault-relative paths, names, and note counts.

Inputs: folder, response_format.

obsidian_list_notesList NotesA
Read-onlyIdempotent

List markdown notes in the Obsidian vault, optionally scoped to a folder.

Returns note paths, names, tags, and modification dates. Results are paginated.

Args:

  • folder (string, optional): Vault-relative folder to list (default: vault root)

  • limit (number): Max results per page, 1–100 (default: 20)

  • offset (number): Pagination offset (default: 0)

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Paginated list with total, count, has_more, and next_offset.

Inputs: limit, folder, offset, response_format.

obsidian_move_noteMove or Rename NoteA

Move or rename an Obsidian note to a new vault-relative path.

Parent folders at the destination are created automatically. Does NOT update [[wikilinks]] that point to the old path in other notes.

Args:

  • from_path (string): Current vault-relative path

  • to_path (string): New vault-relative path

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Metadata of the note at its new path.

Errors:

  • "Source note not found" if from_path does not exist

Inputs: to_path (required), from_path (required), response_format.

obsidian_read_noteRead NoteA
Read-onlyIdempotent

Read the full content of an Obsidian note by its vault-relative path.

Accepts paths with or without the .md extension. Returns the note body, parsed frontmatter, all tags (inline and frontmatter), and file timestamps.

Args:

  • path (string): Vault-relative path, e.g. "projects/my-note" or "projects/my-note.md"

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Full note content with frontmatter, body, tags, and file metadata.

Inputs: path (required), response_format.

obsidian_search_by_tagSearch Notes by TagA
Read-onlyIdempotent

Find all notes that have a specific tag.

Searches both inline tags (#tagname in the body) and frontmatter tag arrays. The # prefix is optional — "project" and "#project" are equivalent.

Args:

  • tag (string): Tag to search for (with or without # prefix)

  • limit (number): Max results per page, 1–100 (default: 20)

  • offset (number): Pagination offset (default: 0)

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Paginated list of notes that carry the specified tag.

Examples:

  • All notes tagged "project": tag="project"

  • All notes tagged "#meeting": tag="#meeting"

Inputs: tag (required), limit, offset, response_format.

obsidian_search_notesSearch NotesA
Read-onlyIdempotent

Full-text search across all notes in the vault.

Case-insensitive substring match over note bodies and frontmatter. Returns matching excerpts with up to one line of surrounding context.

Args:

  • query (string): Search string (case-insensitive, minimum 1 character)

  • limit (number): Max results per page, 1–100 (default: 20)

  • offset (number): Pagination offset (default: 0)

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Paginated list of matches — file path, line number, and context excerpt.

Examples:

  • Find meeting notes about Q2: query="Q2 meeting"

  • Find all TODO items: query="- [ ]"

Inputs: query (required), limit, offset, response_format.

obsidian_update_noteUpdate NoteA
DestructiveIdempotent

Overwrite the full content of an existing Obsidian note.

Replaces the entire note including frontmatter. Use obsidian_append_to_note to add content non-destructively. Creates the note if it does not exist.

Args:

  • path (string): Vault-relative path to the note

  • body (string): New markdown body content

  • frontmatter (object, optional): New frontmatter (replaces existing frontmatter)

  • response_format: 'markdown' | 'json' (default: 'markdown')

Returns: Updated note metadata.

Inputs: body (required), path (required), frontmatter, response_format.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools target clearly distinct note or folder operations, and read_note vs get_note_metadata is well explained by the metadata-only optimization. However, create_note and update_note overlap because update_note also creates notes and can overwrite existing content, which could cause misselection despite the descriptions.

    Naming Consistency4/5

    All tool names use snake_case with a consistent obsidian_ prefix, and most follow a predictable verb_noun pattern such as list_notes or search_by_tag. The main deviation is obsidian_health, which uses a noun rather than an action verb, but overall naming remains very readable.

    Tool Count5/5

    The server exposes 14 tools, which is well scoped for an Obsidian vault integration covering note CRUD, search, tags, backlinks, folders, metadata, and health. Each tool appears to earn its place without excessive surface area.

    Completeness4/5

    Core note lifecycle operations are covered, including create, read, update, append, move, delete, search, tags, backlinks, and folder listing/creation. Minor gaps remain around folder deletion/renaming and possibly outgoing-link or batch operations, but the surface is broadly complete for typical vault workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers