Get the FREE Ultimate OpenClaw Setup Guide →

obsidian-connect

Query your Obsidian vault using Dataview using an MCP

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio joch-obsidian-connect-mcp npx mcp-remote http://localhost:27124/mcp --header Authorization:${AUTH} \
  --env AUTH="Bearer YOUR_API_KEY"

How to use

This MCP server runs inside the Obsidian plugin and exposes a range of vault-access capabilities to AI agents via the Model Context Protocol. Agents can read, search, and edit your vault contents, run Dataview queries, and perform templated command actions through a unified API. The available tools are grouped into Vault, Edit, Graph, Dataview, Active, and Command categories, enabling tasks from listing files to executing templater-driven automations. To connect, configure the mcpServers.obsidian entry in your Claude Code MCP settings (pointing to the local server URL and providing your API key in the Authorization header). Once connected, you can issue MCP tool calls such as vault_list, vault_read, vault_update, dataview_query, graph_links, command_execute, and more, depending on your agent’s prompts and security settings.

How to install

Prerequisites:

  • Obsidian desktop app installed
  • Node.js 18+ installed on your machine (for building the plugin if you’re installing manually)
  • Optional: Dataview plugin installed in Obsidian for DQL queries

Option A: Install via BRAT (Recommended)

  1. Install the BRAT plugin from Community Plugins in Obsidian.
  2. Open BRAT settings and click "Add Beta Plugin".
  3. Enter: joch/obsidian-connect-mcp
  4. Enable "Connect MCP" in Community Plugins.

Option B: Manual Installation

  1. Build the plugin (in your development environment or from a release):
    npm install
    npm run build
    
  2. Copy the plugin files to your Obsidian vault:
    mkdir -p /path/to/vault/.obsidian/plugins/connect-mcp
    cp main.js manifest.json styles.css /path/to/vault/.obsidian/plugins/connect-mcp/
    
  3. In Obsidian, go to Settings → Community plugins → Enable "Connect MCP".
  4. Configure the plugin:
    • Go to Settings → Connect MCP
    • Click "Generate" to create an API Key
    • Optionally change the port (default: 27124)
    • Click "Start Server" or enable auto-start

Configure Claude Code/MCP (example):

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:27124/mcp",
        "--header",
        "Authorization:${AUTH}"
      ],
      "env": {
        "AUTH": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with the key generated in Obsidian settings.

Additional notes

Tips and common issues:

  • Ensure Obsidian is running and the Connect MCP plugin is enabled when using the MCP server.
  • If you change the API key in Obsidian, update the Authorization header in your MCP client settings accordingly.
  • The default port is 27124; if you change it, update both Obsidian plugin settings and your MCP client configuration.
  • For cloud access, consider using Cloudflare Tunnel or another secure reverse proxy; expose only the MCP endpoint you need.
  • The server runs inside the Obsidian process, so performance and resource usage may vary based on vault size and plugin load.
  • If you encounter permission or CORS-like issues in your agent, verify the Authorization header is present and valid for all requests.

Related MCP Servers

Sponsor this space

Reach thousands of developers