Meilisearch & Model Context Protocol - Talk to Meilisearch with Claude desktop
This guide walks Meilisearch users through setting up the MCP server with Claude desktop to talk to the Meilisearch API
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 using uv
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 your claude_desktop_config.json
file.
Add the Meilisearch MCP server to your configuration:
Save the file and restart Claude.
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, replacing MEILISEARCH_URL
with your project URL and API_KEY
with your project’s API key:
Claude will use the MCP server’s update-connection-settings
tool to establish a connection to your Meilisearch instance.
Finally, verify the connection by asking:
Claude will use the 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:
Next, ask Claude to create an index optimized for e-commerce:
Finally, check the index has been created successfully and is completely empty:
Add documents to your new index
Ask Calude to add a couple of test documents to your “products” index:
Since you are only using “products” for testing, you can also ask Claude to automatically populate it with placeholder data:
To verify data insertion worked as expected, retrieve the first few documents in your 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:
It’s also a good practice to limit searchable attributes only to highly-relevant fields, and only return attributes you are going to display in your search interface:
Perform searches with MCP
Perform your first search with the following prompt:
You can also request your search uses other Meilisearch features such as filters and sorting:
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 steps
1. 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 with npx
:
Conclusion
The Meilisearch MCP integration with Claude can transform multiple API calls and configuration tasks into conversational requests. This can help you focus more on building your application and less on implementation details.
For more information about advanced configurations and capabilities, refer to the Meilisearch documentation and the Meilisearch MCP server repository.
Was this page helpful?