Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

obsidian-mcp-rest

MCP.Pizza Chef: PublikPrinciple

The Obsidian MCP REST Server is an MCP server implementation that provides AI assistants with seamless access to Obsidian vaults through a local REST API. It enables reading, writing, listing, and searching notes within Obsidian, facilitating efficient vault content management. Designed for secure local integration, it supports popular AI assistants like Claude Desktop and others, making it a versatile tool for enhancing note-taking workflows with AI. Requires Node.js 16+, Obsidian with the Local REST API plugin, and an enabled vault for operation.

Use This MCP server To

Read and write Obsidian notes programmatically Search Obsidian vault contents via AI assistants List files and folders in Obsidian vaults Integrate Obsidian with AI workflows securely Enable AI-driven note management in Obsidian

README

Obsidian MCP REST Server

An MCP (Model Context Protocol) server implementation that provides access to Obsidian vaults through a local REST API. This server allows AI assistants to interact with Obsidian notes and manage vault content through a standardized interface.

Features

  • Access Obsidian vault contents through MCP
  • Read and write notes
  • List vault contents
  • Search functionality
  • Secure local REST API integration
  • Compatible with Claude Desktop and other AI assistants

Prerequisites

  • Node.js 16 or higher
  • Obsidian with Local REST API plugin installed and configured
  • An Obsidian vault with Local REST API enabled

Installation

Install the package globally:

npm install -g PublikPrinciple/obsidian-mcp-rest

Or if you prefer using a specific version/branch:

npm install -g PublikPrinciple/obsidian-mcp-rest#main

Configuration

  1. First, configure Obsidian Local REST API plugin:

    • Install the Local REST API plugin in Obsidian
    • Configure the API port (default: 27123)
    • Generate and save an API key
  2. Create a configuration file config.json:

{
  "obsidian": {
    "apiKey": "your-api-key-here",
    "port": 27123,
    "host": "localhost"
  },
  "server": {
    "name": "obsidian-mcp",
    "version": "1.0.0"
  }
}

Usage

  1. Start the server:
obsidian-mcp-rest --config path/to/config.json
  1. The server will start and listen for MCP requests via stdin/stdout.

Using with Claude Desktop

  1. Configure Claude Desktop to use this MCP server:

    • Open Claude Desktop settings
    • Navigate to the MCP section
    • Add new server configuration:
      {
        "name": "obsidian-mcp",
        "command": "obsidian-mcp-rest",
        "args": ["--config", "path/to/config.json"]
      }
  2. Claude can now access your Obsidian vault through commands like:

    Read note "Projects/MyProject.md"
    List all notes in "Projects" folder
    Search for notes containing "typescript"
    

Available Tools

  • listNotes: List all notes in the vault or a specific folder
  • readNote: Read the contents of a specific note
  • writeNote: Create or update a note
  • searchNotes: Search for notes using a query string
  • getMetadata: Get metadata for a specific note

Security

  • The server only runs locally and communicates through stdin/stdout
  • All requests to Obsidian REST API are authenticated with your API key
  • No external network access is required
  • Data remains local to your machine

Development

  1. Clone the repository:
git clone https://github.com/PublikPrinciple/obsidian-mcp-rest.git
cd obsidian-mcp-rest
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run tests:
npm test

Troubleshooting

Installation Issues

If you encounter any installation issues, try these alternatives:

  1. Clone and install locally:
git clone https://github.com/PublikPrinciple/obsidian-mcp-rest.git
cd obsidian-mcp-rest
npm install
npm run build
npm install -g .
  1. If you see TypeScript-related errors, ensure TypeScript is installed globally:
npm install -g typescript

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

MIT License - see LICENSE file for details

obsidian-mcp-rest FAQ

How do I install the Obsidian MCP REST Server?
Install globally using npm with 'npm install -g PublikPrinciple/obsidian-mcp-rest'.
What are the prerequisites for using obsidian-mcp-rest?
You need Node.js 16 or higher, Obsidian with the Local REST API plugin installed and configured, and an Obsidian vault with the Local REST API enabled.
How does obsidian-mcp-rest ensure secure access to my Obsidian vault?
It uses a local REST API that runs securely on your machine, limiting access to authorized AI assistants only.
Can obsidian-mcp-rest work with AI assistants other than Claude Desktop?
Yes, it is compatible with Claude Desktop and other AI assistants that support MCP protocol integration.
How do I configure the Obsidian Local REST API plugin for use with obsidian-mcp-rest?
Install the Local REST API plugin in Obsidian, enable it, and configure access settings as per the plugin documentation before running obsidian-mcp-rest.
Is obsidian-mcp-rest compatible with all versions of Obsidian?
It requires Obsidian with the Local REST API plugin enabled; compatibility depends on the plugin's support for your Obsidian version.
Can I use obsidian-mcp-rest to modify notes in my vault?
Yes, it supports reading and writing notes, allowing AI assistants to update vault content.
What Node.js version is required to run obsidian-mcp-rest?
Node.js version 16 or higher is required.