Skip to main content
Glama
anpigon

Obsidian Omnisearch MCP Server

by anpigon

obsidian_notes_search

Search your Obsidian vault for notes matching a query and retrieve their absolute file paths for further access.

Instructions

Search Obsidian(옵시디언) notes and return absolute paths to the matching notes. The returned paths can be used with the read_note tool to view the note contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • The handler function for the 'obsidian_notes_search' tool. It searches Obsidian notes using a local HTTP endpoint at localhost:51361, sorts results by score, and formats them with title, excerpt, score, and absolute filepath. Registered via @mcp.tool() decorator.
    @mcp.tool() def obsidian_notes_search(query: str): """Search Obsidian(옵시디언) notes and return absolute paths to the matching notes. The returned paths can be used with the read_note tool to view the note contents. """ try: search_url: str = "http://localhost:51361/search?q={query}" response = requests.get(search_url.format(query=quote(query))) response.raise_for_status() # Raise an exception for bad status codes json_response = response.json() sorted_results = sorted( json_response, key=lambda x: x["score"], reverse=True ) return [ f"<title>{item['basename']}</title>\n" f"<excerpt>{item['excerpt']}</excerpt>\n" f"<score>{item['score']}</score>\n" f"<filepath>{os.path.join(obsidian_vault_path, item['path'].lstrip('/'))}</filepath>" for item in sorted_results ] except Exception: return []
  • Registers the obsidian_notes_search tool using FastMCP's @mcp.tool() decorator.
    @mcp.tool()
  • Input schema defined by function signature (query: str) and docstring description.
    def obsidian_notes_search(query: str): """Search Obsidian(옵시디언) notes and return absolute paths to the matching notes. The returned paths can be used with the read_note tool to view the note contents. """

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anpigon/mcp-server-obsidian-omnisearch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server