Meilisearch
official
search
Interact & query with Meilisearch (Full-text & semantic search API)
Meilisearch MCP Server
A Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces like Claude.
<a href="https://glama.ai/mcp/servers/tbc3n51jja"><img width="380" height="200" src="https://glama.ai/mcp/servers/tbc3n51jja/badge" alt="Meilisearch Server MCP server" /></a>
Features
- Index and document management
- Settings configuration and management
- Task monitoring and API key management
- Built-in logging and monitoring tools
- Dynamic connection configuration to switch between Meilisearch instances
- Smart search across single or multiple indices
- This is a Python implementation, there is Typescript integration if you need to work with a Meilisearch MCP server within the browser
Installation
# Clone repository git clone <repository_url> cd meilisearch-mcp # Create virtual environment and install uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e .
Requirements
- Python ≥ 3.9
- Running Meilisearch instance
- Node.js (for testing with MCP Inspector)
Usage
Environment Variables
MEILI_HTTP_ADDR=http://localhost:7700 # Default Meilisearch URL MEILI_MASTER_KEY=your_master_key # Optional: Default Meilisearch API key
Dynamic Connection Configuration
The server provides tools to view and update connection settings at runtime:
: View current connection URL and API key statusget-connection-settings
: Update URL and/or API key to connect to a different Meilisearch instanceupdate-connection-settings
Example usage through MCP:
// Get current settings { "name": "get-connection-settings" } // Update connection settings { "name": "update-connection-settings", "arguments": { "url": "http://new-host:7700", "api_key": "new-api-key" } }
Search Functionality
The server provides a flexible search tool that can search across one or all indices:
: Search through Meilisearch indices with optional parameterssearch
Example usage through MCP:
// Search in a specific index { "name": "search", "arguments": { "query": "search term", "indexUid": "movies", "limit": 10 } } // Search across all indices { "name": "search", "arguments": { "query": "search term", "limit": 5, "sort": ["releaseDate:desc"] } }
Available search parameters:
: The search query (required)query
: Specific index to search in (optional)indexUid
: Maximum number of results per index (optional, default: 20)limit
: Number of results to skip (optional, default: 0)offset
: Filter expression (optional)filter
: Sorting rules (optional)sort
Running the Server
python -m src.meilisearch_mcp
Usage with Claude Desktop
To use this with Claude Desktop, add the following to your
claude_desktop_config.json
:{ "mcpServers": { "meilisearch": { "command": "uvx", "args": ["-n", "meilisearch-mcp"] } } }
Testing with MCP Inspector
npx @modelcontextprotocol/inspector python -m src.meilisearch_mcp
Available Tools
Connection Management
: View current Meilisearch connection URL and API key statusget-connection-settings
: Update URL and/or API key to connect to a different instanceupdate-connection-settings
Index Management
: Create a new index with optional primary keycreate-index
: List all available indexeslist-indexes
: Get detailed metrics for a specific indexget-index-metrics
Document Operations
: Retrieve documents from an index with paginationget-documents
: Add or update documents in an indexadd-documents
Search
: Flexible search across single or multiple indices with filtering and sorting optionssearch
Settings Management
: View current settings for an indexget-settings
: Update index settings (ranking, faceting, etc.)update-settings
API Key Management
: List all API keysget-keys
: Create new API key with specific permissionscreate-key
: Delete an existing API keydelete-key
Task Management
: Get information about a specific taskget-task
: List tasks with optional filters:get-tasks
: Maximum number of tasks to returnlimit
: Number of tasks to skipfrom
: Sort order of tasksreverse
: Filter by batch UIDsbatchUids
: Filter by task UIDsuids
: Filter by cancellation sourcecanceledBy
: Filter by task typestypes
: Filter by task statusesstatuses
: Filter by index UIDsindexUids
/afterEnqueuedAt
: Filter by enqueue timebeforeEnqueuedAt
/afterStartedAt
: Filter by start timebeforeStartedAt
/afterFinishedAt
: Filter by finish timebeforeFinishedAt
: Cancel pending or enqueued taskscancel-tasks
: Delete completed tasksdelete-tasks
System Monitoring
: Basic health checkhealth-check
: Comprehensive health statusget-health-status
: Get Meilisearch version informationget-version
: Get database statisticsget-stats
: Get system-level informationget-system-info
Contributing
- Fork repository
- Create feature branch
- Commit changes
- Create pull request
License
MIT
Related Servers
Aiven
official
Navigate your [Aiven projects](https://go.aiven.io/mcp-server) and interact with the PostgreSQL®, Apache Kafka®, ClickHouse® and OpenSearch® services
View DetailsApify
official
[Actors MCP Server](https://apify.com/apify/actors-mcp-server): Use 3,000+ pre-built cloud tools to extract data from websites, e-commerce, social media, search engines, maps, and more
View Details