这是一个与 Typesense(https://github.com/modelcontextprotocol/python-sdk)(MCP)协议接口的 MCP 服务器,能为相关操作提供支持。
brew install uv
git clone git@github.com:avarant/typesense-mcp-server.git ~/typesense-mcp-server
.cursor/mcp.json 以在 Cursor 中使用:{
"mcpServers": {
"typesense": {
"command": "uv",
"args": ["--directory", "~/typesense-mcp-server", "run", "mcp", "run", "main.py"],
"env": {
"TYPESENSE_HOST": "",
"TYPESENSE_PORT": "",
"TYPESENSE_PROTOCOL": "",
"TYPESENSE_API_KEY": ""
}
}
}
}
Typesense MCP Server 提供了丰富的工具,涵盖服务器管理、集合管理、文档操作和搜索功能等方面,具体如下:
check_typesense_health:检查配置的 Typesense 服务器的健康状态。list_collections:获取 Typesense 服务器中所有集合的列表。describe_collection:获取特定集合的架构和元数据。export_collection:导出特定集合中的所有文档。create_collection:使用提供的架构创建新集合。delete_collection:删除特定集合。truncate_collection:通过删除所有文档但保留架构来截断集合。create_document:在特定集合中创建单个新文档。upsert_document:上插入(创建或更新)特定集合中的单个文档。index_multiple_documents:批量插入(创建、上插入或更新)多个文档。delete_document:根据其 ID 从特定集合中删除单个文档。import_documents_from_csv:从 CSV 数据导入文档到集合。search:在特定集合上执行关键字搜索。vector_search:在特定集合上执行向量相似性搜索。