Meilisearch MCP Server
Official美丽搜索 MCP 服务器
模型上下文协议 (MCP) 服务器,用于通过 Claude 等 LLM 接口与 Meilisearch 交互。
特征
索引和文档管理
设置配置和管理
任务监控和API密钥管理
内置日志记录和监控工具
用于在 Meilisearch 实例之间切换的动态连接配置
跨单个或多个索引的智能搜索
这是一个 Python 实现,如果您需要在浏览器中使用 Meilisearch MCP 服务器,则有 Typescript 集成
Related MCP server: Perplexity MCP Server
安装
# 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 .要求
Python ≥ 3.9
运行美丽搜索实例
Node.js(用于使用 MCP Inspector 进行测试)
用法
环境变量
MEILI_HTTP_ADDR=http://localhost:7700 # Default Meilisearch URL
MEILI_MASTER_KEY=your_master_key # Optional: Default Meilisearch API key动态连接配置
服务器提供了在运行时查看和更新连接设置的工具:
get-connection-settings:查看当前连接 URL 和 API 密钥状态update-connection-settings:更新 URL 和/或 API 密钥以连接到不同的 Meilisearch 实例
通过 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:使用可选参数搜索 Meilisearch 索引
通过 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"]
}
}可用的搜索参数:
query:搜索查询(必需)indexUid:要搜索的特定索引(可选)limit:每个索引的最大结果数(可选,默认值:20)offset:要跳过的结果数(可选,默认值:0)filter:过滤表达式(可选)sort:排序规则(可选)
运行服务器
python -m src.meilisearch_mcp与 Claude Desktop 一起使用
要将其与 Claude Desktop 一起使用,请将以下内容添加到您的claude_desktop_config.json中:
{
"mcpServers": {
"meilisearch": {
"command": "uvx",
"args": ["-n", "meilisearch-mcp"]
}
}
}使用 MCP Inspector 进行测试
npx @modelcontextprotocol/inspector python -m src.meilisearch_mcp可用工具
连接管理
get-connection-settings:查看当前 Meilisearch 连接 URL 和 API 密钥状态update-connection-settings:更新 URL 和/或 API 密钥以连接到其他实例
指数管理
create-index:使用可选主键创建新索引list-indexes:列出所有可用索引get-index-metrics:获取特定索引的详细指标
文档操作
get-documents:从索引中分页检索文档add-documents:添加或更新索引中的文档
搜索
search:使用过滤和排序选项跨单个或多个索引进行灵活搜索
设置管理
get-settings:查看索引的当前设置update-settings:更新索引设置(排名、分面等)
API 密钥管理
get-keys:列出所有 API 密钥create-key:创建具有特定权限的新 API 密钥delete-key:删除现有的 API 密钥
任务管理
get-task:获取有关特定任务的信息get-tasks:使用可选过滤器列出任务:limit:返回的最大任务数from:要跳过的任务数reverse:对任务进行排序batchUids:按批次 UID 过滤uids:按任务 UID 过滤canceledBy:按取消来源过滤types:按任务类型过滤statuses:按任务状态过滤indexUids:按索引 UID 过滤afterEnqueuedAt/beforeEnqueuedAt:按入队时间过滤afterStartedAt/beforeStartedAt:按开始时间过滤afterFinishedAt/beforeFinishedAt:按完成时间过滤
cancel-tasks:取消待处理或排队的任务delete-tasks:删除已完成的任务
系统监控
health-check:基本健康检查get-health-status:综合健康状况get-version:获取 Meilisearch 版本信息get-stats:获取数据库统计信息get-system-info:获取系统级信息
贡献
Fork 存储库
创建功能分支
提交更改
创建拉取请求
执照
麻省理工学院
Available Tools
22 toolsadd-documentsC
Add documents to an index
Inputs: documents (required), indexUid (required), primaryKey.
cancel-tasksC
Cancel tasks based on filters
Inputs: indexUids, statuses, types, uids.
create-indexC
Create a new Meilisearch index
Inputs: uid (required), primaryKey.
create-keyC
Create a new API key
Inputs: actions (required), indexes (required), description, expiresAt.
delete-indexC
Delete a Meilisearch index
Inputs: uid (required).
delete-keyC
Delete an API key
Inputs: key (required).
get-connection-settingsB
Get current Meilisearch connection settings
Inputs: no named parameters.
get-documentsC
Get documents from an index
Inputs: indexUid (required), limit, offset.
get-health-statusB
Get comprehensive health status of Meilisearch
Inputs: no named parameters.
get-index-metricsC
Get detailed metrics for an index
Inputs: indexUid (required).
get-keysC
Get list of API keys
Inputs: limit, offset.
get-settingsC
Get current settings for an index
Inputs: indexUid (required).
get-statsC
Get database statistics
Inputs: no named parameters.
get-system-infoC
Get system-level information
Inputs: no named parameters.
get-taskC
Get information about a specific task
Inputs: taskUid (required).
get-tasksC
Get list of tasks with optional filters
Inputs: afterEnqueuedAt, afterFinishedAt, afterStartedAt, batchUids, +11 more.
get-versionB
Get Meilisearch version information
Inputs: no named parameters.
health-checkB
Check Meilisearch server health
Inputs: no named parameters.
list-indexesB
List all Meilisearch indexes
Inputs: no named parameters.
searchB
Search through Meilisearch indices. If indexUid is not provided, it will search across all indices.
Inputs: query (required), filter, indexUid, limit, +2 more.
update-connection-settingsC
Update Meilisearch connection settings
Inputs: api_key, url.
update-settingsC
Update settings for an index
Inputs: indexUid (required), settings (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools have distinct purposes targeting specific resources like indexes, documents, tasks, keys, or settings, with clear boundaries. However, get-health-status and health-check could cause confusion as they both relate to health monitoring, though their descriptions differ slightly (comprehensive vs. basic check).
Tool names follow a consistent verb-noun pattern with hyphens throughout, such as create-index, get-documents, and update-settings. There are no deviations in style or convention, making the set predictable and easy to parse.
With 22 tools, the count is on the higher side but reasonable for a comprehensive Meilisearch server covering indexes, documents, tasks, keys, settings, and system info. It feels slightly heavy but not excessive, as each tool serves a specific function in the domain.
The tool set provides complete CRUD/lifecycle coverage for Meilisearch operations, including index management (create, delete, list), document handling (add, get, search), task monitoring (get, cancel), key management (create, delete, get), and settings (get, update). No obvious gaps are present for the server's purpose.
Maintenance
Related MCP Connectors
An MCP server for search and retrieval over a local LanceDB database
Unified 15-tool SEO, SERP, clean Markdown & GEO (LLM citation Share-of-Voice) MCP server.
MCP server for searching Airweave collections with natural language queries.
Related MCP Servers
- AlicenseAqualityFmaintenanceServer for interacting with Honeycomb observability data. This server enables LLMs like Claude to directly analyze and query your Honeycomb datasets.142 npm42MIT
- AlicenseBqualityDmaintenanceA server facilitating web search functionality by utilizing Perplexity AI's API, designed to integrate with the Claude desktop client for enhanced search queries.1310MIT
- AlicenseNot gradedqualityDmaintenanceA simple server that integrates with Claude to allow querying and manipulating Notion pages and databases through natural language prompts.5,456 npmMIT
- AlicenseNot gradedqualityDmaintenanceA lightweight Flask-based server that enables Claude AI to perform real-time web searches via DuckDuckGo during conversations, allowing the AI to access current information.1MIT