MCP ExplorerExplorer

Meilisearch Lite Mcp

@upamuneon 10 months ago
3 MIT
FreeCommunity
AI Systems
A Docker container for Meilisearch with MCP integration for Markdown search.

Overview

What is Meilisearch Lite Mcp

meilisearch-lite-mcp is a single Docker container that integrates Meilisearch, a full-text and vector search engine, with the Model Context Protocol (MCP) server. It includes a built-in Japanese tokenizer called Lindera for enhanced search capabilities.

Use cases

Use cases include building a search engine for documentation sites, enhancing search functionality in content management systems, and integrating with applications that require fast and reliable text and vector search capabilities.

How to use

To use meilisearch-lite-mcp, you need to configure the Docker container with the appropriate environment variables such as DOCUMENT_DIRS for specifying directories containing Markdown files. You can launch the container using a command that includes these configurations.

Key features

Key features include support for Japanese and English Markdown search using the Lindera tokenizer, automatic indexing of up to three host-mounted directories of .md files at startup, and configurable startup behavior via environment variables.

Where to use

meilisearch-lite-mcp can be used in various fields that require efficient search capabilities, particularly in applications involving document management, content retrieval, and knowledge bases that utilize Markdown files.

Content

Meilisearch + MCP Server (Single‑Container)

This repository provides a single Docker container that bundles:

  1. Meilisearch (full‑text + vector search engine, with built‑in Japanese tokenizer Lindera).
  2. Meilisearch MCP server (meilisearch-mcp Python package) for Model Context Protocol integration.

Features

  • Japanese & English Markdown search using Lindera tokenizer.
  • Auto‑index up to three host‑mounted directories of .md files at container startup.
  • Configurable startup behavior via environment variables:
    • DOCUMENT_DIRS (comma‑separated host paths, e.g. /host/one,/host/two,/host/three)
    • CHECK_RETRIES (health‑check polling attempts, default: 30)
    • MEILI_MASTER_KEY (default: masterKey)

MCP Client Configuration Example

If you are using an MCP client that requires a configuration file (e.g., in JSON format) and supports launching the MCP server as a subprocess using Docker, here is an example of how you might configure it:

{
  "mcpServers": {
    "meilisearch-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DOCUMENT_DIRS",
        "-v",
        "/path/to/your/repo/example/spec:/app/example/spec",
        "-v",
        "/path/to/your/repo/example/guide:/app/example/guide",
        "ghcr.io/upamune/meilisearch-lite-mcp:latest"
      ],
      "env": {
        "DOCUMENT_DIRS": "/app/example/spec,/app/example/guide"
      }
    }
  }
}

This example shows how a client could potentially launch the Docker container as a subprocess. Replace /path/to/your/repo/example/spec and /path/to/your/repo/example/guide with the actual paths on your host machine. The exact configuration format may vary depending on the MCP client you are using.

Files

  • Dockerfile
    Single‑stage build: installs runtime deps, clones & installs meilisearch-mcp, downloads Meilisearch binary, and sets up entrypoint.

  • entrypoint.sh

    1. Launches Meilisearch in background.
    2. Polls /health until {"status":"available"}.
    3. Finds and indexes .md files in each DOCUMENT_DIRS path.
    4. Starts the MCP server.

Usage

Run the container using the image from GitHub Container Registry (GHCR):

docker run --pull always --rm \
  -e DOCUMENT_DIRS="/app/example/spec,/app/example/guide" \
  -e CHECK_RETRIES=30 \
  -v /path/to/your/repo/example/spec:/app/example/spec \
  -v /path/to/your/repo/example/guide:/app/example/guide \
  ghcr.io/upamune/meilisearch-lite-mcp:latest

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers