Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Companion MCP

yama662607yama66260721 downloads

Enables AI agents to use MCP tools for semantic vault search and editor actions via the companion MCP server.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates11

A hybrid Model Context Protocol (MCP) ecosystem for Obsidian, providing vault-wide semantic intelligence and real-time editor context awareness.

Features

  • Multilingual Semantic Search: Powered by intfloat/multilingual-e5-small, allowing high-precision search across Japanese, English, and 100+ other languages.
  • Real-time Editor Context: AI awareness of the active file, cursor position, and text selection.
  • Smart Note Management: Precise CRUD operations for Markdown files and Frontmatter.
  • Local-First Architecture: All embeddings and indexing are performed locally on your machine for maximum privacy.

MCP Workflow

The public MCP surface is organized around the actual agent workflow:

  1. Discover candidate notes
    • list_notes
    • search_notes
    • semantic_search_notes
    • get_semantic_index_status
    • refresh_semantic_index
  2. Read persisted notes or the active editor
    • read_note
    • read_active_context
  3. Apply one structured edit tool
    • edit_note
  4. Use lifecycle / metadata tools when needed
    • create_note
    • patch_note_metadata
    • move_note
    • delete_note

read_note and read_active_context both return machine-readable edit handoff payloads so agents can move from read to edit without reconstructing anchors manually.

For long persisted notes, prefer read_note with anchor.type = "line" and follow readMoreHint to walk the document in stable line windows. For active editor buffers, rerun read_active_context with the same or a larger maxChars instead of relying on continuation hints, because the unsaved buffer can change between reads.

Getting Started

To use Obsidian Companion MCP, you need to set up both the Obsidian plugin and the MCP server.

1. Install Obsidian Plugin

  1. Manual Install: Copy the contents of dist/plugin-release (after running just build) to your vault's .obsidian/plugins/companion-mcp/ directory.
  2. Enable: Go to Obsidian Settings -> Community Plugins and enable Companion MCP.

2. Configure MCP Server

The MCP server acts as a bridge between AI agents and Obsidian.

Local .env For Development

For local development and just commands, create a root .env file and set:

OBSIDIAN_VAULT_PATH="/absolute/path/to/your/obsidian/vault"

This repository's justfile loads .env automatically, so commands such as just plugin-install can use the configured vault without extra shell prefixes.

Recommendation: Global Installation (Fastest)

For the best performance and fastest startup, we recommend installing the package globally:

npm install -g @yama662607/obsidian-companion-mcp

Then, use the obsidian-companion command in your MCP configuration.

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Using Global Install (Recommended):

{
  "mcpServers": {
    "obsidian-companion": {
      "command": "obsidian-companion",
      "args": [],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
      }
    }
  }
}

Using npx (Quick start, but slower):

{
  "mcpServers": {
    "obsidian-companion": {
      "command": "npx",
      "args": ["-y", "@yama662607/obsidian-companion-mcp"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
      }
    }
  }
}

Claude Code (CLI) Configuration

Create a .mcp.json file in your project root or home directory:

{
  "mcpServers": {
    "obsidian-companion": {
      "command": "obsidian-companion",
      "args": [],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
      }
    }
  }
}

Codex Configuration (~/.codex/config.toml)

[mcpServers.obsidian-companion]
command = "obsidian-companion"
args = []

[mcpServers.obsidian-companion.env]
OBSIDIAN_VAULT_PATH = "/absolute/path/to/your/obsidian/vault"

Gemini CLI Configuration (.gemini/settings.json)

{
  "mcpServers": {
    "obsidian-companion": {
      "command": "obsidian-companion",
      "args": [],
      "env": {
        "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
      }
    }
  }
}

Important: OBSIDIAN_VAULT_PATH & Data Storage

The OBSIDIAN_VAULT_PATH environment variable is required.

  • Full Mode: When Obsidian is open and the plugin is active, the server provides real-time editor context (cursor position, active file) and high-performance semantic search.
  • Degraded Mode: If Obsidian is closed, the server automatically switches to "degraded mode," allowing basic note read/write operations by accessing your vault files directly.
  • Storage: The semantic model (~110MB) and the vector index are stored inside your vault at .obsidian/plugins/companion-mcp/. This ensures your index is portable and specific to each vault.

Ecosystem & Synergy

Obsidian Companion MCP is part of a growing ecosystem designed to give AI agents full access to your knowledge base.

Better Together: Companion + Excalidraw

While this project focuses on text-based notes and semantic intelligence, we highly recommend using it alongside:

  • Obsidian Excalidraw MCP: A specialized MCP for managing visual diagrams, sketches, and spatial relationships within your vault.

Why use them together? AI agents perform best when they have a holistic view of your work. By enabling both MCPs, your agent can:

  1. Search & Read your text notes for context.
  2. Visualize & Edit your diagrams to map out complex ideas.
  3. Synthesize connections between visual models and text documentation.

Architecture

This project consists of two main components:

  1. Plugin (/plugin): An Obsidian plugin that handles background indexing, semantic embedding generation, and exposes a local API for real-time editor context.
  2. MCP (/mcp): A lightweight Node.js CLI that acts as an MCP server. It proxies requests from AI Agents to the Obsidian Plugin.

npm Packages

  • Canonical MCP package: @yama662607/obsidian-companion-mcp
  • Plugin package: @yama662607/obsidian-companion-plugin

Technical Stack

  • Language: TypeScript
  • Runtime: Node.js >= 20
  • Semantic Engine: intfloat/multilingual-e5-small (Transformers.js)
  • Communication: Local Stdio MCP / JSON-RPC
83%
HealthExcellent
ReviewCaution
About
Provide vault-wide semantic search and real-time editor context via a Model Context Protocol, enabling high-precision multilingual search across Japanese, English, and 100+ languages. Keep embeddings and indexes local and expose precise Markdown CRUD, frontmatter management, and machine-readable edit handoffs for agent workflows.
AISearchFiles
Details
Current version
0.1.3
Last updated
2 months ago
Created
2 months ago
Updates
11 releases
Downloads
21
Compatible with
Obsidian 1.5.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
yama662607yama662607
github.com/yama662607
GitHubyama662607
  1. Community
  2. Plugins
  3. AI
  4. Companion MCP

Related plugins

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

Claudian

Embeds Claude Code/Codex as an AI collaborator in your vault. Your vault becomes agent's working directory, giving it full agentic capabilities: file read/write, search, bash commands, and multi-step workflows.

Smart Connections

AI link discovery copilot. See related notes as you write. Lookup using semantic (vector) search across your vault. Zero-setup local model for embeddings, no API keys, private.

Gemini Scribe

Allows you to interact with Gemini and use your notes as context.

Home tab

A browser-like search tab for your local files.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

Semantic Notes Vault MCP

Give Claude Desktop and other AI assistants semantic access to your notes through a built-in Model Context Protocol (MCP) server.

Local LLM Helper

Use a local LLM server to augment your notes

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Local REST API & MCP Server

Unlock your automation needs by interacting with your notes over a secure REST API.