Obsidian MCP server

Bridges Claude with Obsidian note-taking application, enabling direct interaction with markdown notes through tools for listing, reading, creating, updating, and searching vault content.
Back to servers
Setup instructions
Provider
newtype-01
Release date
Mar 13, 2025
Language
TypeScript
Stats
116 stars

Obsidian MCP Server provides a powerful bridge between AI models and Obsidian knowledge bases, allowing AI to read, create, update, and delete notes, as well as manage folder structures through the Model Context Protocol (MCP).

What is Obsidian MCP Server?

The Obsidian MCP Server enables AI models to interact directly with your Obsidian vault, providing comprehensive note management capabilities, folder operations, intelligent search, and advanced editing features.

Prerequisites

Before installing, ensure you have:

  • Node.js (v16 or higher)
  • Obsidian desktop application
  • Obsidian Local REST API plugin installed in Obsidian

Installation Options

Method 1: One-Click Install (DXT Package)

This is the simplest installation method for most users.

Step 1: Install and Configure the Local REST API Plugin

  1. Open Obsidian
  2. Go to Settings → Community plugins
  3. Browse for "Local REST API" and install it
  4. Enable the plugin
  5. Generate an API Token in the plugin settings
  6. Note the port number (default is 27123)

Step 2: Configure MCP Client

Add the following configuration to your MCP client config file, replacing the placeholder values with your actual vault path and API token:

{
  "mcpServers": {
    "obsidian-mcp": {
      "command": "npx",
      "args": [
        "@huangyihe/obsidian-mcp"
      ],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
        "OBSIDIAN_API_TOKEN": "your_api_token",
        "OBSIDIAN_API_PORT": "27123"
      }
    }
  }
}

Method 2: Global Install

For users who prefer a standard Node.js installation:

Step 1: Install the Package Globally

npm install -g @huangyihe/obsidian-mcp

Step 2: Configure MCP Client

{
  "mcpServers": {
    "obsidian-mcp": {
      "command": "obsidian-mcp",
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
        "OBSIDIAN_API_TOKEN": "your_api_token",
        "OBSIDIAN_API_PORT": "27123"
      }
    }
  }
}

Method 3: Source Deploy

For advanced users who want full control:

Step 1: Clone Repository

git clone https://github.com/newtype-01/obsidian-mcp.git
cd obsidian-mcp

Step 2: Install Dependencies

npm install

Step 3: Build Project

npm run build

Step 4: Configure Environment Variables

cp .env.example .env
# Edit .env file with your configuration

Step 5: Start Server

npm start

Using the MCP Server

Once installed, the MCP server provides the following tools:

Core Operations

  • List Notes: View all notes in your vault with optional folder filtering
  • Read Notes: Access content from specific notes or multiple notes simultaneously
  • Create Notes: Generate new notes with full content
  • Delete Notes: Remove notes from your vault
  • Search Vault: Perform advanced searches across all file types
  • Move Notes: Relocate or rename notes to new locations
  • Manage Folders: Create, rename, move, or delete folders

Advanced Features

Enhanced Note Updates

The server supports multiple update methods:

  • Traditional text replacement
  • Heading-based insertion (before/after/append/prepend)
  • Block ID-based insertion with ^block-id support
  • PATCH API integration with filesystem fallback

Auto Backlink Generation

Automatically convert text references to wikilinks:

  • Scans entire vault for note name mentions
  • Converts text to [[note name]] format
  • Includes smart pattern matching to prevent false positives

AI-Powered Strategic Analysis

Generate insights using the TRILEMMA-PRINCIPLES framework:

  • Automatic topic-based note discovery
  • AI-driven content summarization
  • Structured analysis for identifying constraints and solutions

Testing the Server

To verify the server is working correctly:

node test-mcp.js

This will run a test suite to ensure all functionality is operating as expected.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "obsidian-mcp" '{"command":"npx","args":["obsidian-mcp"],"env":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "obsidian-mcp": {
            "command": "npx",
            "args": [
                "obsidian-mcp"
            ],
            "env": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "obsidian-mcp": {
            "command": "npx",
            "args": [
                "obsidian-mcp"
            ],
            "env": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later