A FastMCP-based server that provides Obsidian vault search functionality through a REST API interface.
This project implements a search service that allows you to search through Obsidian vault notes programmatically. It uses FastMCP to expose the search functionality as a tool that can be integrated with other services.
- Search through Obsidian vault notes
- REST API integration
- Returns absolute paths to matching notes
- Easy integration with FastMCP tools
- Python 3.x
- Obsidian with Omnisearch plugin installed and running
- FastMCP library
- Active Obsidian vault
To install MCP Server Obsidian Omnisearch for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @anpigon/mcp-server-obsidian-omnisearch --client claude- Clone the repository:
git clone https://github.com/anpigon/mcp-server-obsidian-omnisearch.git
cd mcp-server-obsidian-omnisearch- Install dependencies:
uv installThe Obsidian vault path is now provided as a command line argument when running the server:
python server.py /path/to/your/obsidian/vaultYou need the Obsidian Omnisearch community plugin running: https://publish.obsidian.md/omnisearch/Inject+Omnisearch+results+into+your+search+engine
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
{
"mcpServers": {
"obsidian-omnisearch": {
"command": "uv",
"args": [
"--directory",
"<dir_to>/mcp-server-obsidian-omnisearch",
"run",
"mcp-server-obsidian-omnisearch",
"/path/to/your/obsidian/vault"
]
}
}
}Published Servers Configuration
{
"mcpServers": {
"obsidian-omnisearch": {
"command": "uvx",
"args": [
"mcp-server-obsidian-omnisearch",
"/path/to/your/obsidian/vault"
]
}
}
}- Function:
obsidian_notes_search(query: str) - Description: Searches Obsidian notes and returns absolute paths to matching notes
- Parameters:
query: Search query string
- Returns: List of absolute paths to matching notes
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync- Build package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-server-obsidian-omnisearch run mcp-server-obsidian-omnisearchUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
You can also watch the server logs with this command:
tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-server-obsidian-omnisearch.log- FastMCP
- requests
- urllib
This project is licensed under the MIT License - see the
Contributions are welcome! Please feel free to submit a Pull Request.