# mcp-obsidian

Author: Markus Pfundstein

Description: MCP server that interacts with Obsidian via the Local REST API community plugin, exposing tools for listing, reading, searching and modifying notes inside an Obsidian vault.

Stars: 1.6k  
Forks: 197  
License: MIT License  
Category: Specialized

## Overview

# Transform Your Coding Workflow: Augment Code + Obsidian Integration

**Connect your entire knowledge base to your AI coding assistant.** The MCP Obsidian server bridges Augment Code with your Obsidian vault, turning your personal knowledge management system into a powerful coding context engine. Instead of switching between your code editor and notes to reference project specs, architectural decisions, or meeting outcomes, Augment can now access all this context directly while you code.

**Seamless Integration for Smarter Coding**: Add this MCP server to your Augment Code setup and watch your productivity skyrocket. When you ask Augment to implement a feature, it can instantly reference your project documentation, architectural decision records (ADRs), and technical specifications stored in Obsidian. Need to refactor code? Augment can review your design patterns and coding standards from your notes. Working on a bug fix? It can search through your troubleshooting documentation and past incident reports to suggest the best approach.

**Real-World Workflow Enhancement**: Picture this scenario - you're implementing a new API endpoint and ask Augment for help. Instead of just generating generic code, it searches your Obsidian vault for API design guidelines, authentication patterns, and error handling standards specific to your project. It references your meeting notes from the feature planning session, checks your architectural diagrams, and generates code that perfectly aligns with your team's established patterns. After implementation, Augment can automatically update your technical documentation in Obsidian, create deployment notes, and even draft status updates for stakeholders - all without leaving your coding flow.

## Quick Setup for Augment Code

Add this configuration to your Augment Code MCP settings:

```
{
  "mcp-obsidian": {
    "command": "uvx",
    "args": ["mcp-obsidian"],
    "env": {
      "OBSIDIAN_API_KEY": "your_api_key_here",
      "OBSIDIAN_HOST": "127.0.0.1",
      "OBSIDIAN_PORT": "27124"
    }
  }
}
```

**Prerequisites**: Install the Obsidian Local REST API community plugin in your Obsidian vault and generate an API key.

## Installation

1. Clone the repository  
   `git clone https://github.com/MarkusPfundstein/mcp-obsidian.git`  
   `cd mcp-obsidian`

2. Create & activate a virtual environment (recommended)  
   `python -m venv .venv`  
   `source .venv/bin/activate   # Windows: .venv\Scripts\activate`

3. Install Python dependencies  
   `pip install -r requirements.txt`

4. Configure the server – create a .env file or set environment variables:
   
   ```
   OBSIDIAN_BASE_URL=https://127.0.0.1:27123           # URL where the Obsidian REST-API plugin is listening
   OBSIDIAN_API_TOKEN=<your-obsidian-token>             # Token generated in the plugin
   MCP_HOST=0.0.0.0
   MCP_PORT=8000
   ```

5. Launch the server  
   `python -m mcp_obsidian            # or: uvicorn mcp_obsidian.app:app --host $MCP_HOST --port $MCP_PORT`

6. Verify  
   `curl http://localhost:8000/healthz      # Should return OK`

7. (Optional) Reverse proxy  
   `Configure nginx/Caddy/Traefik if you want TLS or a public URL.`

### Available Tools

1. **list_files_in_vault**  
   Lists all files and directories in the root directory of the Obsidian vault.

2. **list_files_in_dir**  
   Lists all files and directories inside a specified directory within the Obsidian vault.

3. **get_file_contents**  
   Returns the content of a single file in the vault.

4. **search**  
   Searches across all files in the vault for documents matching a given text query.

5. **patch_content**  
   Inserts content into an existing note relative to a heading, block reference, or front-matter field.

6. **append_content**  
   Appends content to a new or existing file in the vault.

7. **delete_file**  
   Deletes a file or directory from the vault.

License: MIT License  
Updated 7/30/2025

### Table of Contents
