Model Context Protocol - Talk to Meilisearch with Claude desktop
Introduction
This guide will walk you through setting up and using Meilisearch through natural language interactions with Claude AI via Model Context Protocol (MCP).Requirements
To follow this guide, you’ll need:- Claude Desktop (free)
- A Meilisearch Cloud project (14 days free-trial)
- Python ≥ 3.9
- From the Meilisearch Cloud dashboard, your Meilisearch host & api key
Setting up Claude Desktop with the Meilisearch MCP Server
1. Install Claude Desktop
Download and install Claude Desktop.2. Install the Meilisearch MCP Server
You can install the Meilisearch MCP server usinguv
or pip
:
3. Configure Claude Desktop
Open Claude Desktop, click on the Claude menu in the top bar, and select “Settings”. In the Settings window, click on “Developer” in the left sidebar, then click “Edit Config”. This will open yourclaude_desktop_config.json
file.
Add the Meilisearch MCP server to your configuration:
Connecting to Your Meilisearch Instance
Once Claude Desktop is set up with the Meilisearch MCP server, you can connect to your Meilisearch instance by asking Claude to update the connection settings. Open Claude Desktop and start a new conversation. Next, connect to your Meilisearch instance by asking Claude to update the connection settings, replacingMEILISEARCH_URL
with your project URL and API_KEY
with your project’s API key:
update-connection-settings
tool to establish a connection to your Meilisearch instance.
Finally, verify the connection by asking:
get-version
and health-check
tools to verify the connection and provide information about your instance.
Create an e-commerce index
Now you have configured the MCP to work with Meilisearch, you can use it to manage your indexes. First, verify what indexes you have in your project:Add documents to your new index
Ask Calude to add a couple of test documents to your “products” index:Configure your index
Before performing your first search, set a few index settings to ensure relevant results. Ask Claude to prioritize exact word matches over multiple partial matches:Perform searches with MCP
Perform your first search with the following prompt:Important note about LLM limitation
Large Language Models like Claude tend to say “yes” to most requests, even if they can’t actually perform them.Claude can only perform actions that are exposed through the Meilisearch API and implemented in the MCP server. If you’re unsure whether a particular operation is possible, refer to the Meilisearch documentation and the MCP server README.Troubleshooting
If you encounter issues with the Meilisearch MCP integration, try these steps1. Ask Claude to verify your connection settings
2. Ask Claude to check your Meilisearch instance health
3. Review Claude’s logs
Open the logs file in your text editor or log viewer:- On macOS:
~/Library/Logs/Claude/mcp*.log
- On Windows:
%APPDATA%\Claude\logs\mcp*.log
4. Test the MCP server independently
Open your terminal and query the MCP Inspector withnpx
: