By meilisearchCreated 2 months ago
starstarstarstarstar

Interact and query with Meilisearch full-text & semantic-search API.

Visit Project
Share this MCP:
X (Formerly Twitter)RedditblueskyThreads by Instagram

Category

Official MCP Server

Tags

MeilisearchSearch ApiLlm IntegrationFull Text Search

Image 1: Meilisearch

Meilisearch MCP Server

Meilisearch | Meilisearch Cloud | Documentation | Discord

Image 2: PyPI version Image 3: Python Versions Image 4: Tests Image 5: License Image 6: Downloads

⚔ 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

  1. Start Meilisearch:

    docker run -d -p 7700:7700 getmeili/meilisearch:v1.6
    
  2. Install Development Dependencies:

    uv pip install -r requirements-dev.txt
    
  3. Run Tests:

    python -m pytest tests/ -v
    
  4. 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:

šŸ¤— Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for your changes
  4. Make your changes and run tests
  5. Format your code with black
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to your branch (git push origin feature/amazing-feature)
  8. 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