Skip to main content
Glama

Obsidian MCP

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

  • Prompt House: https://prompthouse.app/
  • YouTube: https://www.youtube.com/@huanyihe777
  • Twitter: https://x.com/huangyihe
  • Community: https://t.zsxq.com/19IaNz5wK

Features

  • Seamless integration with Obsidian knowledge bases
  • Support for reading, creating, updating, and deleting notes
  • Support for creating, renaming, moving, and deleting folders
  • Full-text search functionality
  • Compliance with the Model Context Protocol specification

Supported Tools

The MCP server provides the following tools:

  • list_notes: List all notes in 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
  • search_vault: Search for content in the Obsidian vault
  • delete_note: Delete a note from 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

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

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):

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

Step 1: Global Install

npm install -g @huangyihe/obsidian-mcp

Step 2: MCP Client Configuration

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

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

Option C: Docker Deploy

Using Docker Compose (Recommended)

# Configure environment variables cp .env.example .env # Edit .env file # Start service docker-compose up -d

Using Docker Command

# 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:

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!

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

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.

  1. Features
    1. Supported Tools
      1. Prerequisites
        1. Installation Options
          1. Method 1: One-Click Install (DXT Package) - Recommended
            1. Step 1: Download DXT File
            2. Step 2: Install and Configure
          2. Method 2: Remote Install (NPM Package)
            1. Method 3: Local Deploy
              1. Option A: Global Install (Recommended)
              2. Option B: Source Deploy
              3. Option C: Docker Deploy
            2. Configuration Guide
              1. Environment Variables
              2. Getting API Token
            3. Testing
              1. Development
                1. License
                  1. Contributing
                    1. Related Projects

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        Implements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.
                        Last updated -
                        90
                        Python
                        • Apple
                        • Linux
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server that enables AI assistants to read, write, and manipulate notes in your Obsidian vault through a standardized interface.
                        Last updated -
                        366
                        TypeScript
                        ISC License
                      • -
                        security
                        F
                        license
                        -
                        quality
                        An open-source server implementing the Model Context Protocol (MCP) that enables capturing insights from AI sessions and transforming them into persistent, searchable knowledge accessible across tools.
                        Last updated -
                        TypeScript
                        • Apple
                      • A
                        security
                        A
                        license
                        A
                        quality
                        A Model Context Protocol server that enables AI assistants like Claude to interact with your Obsidian vault through the Local REST API plugin, allowing reading, creating, searching, and managing notes.
                        Last updated -
                        19
                        18
                        Python
                        MIT License
                        • Apple

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/newtype-01/obsidian-mcp'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server