Obsidian MCP Extended
A comprehensive MCP server for Obsidian with 45 tools across hybrid filesystem-native and API-based architectures, enabling note management, backlinks, tag management, and analytics.
README
Obsidian MCP Extended
A comprehensive MCP server for Obsidian with 45 tools across hybrid filesystem-native and API-based architectures. Extends obsidian-mcp with advanced plugin control, backlinks, tag management, and analytics.
Note: This project extends the base
obsidian-mcpserver. The original README is preserved as README.upstream.md.
๐ Features
Hybrid Architecture
Filesystem-Native Tools (33 tools) - Work completely offline, no Obsidian required:
- โ Direct file access for maximum performance
- โ Zero Obsidian plugins needed
- โ Instant startup, minimal memory
- โ Full offline capability
API-Based Tools (12 tools) - Enhanced features when Obsidian is running:
- ๐ Real-time workspace control
- ๐ Advanced plugin integration (Templater, Dataview DQL)
- ๐ Command palette access
- ๐ Requires Local REST API plugin
๐ฆ Complete Tool List (45 Tools)
๐ Backlink Analysis (2 tools - Filesystem)
get_backlinks_fs- Find all notes linking to a specific noteget_broken_links_fs- Identify broken wikilinks in vault
๐ท๏ธ Tag Management (4 tools - Filesystem)
analyze_note_tags_fs- Extract frontmatter and inline tagsadd_tag_fs- Add tags to note frontmatterremove_tag_fs- Remove tags from frontmattersearch_by_tag_fs- Find notes by tag
โ๏ธ Smart Content Insertion (4 tools - Filesystem)
insert_after_heading_fs- Insert content after specific headingsinsert_after_block_fs- Insert after block referencesupdate_frontmatter_field_fs- Update/add frontmatter fieldsappend_to_note_fs- Append content to note end
๐ Statistics & Analytics (2 tools - Filesystem)
note_statistics_fs- Comprehensive stats for individual notesvault_statistics_fs- Aggregate vault statistics
โ Tasks Plugin (5 tools - Filesystem)
search_tasks- Search tasks with emoji metadata (๐ โซ๐โ )create_task- Create tasks with metadatatoggle_task_status- Toggle complete/incompleteupdate_task_metadata- Update due dates, priority, recurrenceget_task_statistics- Task completion analytics
๐ Dataview Inline Fields (4 tools - Filesystem)
extract_dataview_fields- Parse all syntax variants (::, [], ())search_by_dataview_field- Find notes by field valuesadd_dataview_field- Add inline fieldsremove_dataview_field- Remove inline fields
๐ Kanban Boards (5 tools - Filesystem)
parse_kanban_board- Parse markdown Kanban structureadd_kanban_card- Add cards to columnsmove_kanban_card- Move cards between columnstoggle_kanban_card- Toggle card completionget_kanban_statistics- Board analytics
๐ Enhanced Link Tracking (5 tools - Filesystem)
get_link_graph- Complete vault link graphfind_orphaned_notes- Identify isolated notesfind_hub_notes- Find highly connected notesanalyze_link_health- Vault connectivity metricsget_note_connections- Multi-level connection exploration
๐จ Canvas Files (5 tools - Filesystem)
parse_canvas- Parse JSON Canvas v1.0 filesadd_canvas_node- Add text/file nodesadd_canvas_edge- Connect nodes with edgesremove_canvas_node- Delete nodesget_canvas_node_connections- Analyze node relationships
๐ Templates (3 tools - Filesystem)
expand_template- Simple {{variable}} expansioncreate_note_from_template_fs- Apply templates offlinelist_templates- Browse available templates
๐ Dataview Query API (4 tools - Requires Obsidian + Dataview)
execute_dataview_query- Execute full DQL queries (LIST/TABLE/TASK)list_notes_by_tag_dql- DQL tag-based querieslist_notes_by_folder_dql- DQL folder queriestable_query_dql- Create tabular data views
๐ Templater Plugin API (3 tools - Requires Obsidian + Templater)
render_templater_template- Dynamic template renderingcreate_note_from_template_api- Create notes from Templater templatesinsert_templater_template- Insert templates at cursor
๐ Workspace Management (6 tools - Requires Obsidian)
get_active_file- Get currently active fileopen_file- Open files in Obsidianclose_active_file- Close current filenavigate_back- Navigate backward in historynavigate_forward- Navigate forward in historytoggle_edit_mode- Switch edit/preview mode
๐ Command Execution (3 tools - Requires Obsidian)
execute_command- Run Obsidian commandslist_commands- List all available commandssearch_commands- Search commands by name/ID
๐ Quick Start
Prerequisites
# Python 3.11+ required
python --version
# Install uv (recommended package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
Installation
# Clone repository
git clone https://github.com/aleksakarac/obsidian-mcp.git
cd obsidian-mcp
# Install with uv (recommended)
uv pip install .
# Or with pip
pip install .
Configuration
For Filesystem-Only Tools (No Obsidian Required)
Add to your Claude Code config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"obsidian": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/obsidian-mcp",
"run",
"obsidian-mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault"
}
}
}
}
For Full Hybrid Mode (Filesystem + API Tools)
-
Install Local REST API plugin in Obsidian
-
Configure plugin settings:
- Enable HTTPS: No (use HTTP for localhost)
- API Key: Generate a secure key
- Port: 27124 (default)
-
Update Claude Code config:
{
"mcpServers": {
"obsidian": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/obsidian-mcp",
"run",
"obsidian-mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault",
"OBSIDIAN_REST_API_KEY": "your-api-key-here",
"OBSIDIAN_API_URL": "http://localhost:27124"
}
}
}
}
๐ Usage Examples
Tasks Plugin (Filesystem-Native)
# Search for high-priority incomplete tasks
search_tasks(
status="incomplete",
priority="high",
sort_by="due_date",
limit=10
)
# Create task with metadata
create_task(
file_path="Projects/Current.md",
content="Review PR #123",
priority="high",
due_date="2025-11-01",
tags=["code-review", "urgent"]
)
Dataview Fields (Filesystem-Native)
# Extract all inline fields
extract_dataview_fields(file_path="Project Notes.md")
# Find notes where status=active
search_by_dataview_field(
field_name="status",
field_value="active"
)
Kanban Boards (Filesystem-Native)
# Parse board structure
parse_kanban_board(file_path="Boards/Sprint.md")
# Move card between columns
move_kanban_card(
file_path="Boards/Sprint.md",
card_text="Implement authentication",
from_column="To Do",
to_column="In Progress"
)
Link Analysis (Filesystem-Native)
# Find orphaned notes
find_orphaned_notes()
# Get link graph
get_link_graph()
# Analyze vault health
analyze_link_health()
Dataview Queries (Requires Obsidian)
# Execute DQL query
execute_dataview_query(
query="TABLE status, due FROM #project WHERE status = 'active'"
)
Workspace Control (Requires Obsidian)
# Open file
open_file(file_path="Daily/2025-10-22.md")
# Get active file
get_active_file()
# Execute command
execute_command(command_id="editor:toggle-bold")
๐๏ธ Architecture
Hybrid Design Philosophy
Filesystem-First Approach:
- Everything that CAN be filesystem-native, IS filesystem-native
- Direct file access for reading/writing markdown
- Zero dependencies on Obsidian plugins for core features
- Full offline capability
API Enhancement:
- API tools complement filesystem tools
- Provide features impossible without Obsidian (workspace UI, command execution)
- Enable plugin integration (Templater, Dataview DQL)
- Graceful degradation with clear error messages
Technology Stack
- FastMCP: MCP protocol implementation
- Pydantic: Type-safe data models with validation
- Python Standard Library: Zero external dependencies for filesystem operations
- httpx: Async HTTP client for API tools
Performance
Filesystem Tools:
- 1,000 notes: < 3 seconds for full vault scans
- Single note operations: < 100ms
- Link graph generation: < 10 seconds for 1,000 notes
API Tools:
- Command execution: < 500ms
- Query execution: Depends on Dataview plugin
- Workspace operations: < 200ms
๐งช Testing
See TESTING.md for comprehensive testing documentation.
# Run all tests
uv run pytest
# Run specific test suite
uv run pytest tests/unit/test_tasks.py -v
# Run with coverage
uv run pytest --cov=src --cov-report=html
๐ Development
Project Structure
obsidian-mcp/
โโโ src/
โ โโโ models/ # Pydantic data models
โ โโโ tools/ # MCP tool implementations
โ โโโ utils/ # Shared utilities (patterns, API client)
โ โโโ server.py # FastMCP server with tool registrations
โโโ tests/
โ โโโ unit/ # Unit tests for tools
โ โโโ integration/ # End-to-end workflow tests
โโโ specs/ # Feature specifications
โโโ pyproject.toml # Project configuration
Adding New Tools
- Create tool module in
src/tools/ - Add Pydantic models to
src/models/obsidian.py(if needed) - Register tool in
src/server.pywith@mcp.tool()decorator - Add unit tests in
tests/unit/ - Update README.md and CHANGELOG.md
๐ค Contributing
Contributions welcome! Please:
- Follow existing code style
- Add tests for new features
- Update documentation
- Ensure all tests pass
๐ License
MIT License - see LICENSE for details
๐ Acknowledgments
- Base implementation: obsidian-mcp
- MCP Protocol: Model Context Protocol
- Obsidian: Obsidian.md
๐ Additional Documentation
- TESTING.md - Testing guide
- CHANGELOG.md - Version history
- README.upstream.md - Original obsidian-mcp README
- specs/ - Feature specifications and design docs
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.