Meilisearch MCP server

Integrates with Meilisearch to enable advanced search operations, index and document management, and customizable search functionality with features like faceted search and custom ranking.
Back to servers
Setup instructions
Provider
Devlime Labs
Release date
Feb 26, 2025
Language
TypeScript
Stats
8 stars

This Model Context Protocol (MCP) server for Meilisearch enables AI assistants to interact with Meilisearch databases through a standardized interface. It provides full functionality for managing indexes, documents, search operations, and system administration while supporting both regular and vector search capabilities.

Installation Options

Quick Installation via Smithery

For the fastest setup with Claude Desktop:

npx -y @smithery/cli install @devlimelabs/meilisearch-ts-mcp --client claude

Manual Installation

If you prefer to install manually:

  1. Clone the repository:

    git clone https://github.com/devlimelabs/meilisearch-ts-mcp.git
    cd meilisearch-ts-mcp
    
  2. Install dependencies:

    npm install
    
  3. Create and configure environment variables:

    cp .env.example .env
    
  4. Edit the .env file with your Meilisearch connection details.

Docker Deployment

Using Docker Compose

The simplest way to deploy with Docker:

# Start the server
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the server
docker-compose down

Manual Docker Build

You can also build and run the Docker image yourself:

# Build the image
docker build -t meilisearch-ts-mcp .

# Run the container
docker run -p 3000:3000 --env-file .env meilisearch-ts-mcp

Running the Server

After installation, you can run the server using:

# Standard mode
npm start

# Development mode with auto-reloading
npm run dev

# Build the project first if needed
npm run build

AI Platform Integrations

Claude Desktop Integration

Automated Setup

After building the project, you can automatically configure Claude:

# Build the project
npm run build

# Run the setup script
node scripts/claude-desktop-setup.js

Manual Claude Setup

  1. Locate your Claude Desktop config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add this configuration (adjust paths accordingly):

{
  "mcpServers": {
    "meilisearch": {
      "command": "node",
      "args": ["/path/to/meilisearch-ts-mcp/dist/index.js"],
      "env": {
        "MEILISEARCH_HOST": "http://localhost:7700",
        "MEILISEARCH_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Restart Claude Desktop.

  2. Type "I want to use the Meilisearch MCP server" to activate.

Cursor Integration

To use with Cursor code editor:

  1. Start the MCP server:

    npm start
    
  2. In Cursor, open Command Palette (Cmd/Ctrl+Shift+P) and search for "MCP: Connect to MCP Server".

  3. Select "Connect to a local MCP server" with these details:

    • Name: Meilisearch
    • Command: node
    • Arguments: /absolute/path/to/meilisearch-ts-mcp/dist/index.js
    • Environment Variables:
      MEILISEARCH_HOST=http://localhost:7700
      MEILISEARCH_API_KEY=your-api-key
      
  4. Click "Connect" and start interacting with prompts like "Search my Meilisearch index for..."

Available Tools

Index Management

  • Create, get, list, update and delete indexes

Document Management

  • Add, retrieve, update and delete documents
  • Bulk operations support

Search Operations

  • Standard search with filters and parameters
  • Multi-search capabilities
  • Vector search (experimental)

Settings Management

  • View and configure index settings
  • Manage synonyms, stop words, and ranking rules

Task Management

  • List, monitor and cancel asynchronous tasks
  • Wait for task completion

System Operations

  • Health checks
  • Version and system information
  • Statistics

Vector Search Capabilities

The server includes experimental support for vector search:

  • Enable/disable vector search
  • Configure and manage embedders
  • Perform vector similarity searches

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "meilisearch" '{"command":"node","args":["/path/to/meilisearch-ts-mcp/dist/index.js"],"env":{"MEILISEARCH_HOST":"http://localhost:7700","MEILISEARCH_API_KEY":"your-api-key"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "meilisearch": {
            "command": "node",
            "args": [
                "/path/to/meilisearch-ts-mcp/dist/index.js"
            ],
            "env": {
                "MEILISEARCH_HOST": "http://localhost:7700",
                "MEILISEARCH_API_KEY": "your-api-key"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "meilisearch": {
            "command": "node",
            "args": [
                "/path/to/meilisearch-ts-mcp/dist/index.js"
            ],
            "env": {
                "MEILISEARCH_HOST": "http://localhost:7700",
                "MEILISEARCH_API_KEY": "your-api-key"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later