- Add CONTRIBUTING.md with development guidelines
- Add SECURITY.md with vulnerability reporting policy
- Create GitHub issue templates for bugs and features
- Add PR template with checklist
- Set up GitHub Actions for testing and security scanning
- Document all security findings from code audit
- Create detailed GitHub issues for all vulnerabilities
- Update CHANGELOG with security audit results
- Add project structure documentation
This establishes proper open-source project structure and documents
all critical security issues that need to be addressed.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .github | ||
| docs | ||
| github-issues | ||
| src | ||
| tests | ||
| .eslintrc.json | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| build-worker.js | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| DEVELOPMENT.md | ||
| esbuild.config.mjs | ||
| jest.config.js | ||
| LICENSE | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| PROJECT-PLAN.md | ||
| README.md | ||
| REQUIREMENTS.md | ||
| SECURITY.md | ||
| styles.css | ||
| SUBMISSION-CHECKLIST.md | ||
| sync-version.mjs | ||
| test-concurrent.js | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
Obsidian MCP Plugin
📋 Community Plugin Status: This plugin is currently under review for inclusion in the Obsidian Community Plugins directory. Submitted on July 10, 2025 - PR #6991
A high-performance Model Context Protocol (MCP) server implemented as an Obsidian plugin, providing AI tools with direct vault access through HTTP transport.
Overview
This plugin brings MCP capabilities directly into Obsidian, eliminating the need for external servers or the REST API plugin. It provides semantic, AI-optimized operations that consolidate multiple tools into intelligent workflows with contextual hints.
What are "Semantic Tools"?
Unlike basic tools that just return data, semantic tools are self-guiding. When an AI agent uses a semantic tool, it doesn't just get the requested information—it also receives smart suggestions about what to do next. This creates a natural workflow where each action leads intelligently to the next, helping AI agents complete complex tasks without getting stuck or needing constant human guidance.
Example: When searching for a file, a semantic tool doesn't just return search results. It also suggests: "Found 3 files matching 'meeting notes'. Consider using view to read the most recent one, or graph traverse to explore related documents."
Key Features
- Direct Obsidian Integration: Runs natively within Obsidian for maximum performance
- HTTP MCP Transport: Compatible with Claude Desktop, Claude Code, Cline, and other MCP clients
- Semantic Operations: Enhanced search with Obsidian operators, intelligent fragment retrieval, and workflow guidance
- No External Dependencies: No need for the REST API plugin or external servers
- High Performance: Sub-100ms response times with direct vault access
- Concurrent Sessions: Support for multiple AI agents working simultaneously (v0.5.8+)
- Worker Thread Processing: CPU-intensive operations run in parallel threads for non-blocking performance
Installation
Note
: This plugin is currently pending review for the Obsidian Community Plugins directory. Until approved, please use the BRAT installation method below.
Current Installation: Via BRAT (Beta Reviewer's Auto-update Tool)
Since this plugin is not yet in the Community Plugins directory, you'll need to use BRAT to install it:
-
Install BRAT:
- Open Obsidian Settings → Community Plugins
- Browse and search for "BRAT"
- Install and enable the BRAT plugin
-
Add This Plugin:
- In Obsidian settings, go to BRAT settings
- Click "Add Beta Plugin"
- Enter:
https://github.com/aaronsb/obsidian-mcp-plugin - Click "Add Plugin"
-
Enable the Plugin:
- Go to Settings → Community Plugins
- Find "Obsidian MCP Plugin" and enable it
- The plugin will auto-update through BRAT
Future Installation: Via Community Plugins (After Approval)
Once this plugin is approved and available in the Obsidian Community Plugins directory:
- Open Obsidian Settings → Community Plugins
- Click "Browse" and search for "MCP"
- Find "Obsidian MCP Plugin" by Aaron Bockelie
- Click "Install" then "Enable"
For BRAT Users: After the plugin is approved, you can remove it from BRAT and install it normally through Community Plugins to receive standard updates.
Configuration
-
Enable the Server:
- Go to plugin settings
- Toggle "Enable HTTP Server"
- Default port is 3001 (configurable)
-
Connect Your MCP Client:
Claude Code
claude mcp add obsidian http://localhost:3001/mcp --transport httpClaude Desktop / Other Clients
Option 1: Direct HTTP Transport (if your client supports it)
{ "mcpServers": { "obsidian": { "transport": { "type": "http", "url": "http://localhost:3001/mcp" } } } }Option 2: Via mcp-remote (recommended for Claude Desktop)
Since Claude Desktop might not support streaming HTTP transport yet, use mcp-remote:
{ "mcpServers": { "obsidian-vault-name": { "command": "npx", "args": [ "mcp-remote", "http://localhost:3001/mcp" ] } } }Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
Concurrent Sessions for Agent Swarms (v0.5.8+)
Enable multiple AI agents to work with your vault simultaneously without blocking each other:
-
Enable in Settings:
- Go to plugin settings
- Find "Concurrent Sessions" section
- Toggle "Enable Concurrent Sessions for Agent Swarms"
- Adjust max connections if needed (default: 32)
-
Architecture:
- Each AI session gets its own isolated MCP server instance
- True parallel processing - no blocking between sessions
- Automatic session management with 1-hour timeout
- Session reuse for reconnecting clients
-
Monitor Active Sessions:
- Use the
obsidian://session-inforesource to view:- Active sessions with "This is you!" indicator
- Session age, idle time, and request counts
- Server pool utilization statistics
- Use the
-
Use Cases:
- Multiple Claude instances working on different parts of your vault
- AI agent teams collaborating on research or writing projects
- Parallel processing of large knowledge bases
- Non-blocking operation for time-sensitive workflows
Available Tools
🗂️ vault - File and Folder Operations
list- List files and directoriesread- Read file content with fragments for large filescreate- Create new files and directoriesupdate- Update existing filesdelete- Delete files and folderssearch- Enhanced search with Obsidian operatorsfragments- Get relevant excerpts from filesmove- Move files to new locations (preserves links)rename- Rename files in place (preserves links)copy- Create copies of filessplit- Split files by headings, delimiter, lines, or sizecombine- Merge multiple files with sorting optionsconcatenate- Simple two-file joining
🔍 Search Operators:
file:- Search by filename or extension (e.g.,file:.png)path:- Search in file pathscontent:- Search only in file contenttag:- Search for tags"exact phrase"- Search for exact phrasesterm1 OR term2- Search for either term/regex/flags- Regular expression search
✏️ edit - Smart Editing Operations
window- Edit with automatic content bufferingappend- Append content to filespatch- Intelligent patching with fuzzy matchingat_line- Edit at specific line numbersfrom_buffer- Recover content from edit buffers
👁️ view - Content Viewing and Navigation
file- View complete files with metadatawindow- View content windows with contextactive- Get currently active fileopen_in_obsidian- Open files in Obsidian
🔄 workflow - AI Workflow Guidance
suggest- Get contextual suggestions based on current operations
🕸️ graph - Graph Traversal and Link Analysis
traverse- Explore connected nodes from a starting pointneighbors- Get immediate connections of a filepath- Find paths between two nodesstatistics- Get link counts and statistics for filesbacklinks- Find all incoming links to a fileforwardlinks- Find all outgoing links from a filesearch-traverse- Search-based graph traversal with snippet chainsadvanced-traverse- Multi-query traversal with strategies (breadth-first, best-first, beam-search)
Graph Features:
links/backlinks/tags- Follow connections during traversalpattern/folder/tag filters- Filter by file patterns, folders, or tagsdepth/max_nodes- Control traversal depth and maximum nodesrelevance_scores- Get relevance scores and snippet chainsorphaned/unresolved- Support for orphaned notes and unresolved links
⚙️ system - System Operations
info- Get vault and plugin informationcommands- List and execute Obsidian commandsfetch_web- Fetch and convert web content to markdown
Configuration
Plugin Settings
Access plugin settings via Obsidian Settings → Community Plugins → Obsidian MCP Plugin → Settings
- HTTP Port: Port for MCP server (default: 3001)
- Enable Concurrent Sessions: Allow multiple AI agents to work simultaneously (default: enabled)
- Max Concurrent Connections: Maximum number of parallel operations (default: 32)
- Debug Logging: Enable detailed console logging for troubleshooting
Concurrent Sessions (v0.5.8+)
The plugin supports multiple AI agents working simultaneously through session-based connection pooling:
- Each MCP client gets a unique session ID
- Sessions are isolated and tracked independently
- CPU-intensive operations (search, graph traversal) can run in parallel
- Worker threads prevent blocking the main Obsidian UI
- Sessions automatically expire after 1 hour of inactivity
Performance with Concurrent Sessions:
- Up to 32 simultaneous operations (configurable)
- Worker threads for CPU-intensive tasks
- Non-blocking UI during heavy operations
- Automatic session cleanup and resource management
MCP Resources
obsidian://vault-info- Real-time vault metadata including file counts, active file, and plugin statusobsidian://session-info- Active sessions and connection pool statistics (when concurrent sessions enabled)
Key Improvements Over External MCP Servers
- Performance: Direct vault access eliminates HTTP overhead
- Search: Uses Obsidian's native search with advanced operators
- Integration: Access to full Obsidian API and plugin ecosystem
- Simplicity: Single plugin installation, no external dependencies
- Reliability: No separate processes to manage or crash
Architecture
This plugin implements the same semantic operations as obsidian-semantic-mcp but runs directly within Obsidian:
Before: AI Tool → MCP Server → REST API Plugin → Obsidian
Now: AI Tool → MCP Plugin (within Obsidian)
The critical ObsidianAPI abstraction layer is preserved, allowing all semantic operations to work identically while gaining the performance benefits of direct integration.
Testing Status
✅ Working Features:
- All 6 semantic tools with all actions
- Enhanced search with Obsidian operators
- Graph traversal and link analysis
- Image viewing and file operations
- Fragment retrieval for large files
- Workflow hints and guidance
- Multi-vault support
- Port collision detection
- Cross-platform tested (Linux, Windows, macOS)
⚡ Performance Results:
- File operations: <10ms (vs ~50-100ms with REST API)
- Search operations: <50ms (vs ~100-300ms)
- Zero network overhead
Development
# Clone to your vault's plugins folder
git clone https://github.com/aaronsb/obsidian-mcp-plugin .obsidian/plugins/obsidian-mcp-plugin
# Install dependencies
npm install
# Build for development
npm run dev
# Build for production
npm run build
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
License
MIT
This plugin brings the power of semantic MCP directly into Obsidian, providing AI tools with intelligent, high-performance vault access.
