Manticore Search MCP 服务器是一个模型上下文协议(MCP)服务器,它通过兼容 MCP 的客户端(如 Claude Code、Cursor 等 AI 开发工具)提供对 Manticore Search 功能的访问。
git clone https://github.com/krajcik/manticore-mcp-server.git
cd manticore-mcp-server
go build -o manticore-mcp-server
可以使用环境变量进行配置:
export MANTICORE_URL="http://localhost:9308"
export MAX_RESULTS_PER_QUERY="100"
export REQUEST_TIMEOUT="30s"
export DEBUG="false"
也可以使用命令行标志进行配置:
./manticore-mcp-server --manticore-url="http://localhost:9308" --max-results=100
将以下内容添加到您的 MCP 客户端配置中(例如,Claude Code 的 ~/.claude.json
):
{
"mcpServers": {
"manticore-search": {
"command": "/path/to/manticore-mcp-server",
"args": [],
"env": {
"MANTICORE_URL": "http://localhost:9308",
"MAX_RESULTS_PER_QUERY": "50"
}
}
}
}
MCP 协议会自动向客户端暴露以下工具:
在 Manticore 索引中进行全文搜索。 关键参数:
table
(必需):表名query
:搜索文本limit
:最大结果数highlight
:启用结果高亮显示bool_query
:复杂布尔查询列出可用的表/索引。
获取表结构信息。 参数:
table
(必需):表名向索引中插入文档。 参数:
table
(必需):表名document
(必需):文档数据显示集群健康状态。
所有工具都返回结构化的 JSON 数据:
{
"success": true,
"data": { /* 结果 */ },
"meta": {
"total": 42,
"count": 10,
"operation": "search"
}
}
MCP 客户端会通过协议自动发现可用的工具及其架构,无需手动配置。
curl http://localhost:9308
--debug
进行详细日志记录MAX_RESULTS_PER_QUERY
REQUEST_TIMEOUT
本项目采用 MIT 许可证。