university_rules_mcp_server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@university_rules_mcp_serverWhat are the rules for changing majors?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
University Rules RAG MCP Agent
A Python project for learning RAG, Reranker, persistent indexing, DeepSeek API, and MCP from scratch. It uses the 中山大学 Undergraduate Academic Status Management Regulations as its knowledge base, retrieves relevant clauses, and generates answers with sources; the same retrieval capability can also be exposed as an MCP Tool for Agents to call.
This project is for technical learning. For real academic status matters, please refer to the university's latest official regulations and the academic affairs department's replies.
Features
Split the local regulation text by "Article X".
BGE Embedding semantic retrieval.
Hybrid Search combining keyword + semantics.
BGE Reranker reranks candidate clauses.
Store document vectors and clause metadata locally to avoid duplicate Document Embedding generation.
Use DeepSeek to generate source-cited answers based on the final clauses.
Expose the
search_university_rules(question)MCP Tool.
Related MCP server: byrdocs-search-mcp
Architecture
用户问题
↓
持久化向量索引
↓
Hybrid Search:Top 10 候选条款
↓
Reranker:Top 3 最相关条款
├─→ DeepSeek:生成带来源的自然语言回答
└─→ MCP Tool:将条款 JSON 返回给 AgentProject Structure
knowledge_base/ # 学习用管理规定文本
rag_search.py # 基础关键词检索
semantic_search.py # Embedding 语义检索
hybrid_search.py # 混合检索
rerank_search.py # Reranker 精排
index_store.py # 本地索引读写和有效性判断
final_rag_chat.py # 完整 RAG + DeepSeek 问答
university_rules_mcp_server.py # RAG MCP Server
test_*.py # 单元测试Installation
Python 3.10 or later is recommended:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtOn the first run of Embedding or Reranker, the models are downloaded to the local Hugging Face cache; subsequent runs reuse the cache directly.
Running
Basic search:
python rag_search.pyFull RAG Q&A version:
$env:DEEPSEEK_API_KEY="你的 DeepSeek API Key"
python final_rag_chat.pyThe flow of final_rag_chat.py:
本地索引 → Hybrid Top 10 → Reranker Top 3 → DeepSeek 回答Here, index/ is automatically generated on the first run and stores document vectors and metadata; this directory is Git-ignored because it can be rebuilt from the knowledge base.
MCP Server
Start the Server:
python university_rules_mcp_server.pyVerify with MCP Inspector:
npx @modelcontextprotocol/inspector python university_rules_mcp_server.pyCore search tool:
search_university_rules(question)The tool does not call DeepSeek; instead, it returns 3 sources after RAG retrieval and Reranker reranking, for the MCP Client or Agent to continue using.
Testing
python -m unittest discover -p "test_*.py" -vData and Security
The regulations in
knowledge_base/are kept as learning material for this project.Do not write API Keys into code, README, or
.envand then commit;.envis Git-ignored.index/is locally generated data and is Git-ignored.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search your knowledge bases from any AI assistant using hybrid RAG.
Search source collections your team vetted. Every passage cites its URL and fetch date.
Token-efficient search for coding agents over public and private documentation.
x402-gated web search gateway. Tools: search, search_enriched.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables hybrid search over policies using Reciprocal Rank Fusion and provides grounded, context-aware answers via a LangGraph agent with COSTAR prompting.4
- FlicenseNot gradedqualityBmaintenanceEnables AI clients to search BUPT byrdocs materials, past exam papers, and freshmen knowledge base via natural language.
- AlicenseNot gradedqualityBmaintenanceEnables hybrid document search (BM25 and dense) over a configurable corpus via MCP tools, returning passages and sources for AI agents to cite in answers.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to search Nokia product documentation with hybrid BM25+vector search and return section-precise deep-link citations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1551156271-coder/university-rules-rag-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server