Codeforces Mcp

io.github.avinash111921由 GitHub 账号 avinash111921 发布v0.1.0更新于 Oct 29, 2026

Codeforces MCP server for competitive programming, upsolving, and automated stress testing.

概览

AI 生成的概览

Codeforces MCP 服务器,让 AI 助手抓取题目、分析提交记录、推荐补题目标并在本地运行自动化压力测试。

可以做什么
  • 获取 Codeforces 用户的实时资料与统计:评分、排名和近期判题结果分布
  • 抓取完整题面与官方样例测试数据,可绕过 Cloudflare
  • 在本地编译并运行 C++ 或 Python 解法,对照官方样例输入
  • 执行自动化压力测试,用暴力脚本和随机生成器对比优化解法,定位最小失败用例
  • 通过排队与缓存控制请求,避免触发 Codeforces API 的频率限制
适用场景
适合希望让助手拉取 Codeforces 题目与样例、查看自己的提交历史、挑选补题目标,并用本地压力测试调试解法的竞赛编程者。
运行要求
作为本地进程运行,通过 uvx 启动 codeforces-mcp 这个 PyPI 包,需要 Python 工具链。未声明账号、API 密钥、环境变量或请求头。需要访问 Codeforces 的网络,编译运行解法还需本地 C++ 或 Python 环境。
安装前请注意
它会在你的机器上编译并执行代码,只应运行可信的解法。它通过绕过 Cloudflare 抓取 Codeforces 页面,可能失效或与站点条款冲突。对 Codeforces 的请求受频率限制并会被缓存。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Codeforces Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Codeforces MCP Server

A Model Context Protocol (MCP) server for Codeforces competitive programming. This server enables AI coding assistants (like Claude, Cursor, and Cline) to autonomously fetch problem statements, analyze your submission history, recommend upsolving targets, and run automated local stress tests.

Features

  • Profile & Stats: Fetch live user ratings, ranks, and recent verdict breakdowns.
  • Problem Scraping: Bypasses Cloudflare to extract full problem descriptions and exact sample test cases.
  • Local Sandbox: Compiles and executes C++ or Python solutions locally against official sample inputs.
  • Automated Stress Testing: Isolates minimal failing test cases by running your optimized code against a brute-force script and a random generator.
  • Rate-Limit Safe: Built-in queuing and caching ensures you never hit the Codeforces API 1-request-per-2-seconds limit.

Installation & Usage

You can run this server seamlessly using uvx without manual installation. Add the following configuration to your preferred AI IDE.

Cursor

Add this to your MCP configuration (Settings > Features > MCP):

json
{  "mcpServers": {    "codeforces-mcp": {      "command": "uvx",      "args": ["codeforces-mcp"]    }  }}

来源:README.md,提交 aa4f4ea

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 29, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。