MM

meilisearch/meilisearch-mcp

开发工具
194 stars 0 forks 质量 99 趋势 99

Meilisearch | Meilisearch Cloud | Documentation | Discord

概览

Meilisearch | Meilisearch Cloud | Documentation | Discord

README

Meilisearch MCP Server

Meilisearch | Meilisearch Cloud | Documentation | Discord

⚡ Connect any LLM to Meilisearch and supercharge your AI with lightning-fast search capabilities! 🔍

🤔 What is this?

The Meilisearch MCP Server is a Model Context Protocol server that enables any MCP-compatible client (including Claude, OpenAI agents, and other LLMs) to interact with Meilisearch. This stdio-based server allows AI assistants to manage search indices, perform searches, and handle your data through natural conversation.

Why use this?

  • 🤖 Universal Compatibility - Works with any MCP client, not just Claude
  • 🗣️ Natural Language Control - Manage Meilisearch through conversation with any LLM
  • 🚀 Zero Learning Curve - No need to learn Meilisearch’s API
  • 🔧 Full Feature Access - All Meilisearch capabilities at your fingertips
  • 🔄 Dynamic Connections - Switch between Meilisearch instances on the fly
  • 📡 stdio Transport - Currently uses stdio; native Meilisearch MCP support coming soon!

✨ Key Features

  • 📊 Index & Document Management - Create, update, and manage search indices
  • 🔍 Smart Search - Search across single or multiple indices with advanced filtering
  • ⚙️ Settings Configuration - Fine-tune search relevancy and performance
  • 📈 Task Monitoring - Track indexing progress and system operations
  • 🔐 API Key Management - Secure access control
  • 🏥 Health Monitoring - Keep tabs on your Meilisearch instance
  • 🐍 Python Implementation - TypeScript version also available

🚀 Quick Start

Get up and running in just 3 steps!

1️⃣ Install the package

# Using pip
pip install meilisearch-mcp

# Or using uvx (recommended)
uvx -n meilisearch-mcp

2️⃣ Configure Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "meilisearch": {
      "command": "uvx",
      "args": ["-n", "meilisearch-mcp"]
    }
  }
}

3️⃣ Start Meilisearch

# Using Docker (recommended)
docker run -d -p 7700:7700 getmeili/meilisearch:v1.28

# Or using Homebrew
brew install meilisearch
meilisearch

That’s it! Now you can ask your AI assistant to search and manage your Meilisearch data! 🎉

📚 Examples

💬 Talk to your AI assistant naturally:

You: "Create a new index called 'products' with 'id' as the primary key"
AI: I'll create that index for you... ✓ Index 'products' created successfully!

You: "Add some products to the index"
AI: I'll add those products... ✓ Added 5 documents to 'products' index

You: "Search for products under $50 with 'electronics' in the category"
AI: I'll search for those products... Found 12 matching products!

🔍 Advanced Search Example:

You: "Search across all my indices for 'machine learning' and sort by date"
AI: Searching across all indices... Found 47 results from 3 indices:
- 'blog_posts': 23 articles about ML
- 'documentation': 15 technical guides
- 'tutorials': 9 hands-on tutorials

🔧 Installation

Prerequisites

  • Python ≥ 3.9
  • Running Meilisearch instance
  • MCP-compatible client (Claude Desktop, OpenAI agents, etc.)

From PyPI

pip install meilisearch-mcp

From Source (for development)

# Clone repository
git clone https://github.com/meilisearch/meilisearch-mcp.git
cd meilisearch-mcp

# Create virtual environment and install
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e .

Using Docker

Perfect for containerized environments like n8n workflows!

From Docker Hub

# Pull the latest image
docker pull getmeili/meilisearch-mcp:latest

# Or a specific version
docker pull getmeili/meilisearch-mcp:0.5.0

# Run the container
docker run -it \
  -e MEILI_HTTP_ADDR=http://your-meilisearch:7700 \
  -e MEILI_MASTER_KEY=your-master-key \
  getmeili/meilisearch-mcp:latest

Build from Source

# Build your own image
docker build -t meilisearch-mcp .
docker run -it \
  -e MEILI_HTTP_ADDR=http://your-meilisearch:7700 \
  -e MEILI_MASTER_KEY=your-master-key \
  meilisearch-mcp

Integration with n8n

For n8n workflows, you can use the Docker image directly in your setup:

meilisearch-mcp:
  image: getmeili/meilisearch-mcp:latest
  environment:
    - MEILI_HTTP_ADDR=http://meilisearch:7700
    - MEILI_MASTER_KEY=masterKey

🛠️ What Can You Do?

🌍 Environment Variables

Configure default connection settings:

MEILI_HTTP_ADDR=http://localhost:7700  # Default Meilisearch URL
MEILI_MASTER_KEY=your_master_key       # Optional: Default API key

💻 Development

Setting Up Development Environment

  1. Start Meilisearch:

    docker run -d -p 7700:7700 getmeili/meilisearch:v1.28
    
  2. Install Development Dependencies:

    uv pip install -r requirements-dev.txt
    
  3. Run Tests:

    python -m pytest tests/ -v
    
  4. Format Code:

    black src/ tests/
    

Testing with MCP Inspector

npx @modelcontextprotocol/inspector python -m src.meilisearch_mcp

🤝 Community & Support

We’d love to hear from you! Here’s how to get help and connect:

🤗 Contributing

We welcome contributions! Here’s how to get started:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for your changes
  4. Make your changes and run tests
  5. Format your code with black
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to your branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

See our Contributing Guidelines for more details.

📦 Release Process

This project uses automated versioning and publishing. When the version in pyproject.toml changes on the main branch, the package is automatically published to PyPI.

See the Release Process section for detailed instructions.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Meilisearch is an open-source search engine that offers a delightful search experience. Learn more about Meilisearch at meilisearch.com


View this README on GitHub

安装

uvx -n meilisearch-mcp

配置

{ "mcpServers": { "meilisearch": { "command": "uvx", "args": ["-n", "meilisearch-mcp"] } } }