
Obsidian Enhanced
STDIOMCP server integrating Amazon Q with Obsidian vault for note management and knowledge organization.
MCP server integrating Amazon Q with Obsidian vault for note management and knowledge organization.
A Model Context Protocol (MCP) server for integrating Amazon Q with Obsidian.
This MCP server allows Amazon Q to interact with Obsidian vaults without requiring the Obsidian application to be open. It leverages the Obsidian Local REST API plugin to provide functionality for note management, search, and knowledge management.
Clone this repository:
git clone https://github.com/yourusername/mcp-obsidian-enhanced.git cd mcp-obsidian-enhanced
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies:
pip install -e ".[dev]"
Create a .env
file with your Obsidian API configuration:
OBSIDIAN_API_KEY=your_api_key_from_local_rest_api_plugin
OBSIDIAN_HOST=127.0.0.1
OBSIDIAN_PORT=27124
To integrate this MCP server with Amazon Q CLI, configure the MCP server in your AWS configuration:
~/.aws/amazonq/mcp.json
:{ "mcpServers": { "obsidian-mcp-server": { "command": "uv", "args": ["--directory", "/path/to/mcp-obsidian-enhanced", "run", "run_server.py"], "env": {}, "disabled": false, "autoApprove": [] } } }
/path/to/mcp-obsidian-enhanced
with the actual path to your repository.Run the server with:
python run_server.py
To test with MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory ./ "run" "run_server.py"
Tool Name | Description |
---|---|
obsidian_read_note | Get content of a note from your Obsidian vault |
obsidian_create_note | Create a new note in your Obsidian vault |
obsidian_update_note | Update an existing note in your Obsidian vault |
obsidian_append_note | Append content to an existing note |
obsidian_delete_note | Delete a note from your Obsidian vault |
obsidian_list_files | List files and folders in your Obsidian vault |
obsidian_get_active_file | Get the currently active file in Obsidian |
obsidian_create_daily_note | Create a daily note with predefined sections |
Tool Name | Description |
---|---|
obsidian_search | Search for notes in your Obsidian vault |
obsidian_summarize_note | Summarize the content of a note |
obsidian_search_and_compile | Search for notes and compile information |
obsidian_organize_notes | Organize notes on a specific topic |
The server provides prompt templates using the decorator-based approach:
@mcp.prompt("meeting-notes") async def meeting_notes_prompt( title: str, date: str = "", participants: str = "", folder: str = "Meetings", tags: List[str] = None ) -> Dict[str, Any]: """Create a meeting note with the given details.""" # Implementation...
@mcp.prompt("create-note") async def create_note_prompt( title: str, content: str, folder: str = "", tags: List[str] = None ) -> Dict[str, Any]: """Create a new note with the given details.""" # Implementation...
@mcp.prompt("organize-notes") async def organize_notes_prompt( topic: str, folder: str = "" ) -> Dict[str, Any]: """Organize notes related to a specific topic.""" # Implementation...
Environment Variable | Description | Default |
---|---|---|
OBSIDIAN_API_KEY | API key from Local REST API plugin | (Required) |
OBSIDIAN_HOST | Host where Obsidian is running | 127.0.0.1 |
OBSIDIAN_PORT | Port for the API | 27124 |
OBSIDIAN_PROTOCOL | Protocol to use | https |
OBSIDIAN_VERIFY_SSL | Whether to verify SSL certificates | false |
OBSIDIAN_TIMEOUT | Connection timeout in seconds | 10 |
LOG_LEVEL | Logging level (INFO, DEBUG, etc.) | INFO |
You can test the Obsidian Local REST API endpoints directly using curl:
curl -X GET "http://127.0.0.1:27124/vault/FolderName?list=true" \ -H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "http://127.0.0.1:27124/vault/path/to/note.md" \ -H "Authorization: Bearer YOUR_API_KEY"
curl -X PUT "http://127.0.0.1:27124/vault/path/to/note.md" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: text/markdown" \ -d "# Note Title\n\nNote content here."
curl -X POST "http://127.0.0.1:27124/search/simple" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "query=search_term"
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.