Connect your AI assistant to Obsidian! This Model Context Protocol (MCP) server enables Claude, Cursor, and other AI tools to read, write, search, and manage your Obsidian notes through the Local REST API.
- Install "Local REST API" from Community Plugins in Obsidian
- Set an API key in plugin settings
- Start the server using Command Palette: "Local REST API: Start"
- Note the URL:
http://127.0.0.1:27123
(default)
Option A: Install from source code directly
git clone https://github.com/otaviocc/ObsidianMCPServer.git
cd ObsidianMCPServer
swift build -c release
# The executable will be at: .build/release/ObsidianMCPServer
Option B: Install via Brew π€©
brew tap otaviocc/mcp
brew install obsidian-mcp-server
# The executable will be at: `/opt/homebrew/bin/obsidian-mcp-server`
Option C: Install via Mint
mint install otaviocc/ObsidianMCPServer
# The executable will be at: `$HOME/.mint/bin/ObsidianMCPServer`
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"obsidian": {
"command": "/path/to/ObsidianMCPServer",
"env": {
"OBSIDIAN_BASE_URL": "http://127.0.0.1:27123",
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}
Cursor: Add the same configuration in Settings β Tools & Integration
Replace /path/to/ObsidianMCPServer
with your actual path:
- Source build:
.build/release/ObsidianMCPServer
(from your build directory) - Brew install:
/opt/homebrew/bin/obsidian-mcp-server
- Mint install:
$HOME/.mint/bin/ObsidianMCPServer
Also replace your-api-key-here
with your plugin's API key.
Server: Basic server identification and connection information for the Obsidian MCP interface.
getServerInfo()
: Get Obsidian server details
Active Note: Operations for working with the currently open note in Obsidian's interface, providing direct access to read, modify, and manage the active document and its metadata.
getActiveNote()
: Get currently active noteupdateActiveNote(content)
: Replace active note contentdeleteActiveNote()
: Delete active notesetActiveNoteFrontmatterString(key, value)
: Set frontmatter string fieldappendToActiveNoteFrontmatterString(key, value)
: Append to frontmatter string fieldsetActiveNoteFrontmatterArray(key, values)
: Set frontmatter array fieldappendToActiveNoteFrontmatterArray(key, values)
: Append to frontmatter array field
Vault Note: File operations for any note in the vault by filename, enabling programmatic access to create, read, update, delete notes and manage their frontmatter throughout the entire vault structure.
getNote(filename)
: Get any note by filenamecreateOrUpdateNote(filename, content)
: Create or update a noteappendToNote(filename, content)
: Append content to a notedeleteNote(filename)
: Delete specific notesetNoteFrontmatterString(filename, key, value)
: Set frontmatter string fieldappendToNoteFrontmatterString(filename, key, value)
: Append to frontmatter string fieldsetNoteFrontmatterArray(filename, key, values)
: Set frontmatter array fieldappendToNoteFrontmatterArray(filename, key, values)
: Append to frontmatter array field
Directory & Search: Vault exploration and content discovery tools for browsing directory structures and performing text-based searches across all notes.
listDirectory(directory)
: List vault contentssearch(query)
: Search entire vault
Bulk Operations: Batch processing tools that apply changes to multiple notes simultaneously based on search criteria, enabling efficient vault-wide metadata and tag management.
bulkApplyTagsFromSearch(query, tags)
: Apply tags to search matchesbulkReplaceFrontmatterStringFromSearch(query, key, value)
: Replace frontmatter string for matchesbulkReplaceFrontmatterArrayFromSearch(query, key, value)
: Replace frontmatter array for matchesbulkAppendToFrontmatterStringFromSearch(query, key, value)
: Append to frontmatter string for matchesbulkAppendToFrontmatterArrayFromSearch(query, key, value)
: Append to frontmatter array for matches
Periodic Notes (Current): Integration with the Periodic Notes plugin for managing time-based notes (daily, weekly, monthly, quarterly, yearly) for the current time period, supporting journaling and time-based workflows.
getDailyNote()
: Get the daily notegetWeeklyNote()
: Get the weekly notegetMonthlyNote()
: Get the monthly notegetQuarterlyNote()
: Get the quarterly notegetYearlyNote()
: Get the yearly notecreateOrUpdateDailyNote(content)
: Create or replace daily notecreateOrUpdateWeeklyNote(content)
: Create or replace weekly notecreateOrUpdateMonthlyNote(content)
: Create or replace monthly notecreateOrUpdateQuarterlyNote(content)
: Create or replace quarterly notecreateOrUpdateYearlyNote(content)
: Create or replace yearly noteappendToDailyNote(content)
: Append to daily noteappendToWeeklyNote(content)
: Append to weekly noteappendToMonthlyNote(content)
: Append to monthly noteappendToQuarterlyNote(content)
: Append to quarterly noteappendToYearlyNote(content)
: Append to yearly notedeleteDailyNote()
: Delete daily notedeleteWeeklyNote()
: Delete weekly notedeleteMonthlyNote()
: Delete monthly notedeleteQuarterlyNote()
: Delete quarterly notedeleteYearlyNote()
: Delete yearly note
Periodic Notes (Date-Specific): Advanced periodic note operations that target specific historical or future dates, enabling precise temporal note management and retrospective journaling workflows.
getDailyNoteForDate(year, month, day)
: Get daily note for dategetWeeklyNoteForDate(year, month, day)
: Get weekly note for dategetMonthlyNoteForDate(year, month, day)
: Get monthly note for dategetQuarterlyNoteForDate(year, month, day)
: Get quarterly note for dategetYearlyNoteForDate(year, month, day)
: Get yearly note for datedeleteDailyNoteForDate(year, month, day)
: Delete daily note for datedeleteWeeklyNoteForDate(year, month, day)
: Delete weekly note for datedeleteMonthlyNoteForDate(year, month, day)
: Delete monthly note for datedeleteQuarterlyNoteForDate(year, month, day)
: Delete quarterly note for datedeleteYearlyNoteForDate(year, month, day)
: Delete yearly note for dateappendToDailyNoteForDate(year, month, day, content)
: Append to daily note for dateappendToWeeklyNoteForDate(year, month, day, content)
: Append to weekly note for dateappendToMonthlyNoteForDate(year, month, day, content)
: Append to monthly note for dateappendToQuarterlyNoteForDate(year, month, day, content)
: Append to quarterly note for dateappendToYearlyNoteForDate(year, month, day, content)
: Append to yearly note for datecreateOrUpdateDailyNoteForDate(year, month, day, content)
: Create/replace daily note for datecreateOrUpdateWeeklyNoteForDate(year, month, day, content)
: Create/replace weekly note for datecreateOrUpdateMonthlyNoteForDate(year, month, day, content)
: Create/replace monthly note for datecreateOrUpdateQuarterlyNoteForDate(year, month, day, content)
: Create/replace quarterly note for datecreateOrUpdateYearlyNoteForDate(year, month, day, content)
: Create/replace yearly note for date
Analysis: Structured prompts for examining and understanding note content with customizable focus areas, enabling comprehensive content analysis and insights.
analyzeNote(filename, focus)
: Analyze an Obsidian note with focus typesanalyzeActiveNote(focus)
: Analyze the currently active note
Questions: Interactive prompt generation that creates thought-provoking follow-up questions to deepen engagement with note content.
generateFollowUpQuestions(filename, questionCount)
: Generate followβup questions
Metadata: Intelligent metadata extraction and suggestion tools that analyze content to recommend tags, frontmatter structures, and organizational elements.
suggestTags(filename, maxTags)
: Suggest relevant tags for a notegenerateFrontmatter(filename)
: Generate complete frontmatter structuresuggestActiveNoteTags(maxTags)
: Tag suggestions for active noteextractMetadata(filename)
: Extract structured metadata from content
Transformation: Content modification prompts that reshape existing notes by changing writing style or translating to different languages while preserving structure and meaning.
rewriteActiveNote(style)
: Rewrite active note in a styletranslateActiveNote(language)
: Translate active note to a language
Generation: Content creation prompts that produce structured derivatives of existing notes, including abstracts, summaries, and hierarchical outlines.
generateActiveNoteAbstract(length)
: Generate abstract/summarygenerateActiveNoteOutline(style)
: Generate structured outline
Proofreading: Grammar and text enhancement tools that correct errors, improve readability, and polish writing while preserving technical content and Obsidian formatting.
proofreadActiveNote()
: Proofread and correct grammar
Enum Discovery: Type system exploration tools that expose available parameter options for prompts, enabling better integration and user interface development.
obsidian://enums
: List all available enum typesobsidian://enums/language
: Translation languagesobsidian://enums/writing-style
: Writing stylesobsidian://enums/analysis-focus
: Analysis focus typesobsidian://enums/abstract-length
: Summary lengthsobsidian://enums/outline-style
: Outline formats
- macOS 12.0+ with Swift 6.0+
- Obsidian with Local REST API plugin
- AI Tool supporting MCP (Claude Desktop, Cursor, etc.)
- API key stays local (never transmitted to external services)
- Server runs on localhost only
- Enable HTTPS in plugin for encrypted communication (port 27124)
- Only use with trusted AI applications
Connection Issues:
- Verify Obsidian Local REST API plugin is running
- Check base URL matches plugin settings (27123 for HTTP, 27124 for HTTPS)
- Confirm API key matches plugin configuration
Build Issues:
- Ensure Swift 6.0+ is installed
- Try
swift package clean
and rebuild
# Development build
swift build
# Run tests (190+ test cases)
swift test
# Release build
swift build -c release
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Add tests for new functionality
- Ensure all tests pass:
swift test
- Submit Pull Request
MIT License - see LICENSE file for details.
- Obsidian for the knowledge management platform
- Obsidian Local REST API plugin
- SwiftMCP for MCP implementation
- The Model Context Protocol community