具有 Qdrant Persistence 的 MCP 内存服务器
该 MCP 服务器提供了由 Qdrant 矢量数据库支持的具有语义搜索功能的知识图谱实现。
特征
基于图的知识表示,包括实体和关系
基于文件的持久性(memory.json)
使用 Qdrant 矢量数据库进行语义搜索
OpenAI 语义相似性嵌入
HTTPS 支持与反向代理兼容
Docker 支持,轻松部署
环境变量
需要以下环境变量:
设置
本地设置
安装依赖项:
构建服务器:
Docker 设置
构建 Docker 镜像:
使用所需的环境变量运行 Docker 容器:
添加到 MCP 设置:
工具
实体管理
create_entities:创建多个新实体create_relations:创建实体之间的关系add_observations:向实体添加观察结果delete_entities:删除实体及其关系delete_observations:删除特定观察结果delete_relations:删除特定关系read_graph:获取完整的知识图谱
语义搜索
search_similar:搜索语义相似的实体和关系interface SearchParams { query: string; // Search query text limit?: number; // Max results (default: 10) }
实现细节
服务器维护两种形式的持久性:
基于文件(memory.json):
完整的知识图谱结构
快速访问完整图表
用于图形操作
Qdrant 向量数据库:
实体和关系的语义嵌入
启用相似性搜索
自动与文件存储同步
同步
当实体或关系被修改时:
更改写入memory.json
使用 OpenAI 生成嵌入
向量存储在 Qdrant 中
两个存储系统保持一致
搜索过程
搜索时:
查询文本转换为嵌入
Qdrant 执行相似性搜索
结果包括实体和关系
结果按语义相似度排序
示例用法
HTTPS 和反向代理配置
服务器支持通过 HTTPS 和反向代理连接到 Qdrant。此功能在以下情况下尤其有用:
在 Nginx 或 Apache 等反向代理后面运行 Qdrant
使用自签名证书
需要自定义 SSL/TLS 配置
设置反向代理
配置您的反向代理(使用 Nginx 的示例):
更新您的环境变量:
安全注意事项
服务器通过以下方式实现强大的 HTTPS 处理:
自定义 SSL/TLS 配置
适当的证书验证选项
连接池和保持活动
使用指数退避算法自动重试
可配置超时
HTTPS 连接故障排除
如果您遇到连接问题:
验证您的证书:
测试直接连接:
检查任何代理设置:
贡献
分叉存储库
创建功能分支
进行更改
提交拉取请求
执照
麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
使用 Qdrant 通过语义搜索促进知识图谱表示,支持 OpenAI 嵌入语义相似性以及基于文件的图形持久性的强大 HTTPS 集成。
Related Resources
Related MCP Servers
- -security-license-qualityProvides RAG capabilities for semantic document search using Qdrant vector database and Ollama/OpenAI embeddings, allowing users to add, search, list, and delete documentation with metadata support.Last updated -416Apache 2.0
- -security-license-qualityThis server enables semantic search capabilities using Qdrant vector database and OpenAI embeddings, allowing users to query collections, list available collections, and view collection information.Last updated -6
- -security-license-qualityEnables querying a hybrid system that combines Neo4j graph database and Qdrant vector database for powerful semantic and graph-based document retrieval through the Model Context Protocol.Last updated -45MIT License
- -security-license-qualityA FastAPI-based application that enables document embedding and semantic retrieval using Qdrant vector database, allowing users to convert documents into embeddings and retrieve relevant content through natural language queries.Last updated -