Mcp Rs

Rust MCP server for Obsidian vaults — read, write, search notes via Model Context Protocol. Works with Claude, Cursor, and any MCP client.

obsidian-mcp-rs logo

obsidian-mcp-rs

Claude Ready Cursor Ready MCP Native Rust Powered npx Compatible



CI npm version npm downloads License: MIT Platforms



Rust-based MCP server that connects your Obsidian vault to Claude, Cursor, and any AI client — single binary, zero runtime dependencies.


[!WARNING] This MCP server has full read and write access to your Obsidian vault. It can create, edit, move, and delete notes without confirmation. Use at your own risk. Always keep backups of your vault before connecting it to an AI client.

Features

  • 12 tools covering note CRUD, search, directory management, and tag operations
  • Multi-vault support — pass multiple vault paths as arguments
  • Zero runtime dependencies — single static binary, no Node.js required for execution
  • Cross-platform — macOS (ARM64 + x64), Linux (x64 + ARM64 + musl), Windows (x64 + ARM64)
  • Tag search via tag: prefix in queries
  • YAML frontmatter tag management
  • npx compatible — runs instantly via npm

Installation

npx obsidian-mcp-rs /path/to/your/vault

Or install globally:

npm install -g obsidian-mcp-rs
obsidian-mcp-rs /path/to/your/vault

Configuration

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "obsidian-mcp-rs", "/path/to/your/vault"]
    }
  }
}

Multiple vaults

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-mcp-rs",
        "/path/to/vault1",
        "/path/to/vault2"
      ]
    }
  }
}

Claude Code / CLAUDE.md

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "obsidian-mcp-rs", "~/Documents/Obsidian/MyVault"]
    }
  }
}

Cursor

Add the server to Cursor's MCP settings via Settings → MCP → Add Server, or edit ~/.cursor/mcp.json directly:

{
  "mcpServers": {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "obsidian-mcp-rs", "/path/to/your/vault"]
    }
  }
}

Once added, Cursor's AI will have access to all 12 vault tools. You can verify with the MCP panel in Settings.

OpenClaw (~/.openclaw/openclaw.json)

{
  "mcp": {
    "servers": {
      "obsidian": {
        "command": "npx",
        "args": ["-y", "obsidian-mcp-rs", "/path/to/your/vault"],
        "transport": "stdio"
      }
    }
  }
}

Platform Support

PlatformArchitectureTarget triple
macOSARM64 (Apple Silicon)aarch64-apple-darwin
macOSx64 (Intel)x86_64-apple-darwin
Linuxx64 (glibc)x86_64-unknown-linux-gnu
LinuxARM64 (glibc)aarch64-unknown-linux-gnu
Linuxx64 (musl / Alpine)x86_64-unknown-linux-musl
Windowsx64x86_64-pc-windows-msvc
WindowsARM64aarch64-pc-windows-msvc

Tool Reference

read-note

Read the content of an existing note.

ParameterTypeRequiredDescription
vaultstringVault name
filenamestringNote filename (.md optional)
folderstringSubfolder path within vault

create-note

Create a new note with Markdown content.

ParameterTypeRequiredDescription
vaultstringVault name
filenamestringNote filename
contentstringMarkdown content
folderstringSubfolder path (created automatically)

edit-note

Edit an existing note.

ParameterTypeRequiredDescription
vaultstringVault name
filenamestringNote filename
operationstringappend, prepend, replace, find_and_replace
contentstringContent to apply
folderstringSubfolder path
searchstringSearch text (required for find_and_replace)

delete-note

Delete a note from the vault.

ParameterTypeRequiredDescription
vaultstringVault name
filenamestringNote filename
folderstringSubfolder path

move-note

Move or rename a note within the vault.

ParameterTypeRequiredDescription
vaultstringVault name
filenamestringSource filename
folderstringSource folder
newFolderstringDestination folder
newFilenamestringNew filename (same if omitted)

create-directory

Create a new directory in the vault.

ParameterTypeRequiredDescription
vaultstringVault name
pathstringDirectory path relative to vault root
recursivebooleanCreate parent dirs (default: true)

search-vault

Search notes by content, filename, or tag.

ParameterTypeRequiredDescription
vaultstringVault name
querystringSearch term. Use tag:name for tag search
pathstringLimit search to subfolder
caseSensitivebooleanDefault: false
searchTypestringcontent (default), filename, both

add-tags

Add tags to notes in frontmatter and/or content.

ParameterTypeRequiredDescription
vaultstringVault name
filesstring[]Note filenames (include .md)
tagsstring[]Tags to add
locationstringfrontmatter, content, both (default)
normalizebooleanNormalize tag format (default: true)
positionstringstart or end (default) for content tags

remove-tags

Remove tags from notes.

ParameterTypeRequiredDescription
vaultstringVault name
filesstring[]Note filenames
tagsstring[]Tags to remove

rename-tag

Rename a tag across all notes in the vault.

ParameterTypeRequiredDescription
vaultstringVault name
oldTagstringCurrent tag name
newTagstringNew tag name

list-available-vaults

List all vaults configured for this server. Takes no parameters.

Development

Prerequisites

Build from source

git clone https://github.com/MrRefactoring/obsidian-mcp-rs.git
cd obsidian-mcp-rs

# Build Rust binary
cargo build --release

# Build TypeScript wrapper
cd npm/obsidian-mcp-rs
npm install
npm run build

# Run directly
./target/release/obsidian-mcp-rs /path/to/your/vault

Testing

cargo test

Cross-compilation

Linux cross-compilation requires cross:

cargo install cross --git https://github.com/cross-rs/cross

cross build --release --target aarch64-unknown-linux-gnu
cross build --release --target x86_64-unknown-linux-musl

Environment variables

VariableDescription
RUST_LOGLog level: error, warn (default), info, debug, trace

Logs are written to stderr — stdout is reserved for MCP JSON-RPC.

Architecture

npx obsidian-mcp-rs /vault/path
          │
          ▼
  npm/obsidian-mcp-rs/bin/bin.js   ← TypeScript platform resolver
          │   detects OS + arch
          │   resolves @obsidian-mcp-rs/<platform>
          ▼
  obsidian-mcp-rs (Rust binary)   ← MCP server, stdio transport
          │
          ├── clap → CLI args parsing
          ├── VaultManager → filesystem operations
          ├── ObsidianHandler → 12 MCP tool implementations
          └── rmcp → JSON-RPC / MCP protocol

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Implement with tests
  4. Ensure cargo fmt and cargo clippy pass
  5. Submit a pull request

License

MIT — see LICENSE.

How to Install

  1. Download the ZIP or clone the repository
  2. Open the folder as a vault in Obsidian (File → Open Vault)
  3. Obsidian will prompt you to install required plugins

Stats

Stars

0

Forks

0

License

MIT

Last updated 19h ago

Tags

aiclaudecross-platformcursorknowledge-basellmmarkdownmcpmcp-servermodel-context-protocolnote-takingnotesobsidianrustvault