通过利用OI-Wiki内容的向量搜索,增强大型语言模型的竞争编程知识,使模型能够检索相关的算法和技术。
331 查看 · 2026-07-07 更新
简介
通过利用OI-Wiki内容的向量搜索,增强大型语言模型的竞争编程知识,使模型能够检索相关的算法和技术。
简介
通过利用OI-Wiki内容的向量搜索,增强大型语言模型的竞争编程知识,使模型能够检索相关的算法和技术。
mcp-oi-wiki
Empower large models with the OI-Wiki boost!

How does it work?
We use Deepseek-V3 to generate summaries of the current 462 pages on OI-wiki, embed these summaries as semantic vectors, and establish a vector database.
During queries, the closest vector in the database is found, and the corresponding wiki markdown is returned.
Usage
Ensure you have uv.
First, download this repository:
cd
Then, open your MCP configuration file (mcpo or claude):
json
{
"mcpServers": {
"oi-wiki": {
"command": "uv",
"args": [
"--directory",
"
Update
You can generate your own db/oi-wiki.db.
Place your Silicon flow API key in the api.key file.
Then run:
sh uv run script/request.py
Download the summary results to result.jsonl from the batch inference page.
Finally, run:
sh uv run script/gendb.py
This will generate a new db/oi-wiki.db.
Thanks
- milvus-io/milvus-lite: A lightweight version of Milvus for the vector database
- OI-wiki/OI-wiki: :star2: Wiki of OI / ICPC for everyone. (A comprehensive online guide for a popular game, featuring cool arithmetic magic) for OI-wiki
- qdrant/fastembed: Fast, Accurate, Lightweight Python library to make State of the Art Embedding for CPU-based vector embedding
工具列表
- search: nOI Wiki 致力于成为一个免费开放且持续更新的编程竞赛知识整合站点,大家可以在这里获取与竞赛相关的、有趣又实用的知识。本工具能够在 OI-wiki 中搜索相关的知识点。nnquery 应该比较详细,与要实现的算法/目标相关。比如:“求一个图的最小生成树”,“维护区间加/区间求和”nn@ param query 描述要实现的需求n
服务配置
[{'mcpServers': {'oi-wiki': {'args': ['--directory', '<path of MCP servers>/mcp-oi-wiki', 'run', 'python', 'main.py'], 'command': 'uv'}}}]
来源
- 来源:github
- 链接:https://github.com/ShwStone/mcp-oi-wiki