Obsidian MCP Lite logo

Obsidian MCP Lite

by yokarilight

Obsidian MCP Lite is a TypeScript-based MCP server for Obsidian, providing a simple interface to interact with Obsidian vaults. It allows you to programmatically access and modify your Obsidian notes.

View on GitHub

Last updated: N/A

Obsidian MCP Lite

A TypeScript-based MCP server for Obsidian, providing a simple interface to interact with Obsidian vaults.

Features

  • List files in vault
  • List files in directory
  • Get file contents
  • Search specific texts from files
  • Patch content
  • Append content
  • Delete files

Prerequisites

  • Node.js >= 18.16.0
  • Obsidian with Local REST API plugin installed
  • Obsidian API key

Setup

# Install dependencies
pnpm install

# Build server
pnpm run build

Configuration

  1. Copy .env.example to .env:

    cp .env.example .env
    
  2. Edit .env and set your Obsidian API key and host:

    OBSIDIAN_API_KEY=your-api-key-here
    OBSIDIAN_HOST=http://localhost:27123
    

Installation

To use with Cursor, add the following config:

{
  "mcpServers": {
    "obsidian-mcp-lite": {
      "command": "node",
      "args": [
        "/path/to/obsidian-mcp-lite/dist/index.js"
      ],
      "env": {
        "OBSIDIAN_API_KEY": "your-api-key-here"
      }
    }
  }
}

Debugging

Use the MCP Inspector:

npx @modelcontextprotocol/inspector -e OBSIDIAN_API_KEY=your-api-key-here node dist/index.js"

You will find a URL provided in the terminal. Open it and access to the debugging tool in the browser.