codeforces-mcp-server
v1.0.2
Published
MCP server for Codeforces API integration
Maintainers
Readme
codeforces-mcp-server
Model Context Protocol (MCP) server for the Codeforces API. Use it from Cursor, Claude Desktop, or any MCP client to look up handles, contests, problems, standings, and submissions.
Requirements
- Node.js 20+ (LTS recommended)
- Network access to
codeforces.com
Install (from npm)
The package publishes the compiled server under the CLI name codeforces-mcp.
npm install -g codeforces-mcp-serverOr run without a global install (downloads on first use):
npx codeforces-mcp-serverThe package exposes both codeforces-mcp and codeforces-mcp-server as the same CLI.
For MCP, you usually reference npx in the client config (see below).
Configure MCP (Cursor / Claude)
The server speaks MCP over stdio. Point your client at the codeforces-mcp binary from the published package.
Option A — npx (good for multiple machines)
{
"mcpServers": {
"codeforces": {
"command": "npx",
"args": ["-y", "codeforces-mcp-server@latest"]
}
}
}If an older published version only had the codeforces-mcp binary name, use:
"args": ["-y", "-p", "codeforces-mcp-server@latest", "codeforces-mcp"]Option B — Global install + node
After npm install -g codeforces-mcp-server, use the path where npm put the binary (check with which codeforces-mcp on macOS/Linux), or:
{
"mcpServers": {
"codeforces": {
"command": "codeforces-mcp",
"args": []
}
}
}(Only if codeforces-mcp is on your PATH.)
Option C — Clone from GitHub
git clone <your-repo-url>
cd cf-mcp
npm install
npm run buildThen:
{
"mcpServers": {
"codeforces": {
"command": "node",
"args": ["/absolute/path/to/cf-mcp/dist/index.js"]
}
}
}Restart the editor/app after changing MCP settings.
Tools
| Tool | Purpose |
|------|---------|
| get_user_info | Profile and stats for one or more handles |
| get_user_rating_history | Rating changes over time |
| get_user_submissions | Recent submissions |
| get_contests | Contest list (optionally gym) |
| get_contest_standings | Rankings for a contest |
| search_problems | Problems by tags / rating (client-side filter) |
| get_recent_submissions | Global recent submissions |
| get_problem_tags | All tags (from problemset) |
Development
npm install
npm run build
npm test- Source:
src/— TypeScript - Output:
dist/— what npm ships (seepackage.json→files)
Publishing (maintainers)
- Bump version:
npm version patch(orminor/major). - Build and publish:
npm run build && npm publish
npm may require 2FA or a granular access token on your account. - Optional: tag in Git:
git tag v1.0.x && git push origin v1.0.x.
License
MIT — see package.json.
Disclaimer
Unofficial project; not affiliated with Codeforces.
