M

MCP深网搜索

@Feustey/MCP
1 Stars 533 次浏览 Feustey 更新于 2026-08-23

连接到游标,并通过 Linkup 和 RAG 功能使用 LlamaIndex 实现深层网络搜索。

该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

MCP - 基于RAG的问答系统

MCP是一个先进的问答系统,它使用RAG(Retrieval-Augmented Generation)技术来基于文档语料库提供准确且上下文相关的回答。

功能特点

  • 🔍 文档中的语义搜索
  • 💾 使用Redis进行智能缓存
  • 📊 通过MongoDB实现持久化存储
  • 🤖 与OpenAI集成以支持嵌入和文本生成
  • 📈 系统监控及指标
  • 🔄 异步操作管理

先决条件

  • Python 3.9+
  • MongoDB 社区版
  • Redis
  • OpenAI API密钥

安装

  1. 克隆仓库:
git clone https://github.com/votre-username/mcp.git
cd mcp
  1. 安装系统依赖项:
# MongoDB
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community

# Redis
brew install redis
brew services start redis
  1. 配置Python环境:
python -m venv .venv
source .venv/bin/activate  # Sur Unix/macOS
pip install -r requirements.txt
  1. 设置环境变量:
cp .env.example .env
# Éditer .env avec vos configurations

快速使用

from src.rag import RAGWorkflow

# Initialisation
rag = RAGWorkflow()

# Ingestion de documents
await rag.ingest_documents("chemin/vers/documents")

# Interrogation
response = await rag.query("Votre question ici ?")

文档

测试

python -m pytest tests/ -v

项目结构

mcp/
├── src/
│   ├── __init__.py
│   ├── rag.py              # Workflow RAG principal
│   ├── models.py           # Modèles de données
│   ├── mongo_operations.py # Opérations MongoDB
│   ├── redis_operations.py # Opérations Redis
│   └── database.py         # Configuration de la base de données
├── tests/
│   ├── __init__.py
│   ├── test_mcp.py
│   └── test_mongo_integration.py
├── prompts/
│   ├── system_prompt.txt
│   ├── query_prompt.txt
│   └── response_prompt.txt
├── docs/
│   ├── installation.md
│   ├── usage.md
│   ├── architecture.md
│   └── api.md
├── requirements.txt
├── .env.example
└── README.md

贡献方式

  1. Fork此项目
  2. 为你的功能创建一个新的分支 (git checkout -b feature/AmazingFeature)
  3. 提交你的更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开一个Pull Request

许可证

本项目采用MIT许可证。详情请见LICENSE文件。

联系方式

您的姓名 - @您的Twitter账号

项目链接: https://github.com/您的用户名/mcp

相关 MCP 服务