Meilisearch Integration
STDIOGo-based wrapper for Meilisearch search engine that functions as MCP server.
Go-based wrapper for Meilisearch search engine that functions as MCP server.
A Go-based wrapper for Meilisearch search engine that functions as a Model Context Protocol (MCP) server.
This project is a Go application designed to enable the Meilisearch search engine to be used as an MCP (Model Context Protocol) server. Through the MCP server, large language models (LLMs) like Claude can access Meilisearch's powerful search capabilities.
# Clone the repository git clone https://github.com/cnosuke/mcp-meilisearch.git cd mcp-meilisearch # Install dependencies make deps # Build make bin/mcp-meilisearch
Use the config.yml
file to configure connection settings to the Meilisearch server:
meilisearch: host: http://localhost:7700 # Address of Meilisearch server api_key: '' # Set API key if needed
You can also configure using environment variables:
MEILISEARCH_HOST
: Address of Meilisearch serverMEILISEARCH_API_KEY
: Meilisearch API key./bin/mcp-meilisearch server --config config.yml
Options:
--no-logs
: Minimize log output (show errors only)--log <file path>
: Output logs to the specified fileTo integrate with Claude Desktop, add an entry to your claude_desktop_config.json
file. Because MCP uses stdio for communication, you must redirect logs away from stdio by using the --no-logs
and --log
flags. Below is an example configuration that injects the SQLite file path via an environment variable:
{ "mcpServers": { "sqlite": { "command": "./bin/mcp-meilisearch", "args": ["server", "--no-logs", "--log", "path_to_log_file"], "env": { "MEILISEARCH_HOST": "http://localhost:7700", "MEILISEARCH_API_KEY": "api_key" } } } }
This configuration registers the MCP SQLite Server with Claude Desktop, ensuring that all logs are directed to the specified log file rather than interfering with the MCP protocol messages transmitted over stdio.
This MCP server provides the following tools:
health_check
: Check the status of the Meilisearch server.
list_indexes
: Retrieve a list of all indexes.
create_index
: Create a new index.
uid
: Unique identifier for the index (required)primary_key
: Primary key for documents (optional)get_documents
: Retrieve documents from an index.
index_uid
: Index UID (required)limit
: Maximum number of documents to retrieve (optional)offset
: Number of documents to skip (optional)fields
: Array of fields to retrieve (optional)add_documents
: Add documents to an index.
index_uid
: Index UID (required)documents
: Array of documents to add (required)primary_key
: Primary key (optional)search
: Search for documents in an index.
index_uid
: UID of the index to search (required)query
: Search query (required)limit
: Maximum number of results to return (optional)offset
: Number of results to skip (optional)filter
: Filter expression (optional)sort
: Array of sort criteria (optional)Contributions are welcome! Please fork the repository and submit pull requests for improvements or bug fixes. For major changes, open an issue first to discuss your ideas.
This project is licensed under the MIT License.
cnosuke (x.com/cnosuke)