obsidian-mcp-plugin
v0.1.4
Published
Provides a Model Context Protocol (MCP) endpoint via Obsidian Local REST API
Maintainers
Readme
Obsidian MCP Plugin
Integrates the Model Context Protocol (MCP) with Obsidian, enabling AI assistants to interact with your vault via the Obsidian Local REST API. This plugin uses standardized tools and resources for seamless AI collaboration.
[!IMPORTANT] The Obsidian Local REST API plugin is required for this plugin to function. Please ensure it is installed and enabled in your Obsidian vault.
Key Features and Benefits
This plugin offers a native and streamlined Model Context Protocol (MCP) experience directly within Obsidian, eliminating the need for external servers or applications.
- Native Obsidian Integration: Operates as a standard Obsidian plugin for a seamless user experience.
- Flexible Connectivity: Supports both SSE and Streamable HTTP transports for versatile communication.
- User-Friendly Configuration: Manage all settings through the standard Obsidian interface.
- Comprehensive Toolset:
- Complete MCP server functionality via the Obsidian Local REST API.
- Tools for file management (read, list, metadata), vault search, and querying.
- Resource-based access to vault files and daily notes.
- Built-in prompt management system.
- Plugin Integrations:
- Dataview: Execute Dataview queries (requires Dataview plugin).
- Daily Notes: Interact with daily notes (requires Daily Notes or Periodic Notes plugin).
- QuickAdd: Trigger QuickAdd actions and list choices (requires QuickAdd plugin).
Installation
This plugin is not yet in the Obsidian Community Plugins directory. Install it via BRAT (Beta Reviewers Auto-update Tester):
- Install BRAT from Obsidian Community Plugins.
- In BRAT settings, add beta plugin:
rygwdn/obsidian-mcp-plugin. - Enable the plugin in Obsidian settings.
- Your Obsidian vault will now provide an MCP endpoint at something like
https://127.0.0.1:27123/mcp. The specific endpoint and example configurations are viewable in the plugin settings.
Available Functionality
This plugin offers a range of functionalities that can be enabled or disabled through the settings:
- File Access: Allows AI assistants to read files, list directories, and retrieve file metadata within your vault. This is fundamental for many interactions that require understanding the content and structure of your notes.
- Content Modification: Grants AI assistants the ability to modify file content. This includes actions like appending text to existing notes, replacing sections of text, or creating new content based on instructions.
- Vault Search: Enables AI assistants to perform text-based searches across all files in your vault. This is useful for finding specific information or patterns within your notes.
- Dataview Integration: If you have the Dataview plugin installed and enabled, this feature allows AI assistants to execute Dataview queries. This can be powerful for querying and summarizing structured data within your notes (requires Dataview plugin).
- Daily Notes Integration: Provides specialized tools for interacting with daily notes. This requires either the core Daily Notes plugin or the Periodic Notes plugin (configured for daily notes) to be active. It simplifies tasks like creating, retrieving, or updating daily entries.
- QuickAdd Integration: If you use the QuickAdd plugin, this feature allows AI assistants to trigger QuickAdd actions and list available choices. This can automate workflows and content creation processes defined in QuickAdd (requires QuickAdd plugin).
Each of these features can be toggled in the plugin's settings, allowing you to customize the level of access and capability granted to connected AI assistants.
Using Prompts
The plugin features a simple prompt management system:
- Create a Markdown file in your prompts folder (default:
prompts/). - Define Metadata (Optional): Add YAML frontmatter to the top of the file. The following
fields are supported:
name: (string) A human-readable name for the prompt.description: (string) A brief description of what the prompt does.args: (array of strings) A list of variable names that your prompt will use.
- Write your prompt in the file body, using
{{variable1}}for placeholders.
Prompts are automatically registered and updated with the MCP server. AI assistants can access them.
Example Prompt (prompts/analyze_topic.md):
---
name: "Topic Analysis"
description: "Create an analysis of a topic"
args:
- "topic"
- "perspective"
---
Please provide a thorough analysis of {{topic}} from a {{perspective}} perspective. Include
historical context, current relevance, and future implications.Development
Key commands:
npm run dev: Development with hot reload.npm run build: Build for production.npm run check: Type check, lint, and test.npm run install:link -- /path/to/your/vault: Install to vault for testing (symlinks).
Release Process
- Update
CHANGELOG.md(e.g.,## [x.y.z] - YYYY-MM-DD). - Bump version:
npm run version. - Tag and push:
git tag x.y.z && git push origin x.y.z.
GitHub Actions will draft a release from the changelog.
Related Projects
- mcp-obsidian: External MCP server for Obsidian.
- obsidian-mcp: Filesystem-based MCP server.
- Model Context Protocol: Official MCP documentation.
