obsidian-mcp-search
Self-hosted MCP server that provides embedding-powered semantic search with graph context over Obsidian vaults, supporting multiple vaults, local embeddings, and a web dashboard.
README
obsidian-mcp-search
🇰🇷 한국어 README: README.ko.md
Self-hosted MCP server that exposes
embedding-powered semantic search + graph context over your Obsidian
vault(s). Point it at a folder of .md files and it serves hybrid
(BM25 + vector + alias) search to any MCP client — with a web dashboard to
manage vaults and the embedding index.
- No external index: walks a plain Obsidian vault directly
- Local embeddings by default (
intfloat/multilingual-e5-small, no API key); OpenAI/Azure optional - Returns the matching passage plus heading breadcrumb, tags, aliases, outbound links and backlinks
- Multiple vaults from one server, each incrementally indexed and watched
- Web admin dashboard at
/admin
Install
pip / uvx
pip install obsidian-mcp-search
# Or install with the server extra (includes uvicorn + fastmcp):
pip install "obsidian-mcp-search[server]"
obsidian-mcp-search add-vault main /path/to/your/vault
obsidian-mcp-search serve
One-line installer (registers an auto-start service)
./install.sh --vault /path/to/your/vault
# macOS -> launchd, Linux -> systemd; prints dashboard URL + client config
Docker
echo "VAULT_PATH=/path/to/your/vault" > .env
docker compose up --build -d
Connect an MCP client
On localhost (default) no token is needed — a server bound to
127.0.0.1runs without auth. A token is only required for remote exposure (OMCS_HOST=0.0.0.0); see Authentication token.
Claude Desktop
Add to claude_desktop_config.json (local, no token):
{
"mcpServers": {
"obsidian-search": {
"url": "http://127.0.0.1:8848/mcp"
}
}
}
Remote + token — pass the bearer token via headers:
{
"mcpServers": {
"obsidian-search": {
"url": "https://your-host:8848/mcp",
"headers": { "Authorization": "Bearer <your-token>" }
}
}
}
Claude Code (CLI)
# local
claude mcp add --transport http obsidian-search http://127.0.0.1:8848/mcp
# remote + token
claude mcp add --transport http obsidian-search https://your-host:8848/mcp \
--header "Authorization: Bearer <your-token>"
Tools exposed: search(query, k, vault, mode), list_vaults(),
read_note(vault, path, section?), reindex(vault).
Dashboard
Open http://127.0.0.1:8848/admin to add/remove vaults, reindex, clear an
index, switch the embedding model (re-embeds all vaults), and watch live status.
Remote dashboard note: The /admin dashboard is intended for localhost
use (default: no token, works fully in a browser). Browsers cannot attach
Authorization: Bearer headers to page navigations or htmx background requests,
so if you need to access the dashboard remotely you must front the server with a
reverse proxy that handles authentication (e.g. nginx auth_basic or an SSO
proxy), or use an SSH tunnel (ssh -L 8848:127.0.0.1:8848 yourhost). The
bearer token set via MCP_AUTH_TOKEN still fully protects the /mcp endpoint
for all MCP clients that send the Authorization header correctly.
Configuration (env vars)
| Var | Default | Meaning |
|---|---|---|
OMCS_HOST |
127.0.0.1 |
bind address (set 0.0.0.0 to expose) |
OMCS_PORT |
8848 |
port |
MCP_AUTH_TOKEN |
(unset) | bearer token; required when bound off-localhost |
OMCS_EMBED_BACKEND |
local |
local (fastembed) or openai |
OMCS_EMBED_MODEL |
intfloat/multilingual-e5-small |
embedding model |
OMCS_EMBED_BASE_URL |
(unset) | Azure/OpenAI-compatible base URL |
OMCS_PREFER_SQLITE_VEC |
0 |
1 to use sqlite-vec when loadable |
Indexes live in ~/.cache/obsidian-mcp-search/<vault-hash>/; the vault registry
in ~/.config/obsidian-mcp-search/config.toml. Your notes are never written to.
Security
Binds to localhost by default. To expose remotely, set MCP_AUTH_TOKEN and
OMCS_HOST=0.0.0.0; the /mcp endpoint then requires
Authorization: Bearer <token> from all MCP clients. See the Dashboard section
above for notes on remote /admin access.
Authentication token
The token is not issued to you — you create it yourself and set it via
MCP_AUTH_TOKEN. It is only needed when exposing the server remotely (OMCS_HOST=0.0.0.0); localhost needs no token.
1. Generate a token — any sufficiently long random string:
openssl rand -hex 24
# or:
python3 -c "import secrets; print(secrets.token_urlsafe(24))"
2. Set it on the server and bind remotely:
export MCP_AUTH_TOKEN="<token-from-step-1>"
export OMCS_HOST=0.0.0.0
obsidian-mcp-search serve
Starting with OMCS_HOST=0.0.0.0 but no MCP_AUTH_TOKEN is refused (so your
notes are never served unauthenticated). For Docker, put both in .env; for a
launchd/systemd service, add them to that service's environment.
3. Use the same token from the client via the Authorization: Bearer <token>
header (see the Claude Desktop headers and Claude Code --header examples
above). Quick check:
curl -H "Authorization: Bearer $MCP_AUTH_TOKEN" https://your-host:8848/mcp
# wrong/missing token → 401; correct → normal response
(Optional) Regenerate at runtime via the dashboard endpoint:
curl -X POST -H "Authorization: Bearer $MCP_AUTH_TOKEN" \
https://your-host:8848/admin/token/regenerate
# → {"token": "new-token"}
Note: a token changed this way applies only to the running process — a
restart reverts to the MCP_AUTH_TOKEN env value. To change it permanently,
update the env var and restart.
License
MIT.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。