mcpField
M
mcp-oi-wiki

mcp-oi-wiki

github.com/shwstoneOther24Updated 76w ago

About mcp-oi-wiki

mcp-oi-wiki is an MCP server that provides OI-Wiki knowledge to large language models using semantic vector search. It embeds summaries of 462 OI-Wiki pages as vectors for fast querying of competitive programming content.

Key features

  1. 01Semantic vector database of 462 OI-Wiki pages
  2. 02Efficient semantic vector search
  3. 03Returns relevant wiki markdown content
  4. 04Supports custom database generation

Use cases

  1. 01Query competitive programming and OI algorithm knowledge
  2. 02Retrieve algorithm and data structure documentation
  3. 03Enhance large language models with competitive programming expertise
  4. 04Build AI applications based on specialized knowledge bases

MCP support

mcp-oi-wiki serves as an MCP server, providing OI-Wiki knowledge resources to clients through semantic search of its vector database, enabling large language models to query competitive programming content.

Details

From the project README

MseeP.ai Security Assessment Badge Verified on MseeP

mcp-oi-wiki

让大模型拥有 OI-Wiki 的加成!

乘法逆元搜索结果

How does it work?

使用 Deepseek-V3 对 OI-wiki 当前的 462 个页面做摘要,将摘要嵌入为语义向量,建立向量数据库。

查询时,找到数据库中最接近的向量,返回对应的 wiki markdown。

Usage

确保你拥有 uv。

首先,下载本仓库:

cd <path of MCP servers>
git clone --recurse-submodules https://github.com/ShwStone/mcp-oi-wiki.git

然后打开你的 MCP 配置文件(mcpo 或 claude):

{
  "mcpServers": {
    "oi-wiki": {
      "command": "uv",
      "args": [
        "--directory",
        "<path of MCP servers>/mcp-oi-wiki",
        "run",
        "python",
        "main.py"
      ]
    }
  }
}

Update

可以生成自己的 db/oi-wiki.db。

将 Silicon flow API key 放在 api.key 文件中。

然后运行:

uv run script/request.py

在批量推理页面下载摘要结果到 result.jsonl。

最后运行:

uv run script/gendb.py

生成新的 db/oi-wiki.db。

Thanks

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.