Back to MCP Catalog

Meilisearch MCP Server

SearchPython
Interact with Meilisearch search engine through LLM interfaces
Available Tools

get-connection-settings

View current Meilisearch connection URL and API key status

update-connection-settings

Update URL and/or API key to connect to a different instance

urlapi_key

create-index

Create a new index with optional primary key

uidprimaryKey

list-indexes

List all available indexes

get-index-metrics

Get detailed metrics for a specific index

indexUid

get-documents

Retrieve documents from an index with pagination

indexUidlimitoffset

add-documents

Add or update documents in an index

indexUiddocuments

search

Flexible search across single or multiple indices with filtering and sorting options

queryindexUidlimitoffsetfiltersort

get-settings

View current settings for an index

indexUid

update-settings

Update index settings (ranking, faceting, etc.)

indexUidsettings

get-keys

List all API keys

create-key

Create new API key with specific permissions

descriptionactionsindexesexpiresAt

delete-key

Delete an existing API key

keyOrUid

get-task

Get information about a specific task

taskUid

get-tasks

List tasks with optional filters

limitfromreversebatchUidsuidscanceledBytypesstatusesindexUidsafterEnqueuedAtbeforeEnqueuedAtafterStartedAtbeforeStartedAtafterFinishedAtbeforeFinishedAt

cancel-tasks

Cancel pending or enqueued tasks

uidsstatusestypesindexUids

delete-tasks

Delete completed tasks

uidsstatusestypesindexUids

health-check

Basic health check

get-health-status

Comprehensive health status

get-version

Get Meilisearch version information

get-stats

Get database statistics

get-system-info

Get system-level information

Meilisearch MCP provides a comprehensive interface for managing and querying Meilisearch instances directly through LLM interfaces like Claude. It enables full control over index and document management, settings configuration, and search operations without leaving your AI assistant. With this MCP, you can create and manage indices, add and retrieve documents, perform complex searches with filtering and sorting, and monitor system health. The dynamic connection configuration allows you to switch between different Meilisearch instances at runtime, making it flexible for various development and production environments.

Overview

Meilisearch MCP allows you to interact with Meilisearch, a powerful open-source search engine, directly through LLM interfaces. This integration enables you to manage your search infrastructure, perform queries, and handle administrative tasks without switching contexts.

Installation

Prerequisites

  • Python 3.9 or higher
  • A running Meilisearch instance
  • Node.js (for testing with MCP Inspector)

Installation Steps

  1. Install the package using pip:
pip install meilisearch-mcp
  1. Configure your environment variables (optional):
MEILI_HTTP_ADDR=http://localhost:7700  # Default Meilisearch URL
MEILI_MASTER_KEY=your_master_key       # Optional: Default Meilisearch API key

Usage

Running the Server

Start the MCP server by running:

python -m meilisearch_mcp

Or with uvx:

uvx -n meilisearch-mcp

Connecting to Meilisearch

The MCP server automatically connects to the Meilisearch instance specified in your environment variables. You can view or update these connection settings at runtime using the provided tools:

  • Use get-connection-settings to view current connection details
  • Use update-connection-settings to change the URL or API key

Working with Indices

You can create, list, and manage indices:

  1. Create a new index:
Use the create-index tool with an indexUid and optional primaryKey
  1. List all available indices:
Use the list-indexes tool to see all indices in your Meilisearch instance
  1. Get detailed metrics for a specific index:
Use get-index-metrics with an indexUid to see statistics about the index

Document Management

Add and retrieve documents from your indices:

  1. Add documents:
Use add-documents with indexUid and documents (JSON array) parameters
  1. Retrieve documents:
Use get-documents with indexUid and optional pagination parameters

Searching

The search functionality is flexible and powerful:

  1. Search in a specific index:
Use search with query and indexUid parameters
  1. Search across all indices:
Use search with just the query parameter
  1. Advanced search with filtering and sorting:
Add filter, sort, limit, and offset parameters to refine your search

Settings Management

Configure how your search engine behaves:

  1. View current settings:
Use get-settings with an indexUid parameter
  1. Update settings:
Use update-settings with indexUid and the settings you want to change

Task and System Monitoring

Monitor the status of operations and system health:

  1. Track tasks:
Use get-tasks with optional filters to see the status of operations
  1. Check system health:
Use health-check or get-health-status to verify your Meilisearch instance is running properly

Troubleshooting

If you encounter connection issues:

  1. Verify your Meilisearch instance is running
  2. Check that the URL and API key are correct using get-connection-settings
  3. Update connection settings if needed using update-connection-settings

For task failures:

  1. Use get-task to check the detailed status of a specific task
  2. Review error messages for clues about what went wrong

Related MCPs

SearXNG
SearchTypeScript

Web search capabilities through SearXNG API integration

Hacker News
SearchPython

Access and search Hacker News content programmatically

Web Search
SearchJavaScript

Free Google search integration with no API keys required

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.