mcp-rag-search

mcp-rag-search

Enables agent tools like Claude Code and GitHub Copilot to perform knowledge retrieval using hybrid search (BM25 + dense) with reranking, via MCP protocol.

Category
Visit Server

README

MCP RAG 知识检索服务系统

面向 Claude Code、GitHub Copilot 等 Agent 工具的知识检索基础设施。基于 MCP 协议提供可插拔、可评测的知识服务。

快速开始

pip install -r requirements.txt

# 爬取文档
python main.py crawl

# 分块 + 构建索引
python main.py chunk
python main.py build

# 启动搜索 Demo
python main.py demo

# 启动 MCP 服务(供外部 Agent 调用)
python app/mcp_server.py

架构

用户查询 → BM25召回 + Dense召回 → RRF融合 → Reranker精排 → Top-K结果

技术栈

  • 检索: BM25 + BGE-Small Embedding + Milvus Lite
  • 融合: Reciprocal Rank Fusion (RRF)
  • 精排: BGE-Reranker (LoRA 微调)
  • 协议: MCP 2.0 (stdio / SSE)
  • 后端: FastAPI + Streamlit

消融实验结果

策略 MRR@10 延迟
BM25 only 0.91 64ms
Dense only 0.93 398ms
Hybrid (BM25+Dense+RRF) 0.91 ★ 57ms
Hybrid + Reranker 0.73 4948ms

项目结构

├── src/
│   ├── crawler/       # 文档爬虫
│   ├── indexing/      # 分块 + BM25 + Milvus
│   ├── retrieval/     # RRF融合 + Reranker
│   ├── eval/          # 消融实验 + 评测指标
│   └── finetune/      # LoRA微调
├── app/
│   ├── api.py         # FastAPI 接口
│   ├── demo.py        # Streamlit Demo
│   └── mcp_server.py  # MCP 知识服务
└── data/
    └── eval/          # 评测集

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured