# Meilisearch MCP for AI Agents AI Agent Connect

> Meilisearch MCP lets you manage your search engine directly through your AI client. You can create indexes, push documents, handle bulk updates, and monitor system health without switching tabs. It is for anyone who needs to keep their search data in sync or debug index issues on the fly.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_zvxhlZ8xtjn1uMtmbqWfMxBRRJBkYtadvczmRQ3Q/ai-agent-connect
- **Tags:** search-engine, indexing, full-text-search, meilisearch, api-management

## Description

Managing a search engine usually involves jumping between a dashboard, a terminal, and your code. You have to keep track of index statuses, check if documents actually hit the right fields, and manually rotate keys or snapshots. This Connector changes that by putting the entire Meilisearch management suite into your AI client's reach. Instead of hunting for the right API call or navigating a UI to find a specific document ID, you just tell your agent what needs to happen. You can swap indexes for zero-downtime updates, clear out old data with complex filters, or grab a quick snapshot of your current state. It is about making the data layer feel like a natural extension of your workspace. By using this Connector through the Vinkius catalog, you get a direct line to your search infrastructure, letting you focus on building features rather than babysitting your index.

## Tools

### get_task
Get details of a specific task. This is how you check if a specific operation finished.

### update_key
Update an API key name or description. This helps keep your access management organized.

### create_dump
Trigger the creation of a Meilisearch dump. Use this for full backups or data migrations.

### similar_documents
Find documents similar to a given document ID. This is great for related items features.

### update_documents
Add or update documents with a partial update. This is useful for changing just a few fields in a large record.

### add_documents
Add or replace documents in an index. This lets you populate your search data quickly.

### cancel_tasks
Cancel pending or processing tasks. This is useful for stopping heavy operations.

### chat_completion
Request a chat completion from a workspace. Use this to interact with specific workspace chat features.

### configure_experimental_features
Enable or disable experimental features. This lets you test new capabilities without affecting production.

### create_index
Create a new index. This is the first step for setting up a new search category.

### create_key
Create a new API key. This helps you manage permissions for different applications.

### create_snapshot
Trigger the creation of a Meilisearch snapshot. Use this to save a point in time version of your data.

### delete_all_documents
Delete all documents in an index. Use this to completely reset an index.

### delete_document
Delete a single document. This is perfect for cleaning up individual entries.

### delete_documents_batch
Delete multiple documents by ID. This helps you clean up multiple items in one go.

### delete_documents_by_filter
Delete documents matching a filter. It is the best way to prune data based on specific criteria.

### delete_dynamic_search_rule
Delete a dynamic search rule. Use this to clean up how your search engine handles dynamic queries.

### delete_index
Delete an index. This removes all data and configuration for that specific category.

### delete_key
Delete an API key. Use this to revoke access when a service no longer needs it.

### delete_tasks
Delete finished tasks. This keeps your task history clean.

### get_batch
Get details of a specific batch. Use this to track the progress of large bulk operations.

### get_document
Get a specific document by ID. This lets you verify exactly what the search engine sees.

### get_health
Check the health of the Meilisearch instance. This is a quick way to see if your service is running well.

### get_index_stats
Get stats of a specific index. Use this to monitor your search engine load.

### get_index
Get metadata for a specific index. This shows you the primary keys and other core details.

### get_key
Get details of a specific API key. Use this to audit who or what has access to your data.

### get_settings
Get all settings of an index. This helps you see how your search engine is currently configured.

### get_stats
Get stats of all indexes and database size. Use this for general system monitoring.

### get_version
Get the version of the Meilisearch instance. Use this for troubleshooting version specific bugs.

### list_batches
List task batches. This gives you a bird's eye view of all ongoing bulk operations.

### list_chats
List chat workspaces. Use this to see the different chat environments in your instance.

### list_documents
List documents in an index. This is great for quickly scanning your available data.

### list_dynamic_search_rules
List dynamic search rules for an index. Use this to audit your search logic.

### list_experimental_features
List the status of experimental features. This helps you keep track of what is running in your dev environment.

### list_indexes
List all Meilisearch indexes. Use this to see your entire search catalog at a glance.

### list_keys
List API keys. This is useful for auditing access across your different services.

### list_tasks
List asynchronous tasks. Use this to see what operations are currently being processed.

### multi_search
Perform multiple search queries in a single call. This is more efficient than making multiple individual search calls.

### reset_settings
Reset all settings of an index to defaults. Use this if you need a clean slate.

### search_documents
Search for documents in an index. This is how you actually query your data.

### set_dynamic_search_rule
Create or update a dynamic search rule. This allows you to customize how search results are generated.

### swap_indexes
Swap multiple indexes atomically. This allows you to switch between old and new data with zero downtime.

### update_index
Update an index primary key. Use this when you need to change how your documents are uniquely identified.

### update_settings
Update settings of an index. Use this to tune your search behavior on the fly.

## Prompt Examples

**Prompt:** 
```
Check the health of my Meilisearch instance and give me the stats for the 'products' index.
```

