obsidian-mcp-server  by cyanheads

AI agent interface for Obsidian vaults

Created 9 months ago
273 stars

Top 94.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides an Obsidian Model Context Protocol (MCP) server, enabling AI agents and development tools to programmatically interact with an Obsidian vault. It offers a comprehensive API for reading, writing, searching, and managing notes, acting as a bridge to the Obsidian Local REST API plugin for seamless integration into AI workflows and custom applications.

How It Works

The server acts as an MCP endpoint, translating requests from MCP clients into commands for the Obsidian Local REST API plugin. Built on the cyanheads/mcp-ts-template, it features a modular architecture with robust logging, error handling, and security. A key component is an intelligent in-memory Vault Cache Service that enhances performance by caching vault content and provides resilience by serving as a fallback for search operations if the live API is unavailable.

Quick Start & Requirements

  • Prerequisites: Obsidian installed, Obsidian Local REST API plugin enabled and configured with an API key, Node.js (v18+) and npm.
  • Installation: Run via npx obsidian-mcp-server for automatic installation. Configuration requires setting environment variables like OBSIDIAN_API_KEY and OBSIDIAN_BASE_URL in your MCP client's settings. Alternatively, clone the repo, run npm install, npm run rebuild, and then npm start:stdio or npm run start:http.
  • Links: README serves as primary documentation.

Highlighted Details

  • Extensive Toolset: Provides tools for read_note, update_note (append, prepend, overwrite), search_replace, global_search, list_notes, manage_frontmatter, manage_tags, and delete_note.
  • Vault Cache Service: Caches vault content for faster operations and acts as a search fallback. Refreshes periodically and updates proactively.
  • MCP Foundation: Leverages mcp-ts-template for type safety, validation (Zod), logging, and secure HTTP transport with JWT/OAuth options.
  • Targeting Flexibility: Tools can target files by path, active note, or periodic notes.

Maintenance & Community

No specific details on contributors, sponsorships, or community channels (Discord/Slack) are provided in the README. A .clinerules file is included for LLM coding agent reference.

Licensing & Compatibility

  • License: Apache License 2.0.
  • Compatibility: Permissive license suitable for commercial use and integration with closed-source applications.

Limitations & Caveats

MCP Resources are not yet implemented. Requires disabling SSL verification (OBSIDIAN_VERIFY_SSL: "false") by default for the Obsidian Local REST API plugin's self-signed certificate, posing a potential security consideration for production deployments. Strict dependency on the correct configuration and availability of the Obsidian Local REST API plugin.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
51 stars in the last 30 days

Explore Similar Projects

Starred by Assaf Elovic Assaf Elovic(Cofounder of Tavily), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
3 more.

airweave by airweave-ai

1.4%
4k
Semantic MCP server for AI agents
Created 10 months ago
Updated 9 hours ago
Feedback? Help us improve.