byrdocs-search-mcp

byrdocs-search-mcp

Enables AI clients to search BUPT byrdocs materials, past exam papers, and freshmen knowledge base via natural language.

Category
Visit Server

README

byrdocs-search-mcp

北邮 byrdocs 资料库与历年真题的检索服务,以 Model Context Protocol 形式暴露,部署于 Cloudflare Workers。支持 MCP 的 AI 客户端接入后,即可检索教材、试卷、课程资料,以及新生生存指南与真题 wiki。

数据来自 byrdocs 国内镜像及其开源内容仓库。本服务仅建立检索索引并返回必要摘录,不分发原文文件。

工具

工具 用途
search_documents 检索资料元信息(教材 / 试卷 / 课程资料),返回标题、课程、学年、文件类型、大小及下载链接
search_exam_questions 检索真题,按题 / 节返回题干、选项、答案、解析;answer_mode 控制答案暴露程度
answer_guide 检索生存指南,返回校园生活经验正文与出处,支持按校区 / 主题筛选
answer_knowledge 已弃用,仅作兼容保留,请改用上述工具

byrdocs 元数据不含上传时间;检索中的"学年"指试卷学年区间或教材出版年。查询关键词用于全文检索,筛选(类型、学年、阶段、学期等)请使用对应参数。

数据来源

快照 内容 来源
data/metadata.json 资料元信息(教材 / 试卷 / 课程资料) 镜像接口 byrdocs.cloudlay.cn/data/metadata.json
data/knowledge.json 真题按题 / 节切块,指南按节切块 GitHub:byrdocs/byrdocs-neowikibyrdocs/bupt-survival-guide
data/build-info.json 构建时间与源仓 commit 构建时生成

数据在构建时抓取并打包进 Worker,随部署一同发布。

架构

MCP 客户端 ──/mcp | /sse──▶ Cloudflare Worker(McpAgent / Durable Object)
                              首次请求:jieba-wasm 分词 + MiniSearch 建索引(内存,isolate 内复用)
                              数据:打包进 Worker 的 data/*.json
  • 无服务器,数据随代码部署,索引在运行时按需构建。
  • 中文分词使用 jieba-wasm(Workers 环境不支持原生实现)。
  • 包体 gzip 约 3.3 MB,需 Cloudflare Workers 付费方案(脚本上限 10 MB)。

快速开始

npm install
npm run dev          # 本地启动,默认 http://localhost:8787
npm run typecheck

部署:

npx wrangler login
npm run deploy

接入

Claude Desktop(claude_desktop_config.json,经 mcp-remote 桥接):

{
  "mcpServers": {
    "byrdocs-search": {
      "command": "npx",
      "args": ["mcp-remote", "https://<your-worker>.workers.dev/sse"]
    }
  }
}

Cursor 等支持 HTTP MCP 的客户端可直接填写 https://<your-worker>.workers.dev/mcp

鉴权(可选):设置环境变量 MCP_AUTH_TOKENwrangler secret 或 vars)后,/mcp/sse 需携带 Authorization: Bearer <token>/health/version 不受限。

端点

路径 说明
POST /mcp MCP Streamable HTTP
GET /sse MCP SSE
GET /health 健康检查,返回索引条数
GET /version 版本、构建时间、源仓 commit

数据更新

npm run build-data   # 重新抓取 metadata,并从 GitHub 源仓重建 knowledge
npm run deploy

需可访问 GitHub。build-data 会将源仓更新至最新并记录 commit 至 data/build-info.json

许可

检索逻辑源自 superdocs-agent。真题与指南内容版权归 byrdocs 及各源仓库(CC-BY-NC-SA 等)。本项目仅建立检索索引并返回必要摘录,不分发完整原文文件。

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