Skip to main content

基于 Codeforces Polygon API 的 MCP 工具集

Project description

CF-Polygon-MCP

基于 Codeforces Polygon API 的 MCP 工具集,提供一系列工具函数用于管理 Polygon 平台上的题目。

功能特性

  • 获取题目列表,支持多种筛选条件
  • 创建新的空题目
  • 获取题目详细信息(时限、内存限制等)
  • 获取题目描述、题解、输入输出格式等
  • 获取和保存题目陈述资源、源文件、辅助文件
  • 获取和保存测试脚本、测试点、validator/checker 测试、测试组
  • 获取题目解决方案
  • 获取题目验证器、额外验证器、检查器、交互器,并支持设置验证器/检查器/交互器
  • 获取和保存题目标签、通用描述、通用题解
  • 获取历史包、下载包、构建包、提交工作副本
  • 提供出题流程辅助工具,包括 readiness 检查、打包等待和发布编排
  • 通过 Polygon 账号密码下载 problem package、problem.xml、contest.xml、statements.pdf
  • 获取比赛题目列表
  • 更新题目信息
  • 更新/丢弃工作副本
  • 更新题目描述

配置

向 mcp.json 中添加:

"cf-polygon-mcp": {
	"command": "uvx",
	"args": ["cf-polygon-mcp"],
	"env": {
		"POLYGON_API_KEY": "your_key",
		"POLYGON_API_SECRET": "your_secret",
		"POLYGON_LOGIN": "your_login",
		"POLYGON_PASSWORD": "your_password"
	}
}

在使用前,需要设置 Polygon API 密钥。可在 Polygon 设置页面 获取 API Key 和 Secret。

开发

  1. 确保你已经安装了 Python 3.13 及以上版本。
  2. 克隆项目:
git clone https://github.com/gsh20040816/cf-polygon-mcp.git
cd cf-polygon-mcp
  1. 安装依赖:
uv sync
  1. 运行项目:
uv run mcp dev main.py
  1. 运行测试:
python -m unittest discover -s tests -v

许可证

AGPL-3.0-or-later

说明

本项目由 AI 生成。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf_polygon_mcp-0.6.2.tar.gz (52.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cf_polygon_mcp-0.6.2-py3-none-any.whl (72.1 kB view details)

Uploaded Python 3

File details

Details for the file cf_polygon_mcp-0.6.2.tar.gz.

File metadata

  • Download URL: cf_polygon_mcp-0.6.2.tar.gz
  • Upload date:
  • Size: 52.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cf_polygon_mcp-0.6.2.tar.gz
Algorithm Hash digest
SHA256 b99605b6b214463c764aa09ca236940218e90c09fbd07c32c4b83e28097bbf49
MD5 f9980f6dc456c7f4d70bc515ba23448c
BLAKE2b-256 4a2690923827e4b4e1f56f77299c6bb10bc3bcd9d16adbd17adf39a7cac421ab

See more details on using hashes here.

File details

Details for the file cf_polygon_mcp-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: cf_polygon_mcp-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 72.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cf_polygon_mcp-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 535eb57b683131f43f1b165d78288075b1fccb0dfdd469c52dee6d910986225c
MD5 8b30cfa116750717947ab8188f6de468
BLAKE2b-256 b8160a92e015fa18826ba13a05a04e4f3304f86562abe55e4d3dbd3ea629a0e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page