# Meilisearch MCP

> Meilisearch MCP lets you automate your entire search engine lifecycle. Connect it to any AI client and manage everything from creating indexes and updating documents in bulk, to running complex searches across thousands of records. You control the data flow without ever touching a dashboard.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** search-engine, indexing, full-text-search, meilisearch, api-management

## Description

Need to keep your search database fresh? This MCP connects your Meilisearch instance directly to your agent. Instead of logging into a dedicated dashboard or writing boilerplate scripts just to check if your data is indexed, you tell your AI client what needs doing. You can list all existing indexes and manage their settings, running tasks like atomic swaps for zero-downtime updates. Want to clean up old data? Your agent handles complex deletion operations, whether it’s removing a single document by ID or filtering out entire batches of records based on specific criteria. The ability to pull metadata details helps you monitor the engine's health in real time. It’s powerful management for developers and content teams alike, letting you perform heavy data engineering tasks right where your AI client is working, making it one of the most critical tools available in the Vinkius catalog.

## Tools

### add_documents
Adds or replaces one or more documents within a specified index.

### cancel_tasks
Stops any pending background tasks that haven't finished processing.

### chat_completion
Requests conversational text generation from a specific workspace.

### configure_experimental_features
Turns experimental search features on or off for better control.

### create_dump
Starts the process of creating a full data dump of the index content.

### create_index
Builds and initializes an entirely new search index from scratch.

### create_key
Generates a brand new API key for secure access to the system.

### create_snapshot
Triggers the creation of an immediate, point-in-time backup of the index data.

### delete_all_documents
Wipes out every single document currently stored in a given index.

### delete_document
Removes one specific document when you know its unique ID.

### delete_documents_batch
Deletes multiple documents simultaneously by providing a list of IDs.

### delete_documents_by_filter
Cleans up data by removing all documents that match complex search criteria.

### delete_dynamic_search_rule
Removes a specific, customized rule used to enhance search functionality.

### delete_index
Completely removes an entire index and all its associated data.

### delete_key
Deletes a specific API key, revoking its access permissions.

### delete_tasks
Cleans up records of tasks that have already completed processing.

### get_batch
Retrieves detailed status information for a specific data batch job.

### get_document
Fetches the full details of one document using its unique ID.

### get_health
Checks and reports the overall operational status of the entire Meilisearch instance.

### get_index_stats
Retrieves detailed performance statistics for one specific index.

### get_index
Gets all the metadata and configuration details for a specified index.

### get_key
Retrieves the full details and status of an existing API key.

### get_settings
Fetches all current configuration settings used by a particular index.

### get_stats
Returns global statistics, including data size and metrics for every index.

### get_task
Retrieves the current status and details of a specific background processing task.

### get_version
Checks which version of the Meilisearch instance is currently running.

### list_batches
Retrieves a list of all data processing batches that have run or are pending.

### list_chats
Lists the names and IDs of existing chat workspaces configured in the system.

### list_documents
Fetches a list of document metadata from an index without retrieving full content.

### list_dynamic_search_rules
Lists all custom rules that modify how search queries are processed for an index.

### list_experimental_features
Shows the status (enabled or disabled) of various experimental features available in Meilisearch.

### list_indexes
Provides a list of every index currently managed by the system.

### list_keys
Displays all API keys associated with this Meilisearch instance.

### list_tasks
Gets a comprehensive list of background tasks that are currently running or waiting to run.

### multi_search
Executes several distinct search queries in one single, efficient API call.

### reset_settings
Resets all configuration settings for a given index back to their factory defaults.

### search_documents
Performs a standard text search across the content of documents within an index.

### set_dynamic_search_rule
Creates or updates a custom rule to modify how certain data fields are searched.

### similar_documents
Finds other documents whose content is highly related to the text of a specified document ID.

### swap_indexes
Swaps multiple indexes at once, ensuring the switch happens instantly and without downtime.

### update_documents
Makes partial updates to documents, changing only specific fields instead of replacing the whole record.

### update_index
Changes the primary key used by an index, allowing you to migrate data identifiers safely.

### update_key
Modifies the name or description of an existing API key for better tracking.

### update_settings
Changes specific operational settings, such as pagination limits or indexing rules, for a given index.

