MCP server for Obsidian vault management - enables Claude and other AI assistants to read, write, search, and organize your notes
翻译准备中
开发工具TypeScript · JavaScriptGitHub @smith-and-web自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Obsidian vault. Access your notes, create content, manage tags, and search your knowledge base through natural conversation.
DATABASE_URL is setHow clients connect: the server speaks MCP over HTTP + SSE only (there is no stdio mode). You start it (npx, Docker or from source), then point a client at http://HOST:PORT/sse. Clients that only support stdio servers connect through mcp-remote, as shown below. It listens on all network interfaces on PORT, so set an API_KEY (see Authentication) or keep it on loopback (for example -p 127.0.0.1:3001:3000 in Docker) unless you want the whole network to have read/write access to your vault.
Requires Node.js 20.19 or newer. This starts the server in the foreground (default port 3000):
VAULT_PATH=/path/to/your/vault npx @smith-and-web/obsidian-mcp-server
With options:
VAULT_PATH=/path/to/vault PORT=3001 COMPACT_RESPONSES=true npx @smith-and-web/obsidian-mcp-server
Using the pre-built image from GitHub Container Registry:
docker run -d \
--name obsidian-mcp \
-v /path/to/your/vault:/vault:rw \
-p 127.0.0.1:3001:3000 \
-e VAULT_PATH=/vault \
ghcr.io/smith-and-web/obsidian-mcp-server:latest
latest follows the newest release; pin a version tag (for example :1.6.0) for production. Drop 127.0.0.1: only if you set API_KEY and want other machines to connect.
Or with Docker Compose:
Create a docker-compose.yml:
services:
obsidian-mcp:
image: ghcr.io/smith-and-web/obsidian-mcp-server:latest
container_name: obsidian-mcp
restart: unless-stopped
volumes:
- /path/to/your/vault:/vault:rw
ports:
- "127.0.0.1:3001:3000"
environment:
- VAULT_PATH=/vault
Start the server
docker compose up -d
Verify it's running
curl http://localhost:3001/health
Install dependencies
npm install
Set environment variables
export VAULT_PATH=/path/to/your/vault
export PORT=3000
Start the server
npm start
# Or with auto-reload:
npm run dev
Add to your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonOption 1: Local server (via mcp-remote)
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3001/sse"]
}
}
}
Option 2: Remote server with HTTPS
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-domain.com/sse"]
}
}
}
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