Meilisearch
Visit ProjectInteract and query with Meilisearch full-text & semantic-search API.
Visit ProjectCategory
Tags
What is Meilisearch MCP Server?
The Meilisearch MCP Server is a Model Context Protocol server that enables any MCP-compatible client (including AI assistants like Claude and OpenAI models) to interact with Meilisearch, a powerful search engine, through natural conversation instead of direct API calls.
How to use the Meilisearch MCP Server?
-
Installation:
pip install meilisearch-mcp
-
Configure Claude Desktop: Add server configuration to your Claude Desktop config file.
-
Start Meilisearch: Run either through Docker or by installing directly on your system.
-
Interact: Use natural language commands to manage Meilisearch data and search through AI conversation.
Key Features
- š¤ Universal Compatibility - Works with any MCP client
- š Index & Document Management - Create, update, and manage search indices
- š Smart Search - Advanced search across single or multiple indices
- āļø Settings Configuration - Fine-tune search performance and relevancy
- š ļø Tool Set - Over 25 built-in tools for comprehensive management
- š Python Implementation - Develop in Python with TypeScript alternative available
Use Cases
- AI-Powered Search Assistance
- Natural language search queries and index management
- Content Management
- Automated document indexing and text search integration
- Developer Productivity
- Quick setup of search functionality without manual API coding
- Data Exploration
- Dynamic filtering and sorting through conversation
- Document Organization
- AI-assisted document categorization and retrieval
FAQ
-
What is MCP?
MCP (Model Context Protocol) is a standard for AI agents to call external services.
-
What's the difference between MCP Server and direct Meilisearch API?
MCP Server provides a conversation interface, while direct API requires manual implementation.
-
Whichcpp versions of Python are supported?
Python versions 3.9 and above.
-
Can I use self-hosted Meilisearch instances?
Yes, you can connect to any Meilisearch instance by updating environment variables.
Meilisearch MCP Server
Meilisearch | Meilisearch Cloud | Documentation | Discord
ā” Connect any LLM to Meilisearch and supercharge your AI with lightning-fast search capabilities! š
š¤ What is this?
The Meilisearch MCP Server is a Model Context Protocol server that enables any MCP-compatible client (including Claude, OpenAI agents, and other LLMs) to interact with Meilisearch. This stdio-based server allows AI assistants to manage search indices, perform searches, and handle your data through natural conversation.
Why use this?
- š¤ Universal Compatibility - Works with any MCP client, not just Claude
- š£ļø Natural Language Control - Manage Meilisearch through conversation with any LLM
- š Zero Learning Curve - No need to learn Meilisearch's API
- š§ Full Feature Access - All Meilisearch capabilities at your fingertips
- š Dynamic Connections - Switch between Meilisearch instances on the fly
- š” stdio Transport - Currently uses stdio; native Meilisearch MCP support coming soon!
⨠Key Features
- š Index & Document Management - Create, update, and manage search indices
- š Smart Search - Search across single or multiple indices with advanced filtering
- āļø Settings Configuration - Fine-tune search relevancy and performance
- š Task Monitoring - Track indexing progress and system operations
- š API Key Management - Secure access control
- š„ Health Monitoring - Keep tabs on your Meilisearch instance
- š Python Implementation - TypeScript version also available
š Quick Start
Get up and running in just 3 steps!
1ļøā£ Install the package
# Using pip
pip install meilisearch-mcp
# Or using uvx (recommended)
uvx -n meilisearch-mcp
2ļøā£ Configure Claude Desktop
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"meilisearch": {
"command": "uvx",
"args": ["-n", "meilisearch-mcp"]
}
}
}
3ļøā£ Start Meilisearch
# Using Docker (recommended)
docker run -d -p 7700:7700 getmeili/meilisearch:v1.6
# Or using Homebrew
brew install meilisearch
meilisearch
That's it! Now you can ask your AI assistant to search and manage your Meilisearch data! š
š Examples
š¬ Talk to your AI assistant naturally:
You: "Create a new index called 'products' with 'id' as the primary key"
AI: I'll create that index for you... ā Index 'products' created successfully!
You: "Add some products to the index"
AI: I'll add those products... ā Added 5 documents to 'products' index
You: "Search for products under $50 with 'electronics' in the category"
AI: I'll search for those products... Found 12 matching products!
š Advanced Search Example:
You: "Search across all my indices for 'machine learning' and sort by date"
AI: Searching across all indices... Found 47 results from 3 indices:
- 'blog_posts': 23 articles about ML
- 'documentation': 15 technical guides
- 'tutorials': 9 hands-on tutorials
š§ Installation
Prerequisites
- Python ā„ 3.9
- Running Meilisearch instance
- MCP-compatible client (Claude Desktop, OpenAI agents, etc.)
From PyPI
pip install meilisearch-mcp
From Source (for development)
# Clone repository
git clone https://github.com/meilisearch/meilisearch-mcp.git
cd meilisearch-mcp
# Create virtual environment and install
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
Using Docker
Perfect for containerized environments like n8n workflows!
From Docker Hub
# Pull the latest image
docker pull getmeili/meilisearch-mcp:latest
# Or a specific version
docker pull getmeili/meilisearch-mcp:0.5.0
# Run the container
docker run -it \
-e MEILI_HTTP_ADDR=http://your-meilisearch:7700 \
-e MEILI_MASTER_KEY=your-master-key \
getmeili/meilisearch-mcp:latest
Build from Source
# Build your own image
docker build -t meilisearch-mcp .
docker run -it \
-e MEILI_HTTP_ADDR=http://your-meilisearch:7700 \
-e MEILI_MASTER_KEY=your-master-key \
meilisearch-mcp
Integration with n8n
For n8n workflows, you can use the Docker image directly in your setup:
meilisearch-mcp:
image: getmeili/meilisearch-mcp:latest
environment:
- MEILI_HTTP_ADDR=http://meilisearch:7700
- MEILI_MASTER_KEY=masterKey
š ļø What Can You Do?
š Connection Management - View current connection settings - Switch between Meilisearch instances dynamically - Update API keys on the fly
š Index Operations - Create new indices with custom primary keys - List all indices with stats - Delete indices and their data - Get detailed index metrics
š Document Management - Add or update documents - Retrieve documents with pagination - Bulk import data
š Search Capabilities - Search with filters, sorting, and facets - Multi-index search - Semantic search with vectors - Hybrid search (keyword + semantic)
āļø Settings & Configuration - Configure ranking rules - Set up faceting and filtering - Manage searchable attributes - Customize typo tolerance
š Security - Create and manage API keys - Set granular permissions - Monitor key usage
š Monitoring & Health - Health checks - System statistics - Task monitoring - Version information
š Environment Variables
Configure default connection settings:
MEILI_HTTP_ADDR=http://localhost:7700 # Default Meilisearch URL
MEILI_MASTER_KEY=your_master_key # Optional: Default API key
š» Development
Setting Up Development Environment
-
Start Meilisearch:
docker run -d -p 7700:7700 getmeili/meilisearch:v1.6
-
Install Development Dependencies:
uv pip install -r requirements-dev.txt
-
Run Tests:
python -m pytest tests/ -v
-
Format Code:
black src/ tests/
Testing with MCP Inspector
npx @modelcontextprotocol/inspector python -m src.meilisearch_mcp
š¤ Community & Support
We'd love to hear from you! Here's how to get help and connect:
- š¬ Join our Discord - Chat with the community
- š Report Issues - Found a bug? Let us know!
- š” Feature Requests - Have an idea? We're listening!
- š Meilisearch Docs - Learn more about Meilisearch
š¤ Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Write tests for your changes
- Make your changes and run tests
- Format your code with
black
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Pull Request
See our Contributing Guidelines for more details.
š¦ Release Process
This project uses automated versioning and publishing. When the version in pyproject.toml
changes on the main
branch, the package is automatically published to PyPI.
See the Release Process section for detailed instructions.
š License
This project is licensed under the MIT License - see the LICENSE file for details.
Meilisearch is an open-source search engine that offers a delightful search experience.
Learn more about Meilisearch at meilisearch.com