Obsidian MCP (Model Context Protocol) Server logo

Obsidian MCP (Model Context Protocol) Server

Community
newtype-01

Obsidian MCP (Model Context Protocol) Server

Publishernewtype-01
Repositoryobsidian-mcp
LanguageJavaScript
Forks
49
Stars
311
Available tools
8
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Obsidian MCP (Model Context Protocol) Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 8 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    311 stars and 49 forks from the linked repository.

Obsidian MCP (Model Context Protocol) Server

English | 中文

This project implements a Model Context Protocol (MCP) server for connecting AI models with Obsidian knowledge bases. Through this server, AI models can directly access and manipulate Obsidian notes, including reading, creating, updating, and deleting notes, as well as managing folder structures.

Created by huangyihe

Features

  • 🔗 Seamless Obsidian Integration: Direct access to Obsidian knowledge bases through MCP protocol
  • 📝 Complete Note Management: Read, create, update, and delete notes with advanced text replacement
  • 📁 Folder Operations: Create, rename, move, and delete folders with full hierarchy support
  • 🔍 Intelligent Search: Full-text search across all file types with smart scoring
  • 🤖 AI-Powered Analysis: NEW Strategic insights using TRILEMMA-PRINCIPLES framework
  • 🔗 Auto Backlink Generation: NEW Intelligent detection and conversion of note names to wikilinks
  • ⚡ Precision Editing: Advanced PATCH operations with heading and block-level targeting
  • 🚀 Dual API Strategy: Obsidian REST API with filesystem fallback for maximum reliability
  • 🎯 Context Optimization: Smart content summarization for LLM context length management
  • 📊 Batch Processing: Efficient bulk operations with progress tracking

Supported Tools

The MCP server provides the following comprehensive tools:

📋 Core Operations

  • list_notes: List notes in the Obsidian vault with optional folder filtering
    • NEW recursive parameter: Control whether to list files recursively in subdirectories (default: true)
    • Use recursive: false to list only files in the specified folder without subdirectories
  • read_note: Read the content of a specific note in the Obsidian vault
  • read_multiple_notes: Read content from multiple notes simultaneously for batch processing
  • create_note: Create a new note in the Obsidian vault with full content
  • delete_note: Delete a note from the Obsidian vault
  • search_vault: Advanced search across all file types with filename and content matching
  • move_note: Move or rename notes to new locations (supports all file types including PDFs)
  • manage_folder: Complete folder CRUD operations (create/rename/move/delete)

🚀 Advanced Features

  • update_note: Enhanced Update content using text replacements OR precision insertion

    • Traditional text replacement mode
    • NEW Heading-based insertion (before/after/append/prepend)
    • NEW Block ID-based insertion with ^block-id support
    • NEW PATCH API integration with filesystem fallback
  • auto_backlink_vault: 🔗 Auto Backlink Generation

    • Intelligently scan entire vault for note name mentions
    • Convert text references to wikilink format ([[note name]])
    • Smart pattern matching with false positive prevention
    • Configurable dry-run mode and batch processing
  • notes_insight: 🧠 AI-Powered Strategic Analysis ⭐ NEW

    • Generate strategic insights using TRILEMMA-PRINCIPLES framework
    • Automatic topic-based note discovery and relevance ranking
    • AI-driven content summarization for context optimization
    • Structured analysis: constraint identification → assumption challenges → breakthrough solutions
    • Configurable parameters for analysis depth and scope

Prerequisites

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

Installation Options

Choose the most suitable installation method based on your technical level and usage needs:

MethodTarget UsersAdvantagesDisadvantages
🎯 One-Click Install (DXT)General usersSimplest, GUI configurationRequires DXT-enabled client
📦 Remote Install (NPM)Node.js usersAuto-updates, no installationRequires network connection
🔧 Local DeployAdvanced usersOffline use, full controlManual updates required

Method 1: One-Click Install (DXT Package) - ✅ Recommended

Suitable for: General users who want the simplest installation experience

Step 1: Download DXT File

Download the pre-built extension package: obsidian-mcp.dxt

Step 2: Install and Configure

Double-click the downloaded .dxt file and the system will automatically install the extension. Then fill in the configuration interface:

  • Vault Path: Your Obsidian vault path (e.g., /Users/username/Documents/MyVault)
  • API Token: Obsidian Local REST API plugin token
  • API Port: API port number (default: 27123)

Method 2: Remote Install (NPM Package)

Suitable for: Node.js developers who want automatic updates and version management

Simply add the following configuration to your MCP client config file:

Using npx (recommended, no pre-installation required):

json
{
  "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"
      }
    }
  }
}

Note: First run will automatically download the package, subsequent runs use cache, ensuring you always use the latest version.


Method 3: Local Deploy

Suitable for: Users who need customization, advanced control, or offline usage

