本项目是一个基于 FastMCP 的服务器,通过 REST API 接口为您提供 Obsidian 笔记库搜索功能,让您能更便捷地程序化搜索笔记。
该项目实现了一个搜索服务,允许您程序化地搜索 Obsidian 笔记。它使用 FastMCP 将搜索功能作为工具公开,以便与其他服务集成。
git clone https://github.com/anpigon/mcp-server-obsidian-omnisearch.git
cd mcp-server-obsidian-omnisearch
uv install
Obsidian 笔记库路径现在作为运行服务器时的命令行参数提供:
python server.py /path/to/your/obsidian/vault
您需要运行 Obsidian Omnisearch 社区插件:https://publish.obsidian.md/omnisearch/Inject+Omnisearch+results+into+your+search+engine
在 MacOS 上:~/Library/Application\ Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json%
{
"mcpServers": {
"obsidian-omnisearch": {
"command": "uv",
"args": [
"--directory",
"/mcp-server-obsidian-omnisearch" ,
"run",
"mcp-server-obsidian-omnisearch",
"/path/to/your/obsidian/vault"
]
}
}
}
{
"mcpServers": {
"obsidian-omnisearch": {
"command": "uvx",
"args": [
"mcp-server-obsidian-omnisearch",
"/path/to/your/obsidian/vault"
]
}
}
}
obsidian_notes_search(query: str)query:搜索查询字符串为了准备分发包,可按以下步骤操作:
uv sync
uv build
这将在 dist/ 目录中创建源代码和轮式(wheel)发行版。
uv publish
注意:您需要通过环境变量或命令行参数设置 PyPI 凭据:
--token 或 UV_PUBLISH_TOKEN--user 或 UV_PUBLISH_USER--password 或 UV_PUBLISH_PASSWORD如果您在使用过程中遇到任何问题或有其他疑问,请随时与我们联系。