A production-ready Model Context Protocol (MCP) server for seamless integration between Claude and your Obsidian vault. This server enables Claude to read, write, search, and analyze your Obsidian notes directly.
# Pull from Docker Hub
docker pull mahir009/obsidian-mcp-server:latest
# Or build locally
docker build -t obsidian-mcp-server .
# Clone the repository
git clone https://github.com/mahir009/obsidian-mcp-server.git
cd obsidian-mcp-server
# Install with uv
uv venv
uv pip install -e .
Add the following to your Claude Desktop configuration file:
macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
{
"mcpServers": {
"obsidian": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "VAULT_PATH=/vault",
"-e", "TRANSPORT=stdio",
"-v", "/path/to/your/vault:/vault:ro",
"mahir009/obsidian-mcp-server:latest"
],
"env": {
"VAULT_PATH": "/vault"
}
}
}
}
| Variable | Default | Description |
|---|---|---|
VAULT_PATH | /vault | Path to your Obsidian vault |
TRANSPORT | stdio | Transport mode: stdio (Claude Desktop) or sse (remote) |
LOG_LEVEL | INFO | Logging level: DEBUG, INFO, WARNING, ERROR |
HOST | 0.0.0.0 | Host for SSE mode |
PORT | 3000 | Port for SSE mode |
Create a docker-compose.yml:
version: "3.8"
services:
obsidian-mcp-server:
image: mahir009/obsidian-mcp-server:latest
environment:
- VAULT_PATH=/vault
- TRANSPORT=stdio
- LOG_LEVEL=INFO
volumes:
- /path/to/your/vault:/vault:ro
stdin_open: true
tty: true
Run with:
export VAULT_PATH=/path/to/your/vault
docker-compose up
Once configured, you can ask Claude to interact with your vault:
"Please read my Daily/2024-01-15.md note and summarize it."
"Create a new note in Projects/ called 'Website Redesign' with content about the new layout."
"Search my vault for any mentions of 'machine learning' and summarize what I have."
"Show me the structure of my vault and suggest how I could better organize it."
"Find all notes tagged with #project and list their status from frontmatter."
"What notes link to my 'Project Ideas' note? Show me how they're related."
# Clone the repository
git clone https://github.com/mahir009/obsidian-mcp-server.git
cd obsidian-mcp-server
# Create virtual environment with uv
uv venv
# Install in development mode
uv pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/test_vault_manager.py
# Run linter
ruff check src tests
# Run formatter
ruff format src tests
# Run type checker
mypy src
obsidian-mcp-server/
├── src/
│ ├── __init__.py
│ ├── server.py # Main MCP server with tools
│ ├── vault_manager.py # Vault operations logic
│ └── frontmatter_parser.py # YAML frontmatter handling
├── tests/
│ ├── __init__.py
│ ├── test_server.py
│ ├── test_vault_manager.py
│ └── test_frontmatter_parser.py
├── Dockerfile
├── docker-compose.yml
├── pyproject.toml
├── README.md
└── .github/
└── workflows/
├── test.yml
└── docker-publish.yml
Create a Docker Hub account at hub.docker.com
Create a new repository named obsidian-mcp-server
In your GitHub repository, add the following secrets:
DOCKERHUB_USERNAME: Your Docker Hub usernameDOCKERHUB_TOKEN: A Docker Hub access token (create one here)Update the GitHub Actions workflow files with your username:
mahir009 in .github/workflows/docker-publish.ymlmahir009 in README.mdPush to main branch or create a release to trigger the build:
git tag v1.0.0
git push origin v1.0.0
# Build for multiple platforms
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t mahir009/obsidian-mcp-server:latest \
--push .
:ro)Check that VAULT_PATH is set correctly:
# Test vault path
ls -la $VAULT_PATH
# Run with debug logging
docker run -e VAULT_PATH=/vault -e LOG_LEVEL=DEBUG -v /your/vault:/vault obsidian-mcp-server
volumes is absolute, not relativeThe container runs as user mcp (UID 1000). Ensure your vault files are readable:
chmod -R 755 /path/to/your/vault
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/amazing-feature)pytest && ruff check src tests)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Note: Remember to replace mahir009 with your actual GitHub and Docker Hub username throughout the codebase before publishing.
Content type
Image
Digest
sha256:25c9351ee…
Size
77.4 MB
Last updated
8 months ago
docker pull mahir009/obsidian-mcp-server