Obsidian MCP server + VScode Agent + Claude
AI Summary
Summary of Setting Up Local MCP Server for Obsidian
Introduction
- MCP (Model Context Protocol) allows automation using preferred AI tools.
- Focus: Setting up a local MCP server for Obsidian.
Requirements
- Comfort with terminal commands.
- Compatibility with various operating systems (examples based on Mac OS).
Overview of MCP
- Sequence diagram explaining user, host app, MCP client, MCP server, and external service (Obsidian).
- Functionality: enables information exchange between host applications and Obsidian.
Components Needed
- Obsidian Local REST API Plugin
- Exposes a REST API for external services.
- Security: Use a fork to avoid supply chain issues.
- MCP Obsidian Server
- Python application that connects to Obsidian’s REST API.
- Functions: Read, create, update, and delete notes; list files; execute commands.
Installation Steps
- Set up Obsidian Vault:
- Navigate to the vault folder.
- Create subfolders for plugins.
- Clone Obsidian Local REST API Plugin:
- Use
git clone [URL]
to fetch the plugin repo.- Run
npm install
to install dependencies.- Build the project:
npm run build
.- Configure and Enable Plugin in Obsidian:
- Go to Community Plugins settings to enable the Local REST API.
- Regenerate certificates for HTTPS connections.
- Add self-signed certificate to the local trust store.
- Set Up MCP Obsidian Server:
- Clone the MCP server repo.
- Install dependencies using
uvsync
.- Run the MCP server (use Python virtual environments).
- Configure Host Application:
- Set up MCP server in the host application (e.g., Claude or VS Code).
- Ensure commands to run the server are correctly specified.
Usage Instructions
- Trigger interactions like listing notes or creating new ones through the configured MCP client.
- Maintain security awareness; ensure non-destructive commands are run.
- Use version control (e.g., Git) to manage Obsidian content safely.
Additional Integration with VS Code
- Similar setup process in VS Code with agent configurations.
- Supports a broader range of models for interactions with Obsidian.
Conclusion
- Successfully integrating MCP with Obsidian allows streamlined automation of note management.