Meilisearch MCP server

Integrates Meilisearch's search capabilities for fast, typo-tolerant indexing and querying of documents in AI-powered applications.
Back to servers
Provider
Meilisearch
Release date
Dec 23, 2024
Language
Python
Stats
101 stars

Meilisearch MCP Server is a protocol server that connects any Model Context Protocol (MCP) compatible client (including Claude, OpenAI assistants, and other LLMs) to Meilisearch. This allows AI assistants to manage search indices, perform searches, and handle data through natural language conversation without having to learn Meilisearch's API.

Installation

Prerequisites

  • Python ≥ 3.9
  • Running Meilisearch instance
  • MCP-compatible client (Claude Desktop, OpenAI agents, etc.)

Using pip

pip install meilisearch-mcp

Using uvx (recommended)

uvx -n meilisearch-mcp

Using Docker

# Pull the latest image
docker pull getmeili/meilisearch-mcp:latest

# 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

Setup

Start Meilisearch

Start a Meilisearch instance if you don't have one running:

# Using Docker (recommended)
docker run -d -p 7700:7700 getmeili/meilisearch:v1.6

# Or using Homebrew
brew install meilisearch
meilisearch

Configure Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "meilisearch": {
      "command": "uvx",
      "args": ["-n", "meilisearch-mcp"]
    }
  }
}

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

Usage Examples

Basic Interaction with your AI Assistant

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

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

Available Capabilities

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

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

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later