Fire in da houseTop Tip:Most people pay up to $340 per month for Perplexity, MidJourney, Runway, ChatGPT, and more - but you can get them all your AI tools for $15 with Galaxy. It's free to test!Fire in da houseCheck it out

meilisearch-hybrid-search-mcp

MCP.Pizza Chef: miiton

The Meilisearch Hybrid Search MCP Server is a Go-based MCP server enabling hybrid search capabilities on a Meilisearch index. It combines traditional keyword-based search with semantic vector search, allowing more relevant and context-aware search results. Configurable via environment variables, it supports secure API access and customizable embedder integration, making it ideal for advanced search workflows in applications using Meilisearch.

Use This MCP server To

Combine keyword and semantic vector search in Meilisearch indexes Filter search results using AI-aware attributes Integrate hybrid search into AI-powered applications Enhance search relevance with semantic embeddings Securely connect to Meilisearch with API key support Customize search behavior with different embedders

README

Meilisearch Hybrid Search MCP Server

This MCP (Model Control Protocol) server provides a tool for performing hybrid searches on a Meilisearch index. It allows combining keyword-based search with semantic vector search.

Environment Variables

Set the following environment variables before running the server:

export MEILI_HOST="http://your-meilisearch-instance:7700" # Meilisearch host URL
export MEILI_API_KEY="your_api_key"                     # Meilisearch API key (if required)
export MEILI_INDEX="your_index_name"                    # The name of the index to search in
export MEILI_EMBEDDER="your_embedder_name"              # The name of the embedder configured in Meilisearch (e.g., 'default', 'myOpenai')
export MEILI_FILTERABLE_ATTRIBUTES="attr1,attr2"        # Comma-separated filterable attributes for AI awareness (from index settings)

Building and Running

Build the server:

go build -o meilisearch-hybrid-search-mcp .

# windows
GOOS=windows GOARCH=amd64 go build -o meilisearch-hybrid-search-mcp.exe .
# linux
GOOS=linux GOARCH=amd64 go build -o meilisearch-hybrid-search-mcp .
# mac
GOOS=macos GOARCH=amd64 go build -o meilisearch-hybrid-search-mcp .

Run the server:

./meilisearch-hybrid-search-mcp

The server will listen on standard input/output.

Available Tool: hybrid_search

This tool performs a hybrid search on the configured Meilisearch index.

Description: Hybrid search your documents in Meilisearch index.

Arguments:

  • keywords (string, required): The search query keywords.
  • semantic_ratio (number, optional, default: 0.5): Controls the balance between keyword and semantic search.
    • 0.0: Pure keyword search.
    • 1.0: Pure semantic search.
    • 0.5: Balanced keyword and semantic search.
  • filterable_attribute (string, optional): The attribute name to filter results on (e.g., "genre", "author"). Requires filter_word.
  • filter_word (string, optional): The value to filter the specified filterable_attribute by (e.g., "Drama", "Tolkien"). Requires filterable_attribute.

meilisearch-hybrid-search-mcp FAQ

How do I configure the Meilisearch host and API key?
Set the MEILI_HOST and MEILI_API_KEY environment variables with your Meilisearch instance URL and API key before running the server.
What is hybrid search in this MCP server?
Hybrid search combines keyword-based search with semantic vector search to improve result relevance and context understanding.
How do I specify which Meilisearch index to search?
Use the MEILI_INDEX environment variable to set the target index name for searches.
Can I customize the semantic embedder used for vector search?
Yes, set the MEILI_EMBEDDER environment variable to the embedder configured in your Meilisearch instance.
What are filterable attributes and how are they used?
Filterable attributes, set via MEILI_FILTERABLE_ATTRIBUTES, allow AI-aware filtering of search results based on index settings.
Is this MCP server compatible with multiple LLM providers?
Yes, it works with models from OpenAI, Claude, Gemini, and others that support semantic vector embeddings.
How do I build and run the Meilisearch Hybrid Search MCP server?
Build the server using 'go build' and run it after setting required environment variables as documented.