A high-performance Go implementation of the Model Context Protocol (MCP) for Meilisearch. This server enables AI tooling (desktop & cloud) to connect with your Meilisearch data using the MCP standard over HTTP or stdio.
- Features
- Quick Start
- Available Tools
- Docker
- Configuration Examples
- Supported Clients
- Security Notes
- Resources
- Contributing
- License
- Full-featured Meilisearch integration: Supports the complete Meilisearch API for search, indexing, and management.
- MCP over HTTP and stdio: Flexible transport for local and remote use, with HTTP supporting multiple clients and multi-instance connections.
- Secure by design: Built-in support for API keys, recommended TLS via reverse proxy, and security best practices for header forwarding and rate limiting.
- Streaming JSON: Efficient newline-delimited streaming for requests and responses.
- Configurable: Easily connect to any Meilisearch instance and manage API keys per client.
- Multi-client, multi-instance support: HTTP transport allows multiple clients to connect simultaneously, each with their own Meilisearch instance and API key.
- Remote MCP server available: Use the public MCP endpoint at https://meilisearch.javad.dev for remote access and testing.
- Open Source: MIT licensed.
You can use the public MCP server at:
https://meilisearch.javad.dev/mcp
Example configuration for mcp-remote:
{
"command": "npx",
"args": ["-y","mcp-remote@latest","https://meilisearch.javad.dev/mcp", "--header","X-Meili-Instance: ${MEILISEARCH_INSTANCE}", "--header","X-Meili-APIKey: ${MEILISEARCH_API_KEY}"],
"env": {"MEILISEARCH_INSTANCE": "http://localhost:7700", "MEILISEARCH_API_KEY": "masterKey"},
"active": true
}Download the latest binary from the releases page and extract it:
wget https://github.com/ja7ad/meilisearch-mcp/releases/latest/download/mcp
chmod +x mcp- Go 1.20+ (for building from source)
- Meilisearch instance (local or remote)
git clone https://github.com/ja7ad/meilisearch-mcp.git
cd meilisearch-mcp
make build./build/meilisearch-mcp serve http --addr :8080 --meili-host http://localhost:7700 --meili-api-key masterKey./build/meilisearch-mcp serve stdio --meili-host http://localhost:7700 --meili-api-key masterKeyA concise reference of all MCP tools exposed by this server. Each tool returns JSON text (raw Meilisearch API response or task object). Errors are returned via MCP error tool results.
| Tool | Description |
|---|---|
create_index |
Create a new index (optionally with a primary key) |
update_index |
Update an primary key of index in Meilisearch |
delete_index |
Delete an existing index |
get_index |
Retrieve a single index definition |
list_indexes |
List indexes (paginated) |
swap_index |
Swap pairs of indexes atomically |
list_keys |
List API keys (paginated) |
get_key |
Get a single API key (by key or UID) |
create_key |
Create a new API key with actions & index scope |
get_task |
Get status of an asynchronous task |
When using HTTP transport, include these headers per request to target different Meilisearch instances dynamically:
- X-Meili-Instance: http://host:7700 (required on HTTP transport)
- X-Meili-APIKey: (optional if instance allows anonymous access)
Stdio transport uses the CLI flags/ENV (--meili-host, --meili-api-key) and does not require headers.
Pagination defaults: limit=20, offset=0 when omitted or <=0.
docker build -t meilisearch-mcp:latest .docker run --rm -p 8080:8080 \
-e MEILI_HOST=http://host.docker.internal:7700 \
-e MEILI_API_KEY=masterKey \
meilisearch-mcp:latest- MEILI_HOST (default: http://localhost:7700)
- MEILI_API_KEY (optional)
- MCP_ADDR (default: :8080)
- MCP_POOL_SIZE (default: 100)
- MCP_POOL_DURATION (default: 5m)
- MCP_RATE_LIMIT_RPS (default: 300)
- MCP_DEBUG (1 to enable --debug)
services:
mcp:
image: meilisearch-mcp:latest
build: .
environment:
MEILI_HOST: http://meili:7700
MEILI_API_KEY: ${MEILI_API_KEY:-masterKey}
MCP_RATE_LIMIT_RPS: 200
ports:
- "8080:8080"
depends_on:
- meili
meili:
image: getmeili/meilisearch:latest
environment:
MEILI_MASTER_KEY: masterKey
ports:
- "7700:7700"{
"command": "npx",
"args": ["-y","mcp-remote@latest","https://meilisearch.javad.dev/mcp", "--header","X-Meili-Instance: ${MEILISEARCH_INSTANCE}", "--header","X-Meili-APIKey: ${MEILISEARCH_API_KEY}"],
"env": {"MEILISEARCH_INSTANCE": "http://localhost:7700", "MEILISEARCH_API_KEY": "masterKey"},
"active": true
}{
"command": "/usr/bin/meilisearch-mcp",
"args": ["serve", "stdio","--meili-host","http://localhost:7700","--meili-api-key","masterKey"],
"env": {},
"active": false
}Flip
activeflags to select transport. Prefer stdio locally; HTTP for remote/container usage.
- Jan (desktop) – native MCP provider config
- Claude Desktop – tool integration (future MCP support)
- Cursor / VS Code (Continue) – configure remote/stdio MCP backend
- Zed / JetBrains (plugins) – emerging MCP adopters
- Custom – use
mcp-remoteCLI or direct HTTP POST
- Place behind TLS (reverse proxy) when exposed publicly
- Forward required auth headers only; strip unknown ones
- Enforce payload size limits & rate limiting at the proxy
Contributions welcome! See CONTRIBUTING.md for setup, commit message conventions (feat:, fix:, chore:, test:, ci: etc.), and required PR title prefixes ([Feat], [Fix], [Chore], [Refactor], etc.).
MIT
