MCP-Qdrant向量数据库服务器
一个机器控制协议(MCP)服务器,它能够实现从具有语义搜索功能的Qdrant向量数据库中存储和检索信息。
服务介绍
MCP Server for Qdrant
一个用于在Qdrant向量数据库中存储和检索信息的机器控制协议(MCP)服务器。
功能
- 在Qdrant中存储带有可选元数据的文本信息
- 存储信息的语义搜索
- FastEmbed集成用于文本嵌入
- 基于环境的配置
- Docker支持
安装
使用pip
pip install mcp-server-qdrant
从源代码安装
git clone https://github.com/your-org/mcp-server-qdrant.git
cd mcp-server-qdrant
make setup
配置
通过环境变量进行配置。你可以基于.env.example文件创建一个.env文件:
cp .env.example .env
编辑.env文件来配置服务器:
# Qdrant configuration
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=your-api-key
# Collection name
COLLECTION_NAME=memories
# Embedding provider configuration
EMBEDDING_PROVIDER=fastembed
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
使用方法
本地运行
python -m mcp_server_qdrant.main
或者使用make命令:
make run
Docker
docker-compose up
工具
MCP服务器提供了以下工具:
qdrant-store
在Qdrant数据库中存储信息。
information: The text to store
metadata: Optional JSON metadata to associate with the text
qdrant-find
使用语义搜索在Qdrant数据库中查找信息。
query: The search query
开发
测试
make test
格式化
make format
代码检查
make lint
构建
make build
许可证
Apache License 2.0