Meilisearch MCP Server
使 AI 助手能够通过模型上下文协议与 Meilisearch 交互,从而通过标准化接口实现全面的索引、文档和搜索管理。
Tools
list-indexes
List all indexes in the Meilisearch instance
get-index
Get information about a specific Meilisearch index
create-index
Create a new Meilisearch index
update-index
Update a Meilisearch index (currently only supports updating the primary key)
delete-index
Delete a Meilisearch index
swap-indexes
Swap two or more indexes in Meilisearch
get-documents
Get documents from a Meilisearch index
get-document
Get a document by its ID from a Meilisearch index
add-documents
Add documents to a Meilisearch index
update-documents
Update documents in a Meilisearch index
delete-documents
Delete multiple documents by their IDs from a Meilisearch index
delete-document
Delete a document by its ID from a Meilisearch index
delete-all-documents
Delete all documents in a Meilisearch index
search
Search for documents in a Meilisearch index
multi-search
Perform multiple searches in one request
facet-search
Search for facet values matching specific criteria
get-settings
Get all settings for a Meilisearch index
update-settings
Update settings for a Meilisearch index
reset-settings
Reset all settings for a Meilisearch index to their default values
get-searchable-attributes
Get the searchable attributes setting
get-displayed-attributes
Get the displayed attributes setting
get-filterable-attributes
Get the filterable attributes setting
get-sortable-attributes
Get the sortable attributes setting
get-ranking-rules
Get the ranking rules setting
get-stop-words
Get the stop words setting
get-synonyms
Get the synonyms setting
get-distinct-attribute
Get the distinct attribute setting
get-typo-tolerance
Get the typo tolerance setting
get-faceting
Get the faceting setting
get-pagination
Get the pagination setting
update-searchable-attributes
Update the searchable attributes setting
update-displayed-attributes
Update the displayed attributes setting
update-filterable-attributes
Update the filterable attributes setting
update-sortable-attributes
Update the sortable attributes setting
update-ranking-rules
Update the ranking rules setting
update-stop-words
Update the stop words setting
update-synonyms
Update the synonyms setting
update-distinct-attribute
Update the distinct attribute setting
update-typo-tolerance
Update the typo tolerance setting
update-faceting
Update the faceting setting
update-pagination
Update the pagination setting
reset-searchable-attributes
Reset the searchable attributes setting to its default value
reset-displayed-attributes
Reset the displayed attributes setting to its default value
reset-filterable-attributes
Reset the filterable attributes setting to its default value
reset-sortable-attributes
Reset the sortable attributes setting to its default value
reset-distinct-attribute
Reset the distinct attribute setting to its default value
reset-typo-tolerance
Reset the typo tolerance setting to its default value
reset-faceting
Reset the faceting setting to its default value
reset-ranking-rules
Reset the ranking rules setting to its default value
reset-stop-words
Reset the stop words setting to its default value
reset-synonyms
Reset the synonyms setting to its default value
reset-pagination
Reset the pagination setting to its default value
enable-vector-search
Enable the vector search experimental feature in Meilisearch
get-experimental-features
Get the status of experimental features in Meilisearch
update-embedders
Configure embedders for vector search
get-embedders
Get the embedders configuration for an index
reset-embedders
Reset the embedders configuration for an index
vector-search
Perform a vector search in a Meilisearch index
health
Check if the Meilisearch server is healthy
version
Get the version information of the Meilisearch server
info
Get the system information of the Meilisearch server
stats
Get statistics about all indexes or a specific index
get-tasks
Get information about tasks with optional filtering
delete-tasks
Delete tasks based on provided filters
list-tasks
List tasks with optional filtering
get-task
Get information about a specific task
cancel-tasks
Cancel tasks based on provided filters
wait-for-task
Wait for a specific task to complete
README
Meilisearch MCP 服务器
一个用于 Meilisearch 的模型上下文协议 (MCP) 服务器实现,使 AI 助手能够通过标准化接口与 Meilisearch 交互。
功能
- 索引管理: 创建、更新和删除索引
- 文档管理: 添加、更新和删除文档
- 搜索功能: 使用各种参数和过滤器执行搜索
- 设置管理: 配置索引设置
- 任务管理: 监控和管理异步任务
- 系统操作: 健康检查、版本信息和统计信息
- 向量搜索: 实验性向量搜索功能
安装
通过 Smithery 安装
要通过 Smithery 为 Claude Desktop 自动安装 Meilisearch MCP 服务器:
npx -y @smithery/cli install @devlimelabs/meilisearch-ts-mcp --client claude
手动安装
-
克隆存储库:
git clone https://github.com/devlimelabs/meilisearch-ts-mcp.git cd meilisearch-ts-mcp -
安装依赖项:
npm install -
基于示例创建一个
.env文件:cp .env.example .env -
编辑
.env文件以配置您的 Meilisearch 连接。
Docker 设置
Meilisearch MCP 服务器可以在 Docker 容器中运行,以便于部署和隔离。
使用 Docker Compose
开始使用 Docker 的最简单方法是使用 Docker Compose:
# 启动 Meilisearch MCP 服务器
docker-compose up -d
# 查看日志
docker-compose logs -f
# 停止服务器
docker-compose down
手动构建和运行 Docker 镜像
您也可以手动构建和运行 Docker 镜像:
# 构建 Docker 镜像
docker build -t meilisearch-ts-mcp .
# 运行容器
docker run -p 3000:3000 --env-file .env meilisearch-ts-mcp
开发设置
对于想要为 Meilisearch MCP 服务器做出贡献的开发人员,我们提供了一个方便的设置脚本:
# 克隆存储库
git clone https://github.com/devlimelabs-ts-mcp/meilisearch-ts-mcp.git
cd meilisearch-ts-mcp
# 运行开发设置脚本
./scripts/setup-dev.sh
设置脚本将:
- 如果
.env文件不存在,则从.env.example创建一个 - 安装依赖项
- 构建项目
- 运行测试以确保一切正常
运行设置脚本后,您可以在开发模式下启动服务器:
npm run dev
用法
构建项目
npm run build
运行服务器
npm start
开发模式
npm run dev
Claude Desktop 集成
Meilisearch MCP 服务器可以与 Claude for Desktop 集成,允许您直接通过 Claude 与您的 Meilisearch 实例交互。
自动设置
我们提供了一个设置脚本,可以自动配置 Claude for Desktop 以与 Meilisearch MCP 服务器一起使用:
# 首先构建项目
npm run build
# 然后运行设置脚本
node scripts/claude-desktop-setup.js
该脚本将:
- 检测您的操作系统并找到 Claude for Desktop 配置文件
- 从
.env文件中读取您的 Meilisearch 配置 - 为 Claude for Desktop 生成必要的配置
- 提供更新 Claude for Desktop 配置的说明
手动设置
如果您更喜欢手动配置 Claude for Desktop:
-
找到您的 Claude for Desktop 配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
添加以下配置(根据需要调整路径):
{
"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"
}
}
}
}
-
重新启动 Claude for Desktop 以应用更改。
-
在 Claude 中,键入:“I want to use the Meilisearch MCP server”以激活集成。
Cursor 集成
Meilisearch MCP 服务器也可以与 Cursor 集成,Cursor 是一款 AI 驱动的代码编辑器。
在 Cursor 中设置 MCP
-
安装并设置 Meilisearch MCP 服务器:
git clone https://github.com/devlimelabs/meilisearch-ts-mcp.git cd meilisearch-ts-mcp npm install npm run build -
启动 MCP 服务器:
npm start -
在 Cursor 中,打开命令面板 (Cmd/Ctrl+Shift+P) 并搜索 "MCP: Connect to MCP Server"。
-
选择 "Connect to a local MCP server" 并输入以下详细信息:
- 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
-
单击 "Connect" 以建立连接。
-
现在,您可以通过键入诸如 "Search my Meilisearch index for documents about..." 之类的命令,通过 Cursor 与您的 Meilisearch 实例进行交互。
可用工具
Meilisearch MCP 服务器提供以下工具:
索引工具
create-index: 创建新索引get-index: 获取有关索引的信息list-indexes: 列出所有索引update-index: 更新索引delete-index: 删除索引
文档工具
add-documents: 将文档添加到索引get-document: 按 ID 获取文档get-documents: 获取多个文档update-documents: 更新文档delete-document: 按 ID 删除文档delete-documents: 删除多个文档delete-all-documents: 删除索引中的所有文档
搜索工具
search: 搜索文档multi-search: 在单个请求中执行多个搜索
设置工具
get-settings: 获取索引设置update-settings: 更新索引设置reset-settings: 将索引设置重置为默认值- 各种特定设置工具(同义词、停用词、排名规则等)
任务工具
list-tasks: 列出任务,可选择过滤get-task: 获取有关特定任务的信息cancel-tasks: 根据提供的过滤器取消任务wait-for-task: 等待特定任务完成
系统工具
health: 检查 Meilisearch 服务器的健康状态version: 获取版本信息info: 获取系统信息stats: 获取有关索引的统计信息
向量工具 (实验性)
enable-vector-search: 启用向量搜索get-experimental-features: 获取实验性功能状态update-embedders: 配置嵌入器get-embedders: 获取嵌入器配置reset-embedders: 重置嵌入器配置vector-search: 执行向量搜索
许可证
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。