**Response:** 
```
I've checked your Meilisearch instance. **Status: Healthy.** Here are the stats for the 'products' index:

| Metric | Value |
| :--- | :--- |
| Document Count | 14,502 |
| Average Latency | 12ms |
| Index Size | 450MB |
```

**Prompt:** 
```
Can you delete all documents in the 'old_catalog' index that were created before 2023?
```

**Response:** 
```
I've initiated the deletion of all documents in the 'old_catalog' index that match your filter criteria. I'll monitor the task for you and let you know once the operation is complete.
```

**Prompt:** 
```
Create a snapshot of my current search data so I can test some new settings.
```

**Response:** 
```
I've triggered a snapshot for your Meilisearch instance. You can find the snapshot details below:

**Snapshot ID: snap_99283**

You can now use this snapshot to test your configuration changes safely.
```

## Capabilities

### Create and delete indexes
Add new search categories or remove old ones from your instance instantly.

### Add or replace documents in bulk
Push thousands of records into your search engine in a single operation.

### Swap multiple indexes atomically
Switch between old and new data sets with zero downtime for your users.

### Filter and delete documents
Prune your search data using complex filter expressions to clean up specific records.

### Monitor health and stats
Check your instance status and index sizes to keep your search engine running smoothly.

### Manage API keys and settings
Control permissions and tune your search behavior without leaving your editor.

### Generate snapshots and dumps
Create point-in-time backups or full data dumps for migrations and testing.

## Use Cases

### Debugging search results
A developer notices a product is not appearing in results. They ask their agent to get_document to see if it is actually indexed and check its fields.

### Bulk data migration
A data engineer needs to move 10,000 items to a new index. They ask the agent to add_documents in a single operation to sync the data.

### Zero-downtime deployment
A team wants to update their search logic. They use swap_indexes to flip to the new index instantly without any user interruption.

### Content cleanup
A content manager wants to remove all expired items. They ask the agent to use delete_documents_by_filter with an expiration date filter.

### Health monitoring
An ops person wants to know if the system is stable. They ask the agent to get_health and get_stats for all indexes to monitor performance.

## Benefits

- Zero-downtime updates: Use swap_indexes to switch between data sets instantly without affecting your users.
- Faster debugging: Use get_document and get_index_stats to see exactly what is happening in your search engine without a dashboard.
- Bulk data management: Handle thousands of records at once with add_documents and delete_documents_batch for easier migrations.
- Precise data cleaning: Use delete_documents_by_filter to remove specific categories of data using complex logic.
- Easy backups: Create point-in-time snapshots with create_snapshot or full dumps with create_dump whenever you need them.
- Granular access control: Manage permissions and rotate credentials easily using create_key, list_keys, and delete_key.

## How It Works

The bottom line is you get a hands-on way to manage your search engine without leaving your dev environment.

1. Subscribe to the Connector and provide your Meilisearch Instance URL and API Key.
2. Connect the Connector to your preferred AI client like Claude, Cursor, or Windsurf.
3. Ask your agent to perform tasks like creating indexes, updating documents, or checking stats.

## Frequently Asked Questions

**Can I use the Meilisearch MCP to update my search data?**
Yes, you can use it to add, update, or replace documents in your index. This means you can keep your search results fresh by letting your AI agent push new data directly to Meilisearch.

**Does the Meilisearch MCP support bulk operations?**
It does. You can add or update multiple documents at once or delete them in batches, which is much faster than handling them one by one.

**How do I manage my API keys with Meilisearch MCP?**
You can create, list, and delete API keys directly through your AI client. This makes it easy to manage permissions and rotate your credentials for different parts of your app.

**Can I use Meilisearch MCP to move to a new index without downtime?**
Yes, the Connector includes a tool to swap multiple indexes atomically. This lets you switch to a new set of data instantly without your users noticing any interruption.

**Can the Meilisearch MCP help me debug my search engine?**
Definitely. You can use it to check the health of your instance, get detailed stats for specific indexes, and retrieve individual documents to see exactly how they are being indexed.

**Is it possible to back up my data using the Meilisearch MCP?**
You can trigger both snapshots and full dumps. This gives you a reliable way to create backups or move your data to a different environment whenever you need.

**Can I use Meilisearch MCP to manage experimental features?**
Yes, you can see which experimental features are active and toggle them on or off. This is great for testing new Meilisearch capabilities in a controlled way.

**Can I delete documents based on a specific condition or category?**
Yes! You can use the `delete_documents_by_filter` tool. Just provide the index UID and a filter expression (e.g., 'category = electronics') to remove all matching documents at once.

**How do I perform a zero-downtime index update?**
You can use the `swap_indexes` tool. This allows you to swap the names of two or more indexes atomically, ensuring your search remains active while you switch to a newly populated index.

**Is it possible to retrieve only specific fields from a document?**
Absolutely. When using `get_document` or `list_documents`, you can provide a comma-separated list of `fields` to return, reducing the payload size and focusing on the data you need.