Obsidian remote MCP server
Enables remote access to Obsidian vaults from Claude.ai and Claude Code without needing Obsidian running, supporting multiple vaults with OAuth 2.1 and static token authentication. Provides note management tools like read, create, edit, delete, and search.
README
<center align="center" style="text-align: center;justify-content:center;"> <div align="center" style="text-align: center;justify-content:center;"> <h1 align="center" style="text-align: center;justify-content:center;">
Obsidian remote MCP server
<img style="justify-content:center;text-align: center;width: 95px; height: auto;" width="793" height="411" alt="image" src="https://github.com/user-attachments/assets/abed1a04-d69b-4ab4-a490-d606064df72d" /> <img style="justify-content:center;text-align: center;width: 250px; height: auto;" alt="image" src="https://github.com/user-attachments/assets/334c2e4d-d56d-4462-89bb-3443195ef68d" />
</h1>
</div> </center>
<hr>
Reach your Obsidian vault from anywhere, in Claude.ai and Claude Code, without Obsidian running and without the vault on the machine you are working from. Wraps obsidian-mcp in an OAuth 2.1 authorization server so it can be added as a Claude.ai custom connector, and keeps static bearer tokens working for Claude Code.
<hr>
Requirements
- An always-on Linux machine, such as a home server, a NAS or a VPS
- Your vault synced to it with Obsidian Sync via Headless Sync, Syncthing, Obsidian Git or Nextcloud
- Node.js 18 or newer
- An HTTPS reverse proxy or tunnel
Features
- Read and write your vault from Claude.ai and Claude Code
- OAuth 2.1 with PKCE, dynamic client registration, and refresh token rotation
- Static bearer token accepted alongside OAuth, so both clients work at once
- Works with Obsidian closed - the vault is read from disk, no plugins needed
- Serves multiple vaults from one endpoint
- No inbound firewall port needed when paired with a Cloudflare Tunnel
How it works
obsidian-mcp (stdio)
-> supergateway stdio to Streamable HTTP, :8420
-> auth-server.js OAuth 2.1 + token check, :8422
-> nginx :8421
-> Cloudflare Tunnel https://obsidian-mcp.example.com
Only the auth server is reachable from outside. Port 8420 speaks no authentication at all and stays bound to localhost.
Claude.ai custom connectors accept OAuth or, in a beta not everyone has, a fixed request header. Claude Code accepts a header directly. This serves both: an OAuth 2.1 flow per the MCP 2025-06-18 authorization spec, and a static token read from a file.
Install
Run this on the machine that holds the vault. It asks for your vault path and hostname, installs the code, generates a password and a token, and writes the service files ready to start.
curl -fsSL https://raw.githubusercontent.com/rollecode/obsidian-remote-mcp/main/install.sh | bash
Install with Claude Code
Claude Code can do the whole thing, including the tunnel and the reverse proxy, which the installer deliberately leaves alone because every setup differs. Start it in an empty directory:
claude
Then give it this:
Install https://github.com/rollecode/obsidian-remote-mcp on this machine.
Read the repository's README for the architecture and the manual setup steps, then work out what applies here rather than assuming. Specifically:
1. Find my Obsidian vault and confirm the path with me before using it.
2. Install the code and dependencies, set a login password, and generate a static token for Claude Code.
3. Install and start both systemd services with the real paths for this machine.
4. Expose it over HTTPS on a hostname I give you. Check what I already run - Cloudflare Tunnel, nginx, Caddy, Traefik - and use that rather than installing something new. Never open a router port without asking me first.
5. Verify it end to end: the discovery endpoints return valid JSON, an unauthenticated request gets 401 with a WWW-Authenticate header, and the static token gets a 200 from the MCP endpoint.
6. Print the Claude.ai connector URL and the exact claude mcp add command for Claude Code, and tell me the password.
This exposes read and write access to my notes over the internet, so tell me anything that weakens that before you do it.
Manual setup
Install first:
git clone https://github.com/rollecode/obsidian-remote-mcp.git
cd obsidian-remote-mcp
npm install
Then set a password. This is what you type on the OAuth login page, and only its scrypt hash is stored.
node set-password.js 'your-password-here'
Generate a static token if you want to use Claude Code, which can send a header directly and skip the login page.
mkdir -p ~/.config/obsidian-mcp
openssl rand -hex 32 > ~/.config/obsidian-mcp/token
chmod 600 ~/.config/obsidian-mcp/token
Install the services, replacing YOUR_USER, the vault path and ISSUER in the unit files with your own.
sudo cp systemd/*.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now obsidian-mcp obsidian-mcp-auth
Expose it. Add the nginx site from nginx/obsidian-mcp.conf, then point a Cloudflare Tunnel at http://localhost:8421. Any HTTPS reverse proxy works, but a tunnel avoids opening a router port.
ingress:
- hostname: obsidian-mcp.example.com
service: http://localhost:8421
cloudflared tunnel route dns YOUR_TUNNEL obsidian-mcp.example.com
sudo systemctl restart cloudflared
Finally, connect. In Claude.ai go to Customize → Connectors → Add custom connector, enter https://obsidian-mcp.example.com/mcp and leave Client ID and Client Secret blank, since the server registers Claude automatically. You will be asked for the password you set earlier. Remember to enable the connector in each conversation from the + menu.
For Claude Code, use the static token.
claude mcp add --transport http obsidian https://obsidian-mcp.example.com/mcp \
--header "Authorization: Bearer $(cat ~/.config/obsidian-mcp/token)"
Tools
Provided by obsidian-mcp.
| Tool | Description |
|---|---|
read-note |
Read a note |
create-note |
Create a note |
edit-note |
Edit a note |
delete-note |
Delete a note, to trash unless permanent |
move-note |
Move or rename a note |
search-vault |
Full text search |
create-directory |
Create a folder |
add-tags |
Add tags to a note |
remove-tags |
Remove tags from a note |
rename-tag |
Rename a tag across the vault |
list-available-vaults |
List configured vaults |
Most tools take {vault, folder, filename}. delete-note takes {vault, path} instead.
Endpoints
| Path | Purpose |
|---|---|
/mcp |
The MCP endpoint, requires a token |
/.well-known/oauth-protected-resource |
RFC 9728 resource metadata |
/.well-known/oauth-authorization-server |
RFC 8414 server metadata |
/register |
RFC 7591 dynamic client registration |
/authorize |
Login page and authorization code issuance |
/token |
Token exchange and refresh |
/healthz |
Health check |
Configuration
| Variable | Default | Purpose |
|---|---|---|
ISSUER |
required | Public HTTPS base URL, no trailing slash |
PORT |
8422 |
Port the auth server listens on |
UPSTREAM |
http://127.0.0.1:8420 |
Where supergateway is listening |
CONFIG_DIR |
~/.config/obsidian-mcp |
Password hash, static token, OAuth database |
DEFAULT_VAULT |
unset | Vault used when a tool call omits one. Serving more than one vault without this makes Claude ask which to use on every call |
Security
- Authorization codes are single use and expire in 60 seconds
- PKCE is required and only
S256is accepted - Redirect URIs are matched exactly against registered values
- Refresh tokens rotate on every use
- Tokens are stored as SHA-256 hashes, so the database holds no usable credentials
- Tokens are bound to the resource they were issued for and rejected elsewhere
- The password is stored as a scrypt hash, compared in constant time
This grants write access to your vault over the internet. Use a strong password, keep ISSUER on HTTPS, and remember that anyone holding the static token has the same access without the login page.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。