Content
# OBSIDIAN-MCP-SERVER
This is a Model Context Protocol (MCP) Stdio server that can be integrated with LLM Agent. This server provides Python-based functionalities related to Obsidian, allowing the LLM Agent to utilize Obsidian-related features.
## Features
### Vault Management
- Create Vault
- Delete Vault
- List Vaults
- Retrieve Vault Information
- Retrieve Vault Settings
- Change Vault Settings
### File Management
- List Vault Files
- Create (or Modify) Vault Files
- Delete Vault Files
## Installation Instructions
1. Clone the repository
```bash
git clone https://github.com/your-username/obsidian-mcp-server.git
cd obsidian-mcp-server
```
2. Create and activate a virtual environment
```bash
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows
```
3. Install dependencies
```bash
pip install -r requirements.txt
```
4. Set environment variables
Create a `.env` file and add the following content:
```
OBSIDIAN_VAULT_PATH=/path/to/your/obsidian/vault
```
## Usage Instructions
### Run the Server
```bash
python main.py
```
### API Usage Examples
#### Create Vault
```json
{
"jsonrpc": "2.0",
"method": "create_vault",
"params": {
"vault_name": "my_vault",
"path": "/optional/custom/path"
},
"id": 1
}
```
#### List Vaults
```json
{
"jsonrpc": "2.0",
"method": "list_vaults",
"params": {},
"id": 2
}
```
#### Write File
```json
{
"jsonrpc": "2.0",
"method": "write_vault_file",
"params": {
"vault_name": "my_vault",
"file_path": "notes/example.md",
"content": "# Example Note\n\nThis is a test note."
},
"id": 3
}
```
## Error Codes
- -32000: General Error
- -32001: Vault Not Found
- -32002: Vault Already Exists
- -32003: File Not Found
- -32004: Path Not Found
- -32005: Configuration File Not Found
- -32006: Invalid Configuration
- -32007: File Operation Error
- -32008: Invalid Request
- -32009: Environment Variable Configuration Error
- -32010: Obsidian Directory Error
## Response Format
### Successful Response
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "success",
"message": "Operation completed successfully",
"data": {}
}
}
```
### Error Response
```json
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32001,
"message": "Vault 'my_vault' does not exist"
}
}
```
## License
MIT License
## Cursor Installation Instructions
To use this MCP server in Cursor, configure it as follows:
```json
"obsidian-mcp-server": {
"transport": "stdio",
"command": "/path/to/your/venv/bin/python",
"args": ["/path/to/your/obsidian-mcp-server/main.py"],
"env": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault"
}
}
```
Modify each path according to your environment:
- `/path/to/your/venv/bin/python`: Path to the Python executable in your virtual environment
- `/path/to/your/obsidian-mcp-server/main.py`: Path to the main.py file of this project
- `/path/to/your/obsidian/vault`: Path to your Obsidian Vault
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
firecrawl
Firecrawl MCP Server enables web scraping, crawling, and content extraction.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.