Get the FREE Ultimate OpenClaw Setup Guide →

mcp-obsidian

MCP server for Obsidian (TypeScript + Bun)

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio fazer-ai-mcp-obsidian bunx @fazer-ai/mcp-obsidian@latest \
  --env OBSIDIAN_API_KEY="your-obsidian-api-key"

How to use

This MCP server exposes a range of Obsidian-related actions as MCP-enabled tools that can be orchestrated by Claude or any MCP-compatible LLM. It communicates with the Obsidian Local REST API to inspect the vault, read and modify notes, manage periodic notes, execute Obsidian commands, and perform searches using Dataview or JsonLogic. The included tool set covers basic vault interactions (get, patch, post, put, delete) for both individual files and periodic notes, as well as directory listings and vault-wide searches. To use it, configure Claude’s MCP client to point at the server (e.g., via the mcpServers section shown in the configuration) and provide the Obsidian API key either through the env block or a local .env file. Once connected, you can prompt the LLM to run specific tools, such as retrieving a note, updating a front-mmatter field, or executing a vault search, and the server will perform those actions via Obsidian’s Local REST API.

How to install

Prerequisites:

  • Node.js or Bun runtime (recommended Bun for this server)
  • Access to Obsidian Local REST API (with an API key from your Obsidian vault)
  • MCP-capable client (e.g., Claude) configured to load MCP servers

Installation steps:

  1. Install Bun (recommended): curl https://bun.sh/install | bash

    or follow the official Bun installation method for your OS

  2. Install the MCP Obsidian server from npm registry via Bun: bunx @fazer-ai/mcp-obsidian@latest

    This installs the server and prepares it for running under MCP

  3. Configure environment (example):

    • Create or edit your Claude MCP config (e.g., claude_desktop_config.json) to include: { "mcpServers": { "@fazer-ai/mcp-obsidian": { "command": "bunx", "args": ["@fazer-ai/mcp-obsidian@latest"], "env": { "OBSIDIAN_API_KEY": "your-obsidian-api-key" } } } }
  4. Run the server via MCP client configuration. The server will connect to Obsidian’s Local REST API using the provided API key. If you prefer local development, you can run the server directly with Bun using the index script as described in the repository’s development notes.

Optional: If you’re debugging locally, you can also run with a local TS entry point as described in the Development section of the README.

Additional notes

Tips and common issues:

  • Ensure OBSIDIAN_API_KEY is valid and the Local REST API is reachable at the configured host/port (OBSIDIAN_HOST and OBSIDIAN_PORT in your .env).
  • If you upgrade the MCP Obsidian server, pin to @latest in your CLI config to get the newest capabilities, but test in a staging environment first.
  • You can also pass the API key via a .env file placed in the working directory where the MCP server runs; the .env file should mirror the environment variables above.
  • When debugging, MCP servers communicate over stdio. Use the MCP Inspector to monitor requests and logs: npx @modelcontextprotocol/inspector bun /path/to/repo/src/index.ts
  • If you need to run a local development version rather than pulling from npm, the README shows how to point the MCP config to a local TS file path (bun /path/to/repo/src/index.ts).
  • For best compatibility, ensure Obsidian’s Local REST API plugin is running and configured with the same host/port as your OBSIDIAN_PORT setting.

Related MCP Servers

Sponsor this space

Reach thousands of developers