Option A: Global Install (Recommended)

Step 1: Global Install

bash
npm install -g @huangyihe/obsidian-mcp

Step 2: MCP Client Configuration

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

Option B: Source Deploy

Step 1: Clone Repository

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

Step 2: Install Dependencies

bash
npm install

Step 3: Build Project

bash
npm run build

Step 4: Configure Environment Variables

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

Step 5: Start Server

bash
npm start

Option C: Docker Deploy

Using Docker Compose (Recommended)

bash
# Configure environment variables
cp .env.example .env
# Edit .env file

# Start service
docker-compose up -d

Using Docker Command

bash
# Build image
docker build -t obsidian-mcp .

# Run container
docker run -d \
  --name obsidian-mcp \
  --env-file .env \
  --network host \
  -v $(OBSIDIAN_VAULT_PATH):$(OBSIDIAN_VAULT_PATH) \
  obsidian-mcp

Configuration Guide

Environment Variables

All installation methods require the following configuration:

  • OBSIDIAN_VAULT_PATH: Path to your Obsidian vault
  • OBSIDIAN_API_TOKEN: API token for Obsidian Local REST API plugin
  • OBSIDIAN_API_PORT: API port for Obsidian Local REST API (default: 27123)

⚠️ Important: For remote NPM installation and global installation, you MUST use the OBSIDIAN_ prefix for environment variables. The variables VAULT_PATH, API_TOKEN without the prefix will not work correctly.

Getting API Token

  1. Install "Local REST API" plugin in Obsidian
  2. Generate API Token in plugin settings
  3. Note the port number (default 27123)

Testing

The project includes a test script to verify server functionality:

bash
node test-mcp.js

Development

  • Use npm run dev to run the server in development mode
  • Source code is located in the src directory

License

MIT

Contributing

Pull Requests and Issues are welcome!

Related Projects

Installation

TypingMind
{
  "mcpServers": {
    "newtype-01-obsidian-mcp": {
      "command": "bash",
      "args": [
        "-c",
        "npx @huangyihe/obsidian-mcp --vault-path \"$VAULT_PATH\" --api-token \"$API_TOKEN\""
      ],
      "env": {
        "VAULT_PATH": "<VAULT_PATH>",
        "API_TOKEN": "<API_TOKEN>"
      }
    }
  }
}

Available Tools

  • list_notes

    List all notes in the Obsidian vault

  • delete_note

    Delete a note from the Obsidian vault

  • read_note

    Read the content of a note in the Obsidian vault

  • create_note

    Create a new note in the Obsidian vault

  • update_note

    Update an existing note in the Obsidian vault

  • search_vault

    Search for content in the Obsidian vault

  • move_note

    Move or rename a note to a new location in the Obsidian vault

  • manage_folder

    Create, rename, move, or delete a folder in the Obsidian vault

Use Obsidian MCP (Model Context Protocol) Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Obsidian MCP (Model Context Protocol) Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Obsidian MCP (Model Context Protocol) Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Obsidian MCP (Model Context Protocol) Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "newtype-01-obsidian-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@huangyihe/obsidian-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Obsidian MCP (Model Context Protocol) Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Obsidian MCP (Model Context Protocol) Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Obsidian MCP (Model Context Protocol) Server to help me with this task?
Obsidian MCP (Model Context Protocol) Server
Sure. I read it.
Here is what I found using Obsidian MCP (Model Context Protocol) Server.

Option 2: Add an MCP server URL

Use this when Obsidian MCP (Model Context Protocol) Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for Obsidian MCP (Model Context Protocol) Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Obsidian MCP (Model Context Protocol) Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Obsidian MCP (Model Context Protocol) Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Obsidian MCP (Model Context Protocol) Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Obsidian MCP (Model Context Protocol) Server to help me with this task?
Obsidian MCP (Model Context Protocol) Server
Sure. I read it.
Here is what I found using Obsidian MCP (Model Context Protocol) Server.

Frequently asked questions

What is the Obsidian MCP (Model Context Protocol) Server MCP server used for?

Obsidian MCP (Model Context Protocol) Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Obsidian MCP (Model Context Protocol) Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Obsidian MCP (Model Context Protocol) Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Obsidian MCP (Model Context Protocol) Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Obsidian MCP (Model Context Protocol) Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Obsidian MCP (Model Context Protocol) Server MCP to TypingMind?

Obsidian MCP (Model Context Protocol) Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Obsidian MCP (Model Context Protocol) Server MCP provide in TypingMind?

Obsidian MCP (Model Context Protocol) Server exposes 8 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Obsidian MCP (Model Context Protocol) Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Obsidian MCP (Model Context Protocol) Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

CHANGELOG.md

Markdown note: node_modules/which/CHANGELOG.md

README.md

Markdown note: node_modules/which/README.md

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