## Prompt Examples

**Prompt:** 
```
List all my Meilisearch indexes and their primary keys.
```

**Response:** 
```
I've retrieved your indexes. You have 3 active indexes: 'movies' (primary key: 'id'), 'books' (primary key: 'isbn'), and 'products' (primary key: 'sku').
```

**Prompt:** 
```
Add these three product documents to the 'products' index: [JSON data].
```

**Response:** 
```
I've initiated the document addition for the 'products' index. The task has been enqueued with UID 452. You can check the status to confirm when the indexing is complete.
```

**Prompt:** 
```
Get the document with ID 'prod_99' from the 'products' index, but only show the 'name' and 'price' fields.
```

**Response:** 
```
Here is the requested document from 'products': { "name": "Wireless Headphones", "price": 99.99 }.
```

## Capabilities

### Index Management
You can list all indexes and create new ones, or swap multiple indexes atomically for zero-downtime deployments.

### Document Data Operations
Add, update, or replace large batches of documents, or get the details for a single document by its ID.

### Advanced Deletion and Cleanup
Remove data using granular methods, such as deleting all records in an index, removing specific matching groups, or cleaning up old tasks.

### Complex Search Queries
Run powerful searches against your content, including multi-query operations and finding documents similar to a starting ID.

## Use Cases

### Refreshing a Product Catalog
A content manager needs to update the product search results after adding 500 new items. They ask their agent, 'Add these 500 JSON documents to the 'products' index.' The agent uses `add_documents`, handling the entire batch upload and queueing process instantly.

### Debugging Search Failures
A developer finds that search results are missing fields. They prompt their agent, asking it to 'Get the metadata for the 'movies' index.' The agent uses `get_index` and reports back exactly what settings need changing.

### Migrating Search Versions
A data engineer finishes a major content update. Instead of manually reconfiguring the live system, they prompt their agent to 'Swap indexes from v2_staging to v2_live.' The agent executes `swap_indexes` atomically.

### Finding Related Content
A user searches for a specific article. To guide them better, the agent uses `similar_documents`, finding and listing three related articles that are contextually close to the original search term.

## Benefits

- Avoid manual UI clicks. Instead of navigating dashboards to create a new index, your agent runs the `create_index` tool directly when prompted.
- Eliminate downtime risks. Use the `swap_indexes` function to transition between versions instantly, ensuring zero disruption to live users.
- Handle massive data cleanup. Don't manually delete records; use `delete_documents_by_filter` to remove large groups of outdated content based on complex criteria.
- Speed up development cycles. Need to test search results? Use the `multi_search` tool to run several queries in one call, saving API overhead.
- Maintain data integrity. You can use `get_index_stats` and `get_settings` to verify that your index is configured exactly right before deploying changes.

## How It Works

The bottom line is you get to manage mission-critical search infrastructure using natural language prompts through your preferred AI client.

1. Subscribe to this MCP and provide your Meilisearch Instance URL along with an API Key.
2. Your AI client authenticates and connects the credentials, making the search engine available as a toolset.
3. You prompt your agent (e.g., 'Find all documents in the 'products' index that were modified last week') and it executes the complex data retrieval.

## Frequently Asked Questions

**How do I check if my Meilisearch index is working correctly using Meilisearch MCP?**
Run the `get_health` tool. This immediately checks the overall operational status of your entire search engine instance, telling you if everything is green or if something needs attention.

**Can I update my documents without losing the old data? Meilisearch MCP?**
Yes, use `update_documents`. This tool performs partial updates, meaning it only changes specific fields on existing records instead of replacing the whole document.

**What's the difference between deleting documents and listing them with Meilisearch MCP?**
Listing (`list_documents`) just shows you what's there. Deleting involves actually removing data, which can be done individually with `delete_document` or by filtering.

**How do I handle a major search version update safely? Meilisearch MCP?**
The safest way is to use `swap_indexes`. This tool allows you to transition between two versions of your index atomically, ensuring zero downtime for users.

**Does Meilisearch MCP support running multiple searches at once?**
Yes. Use the `multi_search` tool to combine several different search queries into a single call, which is much faster and more efficient than calling each one separately.