Codeforces MCP Server
Provides tools for retrieving Codeforces user submissions, user profile info, rating history, contest standings, contest status, and contest list, enabling automated competitive programming problem logging.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codeforces MCP Serverfetch my latest Codeforces submissions and summarize my recent contests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Codeforces MCP Server
A Python MCP server that connects Claude and compatible MCP clients to the Codeforces public API. Fetch submissions, ratings, and contest data without manually copying problem details into a conversation.
Python · FastMCP · httpx · Streamable HTTP
Why I built this
Competitive programming practice involves more than submitting a solution. Reviewing the approach and recording what went wrong are useful parts of the process. This server retrieves problem metadata and submission results so the conversation can focus on difficulty, reasoning, and lessons learned.
The server supplies Codeforces data; it does not itself store a problem log or submit solutions.
Related MCP server: mcp-codeforces
Available tools
Tool | Purpose | Codeforces endpoint |
| Recent submissions, including problem metadata and verdicts |
|
| User profiles, ratings, and ranks |
|
| Contest rating history |
|
| Contest standings, optionally filtered by handle |
|
| Contest submissions with optional filters |
|
| Past and upcoming contests |
|
Example requests after connecting an MCP client:
“Fetch my latest five Codeforces submissions for the handle I provide.”
“Show my rating changes across recent contests.”
“List upcoming Codeforces contests.”
These are example prompts, not recorded execution results.
How it works
Claude / MCP client
|
| Streamable HTTP
v
Python MCP server
|
| Async HTTP requests
v
Codeforces public APIThe implementation uses a shared httpx.AsyncClient with a 30-second timeout, checks HTTP and Codeforces API errors, and returns formatted JSON strings or error messages to the caller. The six tools use public API methods and do not require a Codeforces API key.
Run locally
Prerequisites: Git and Python 3.11. The commands below use Conda, matching the project's existing setup.
git clone https://github.com/MindForge-Abhishek/Codeforces_mcp.git
cd Codeforces_mcp
conda create -n codeforces-mcp python=3.11
conda activate codeforces-mcp
pip install -r requirements.txt
python codeforces_mcp.pyThe server binds to 0.0.0.0:8000. For a compatible local client, use:
http://127.0.0.1:8000/mcpThe current implementation calls server.streamable_http_app(). Use the Streamable HTTP /mcp endpoint, rather than the legacy SSE /sse endpoint.
Connect from Claude
For a remote Claude connector, deploy the server to an HTTPS host that Claude can reach. Add the deployed address ending in /mcp through Claude's connector settings.
When deploying your own instance:
Install the dependencies from
requirements.txt.Start the server with
python codeforces_mcp.py; the repository also includes aProcfile.Configure the hosting service to route requests to port
8000, which is currently fixed in the code.Add your deployment hostname to
TransportSecuritySettings.allowed_hostsincreate_server().Configure the client to use your HTTPS address with the
/mcppath.
The existing hostname in the source is specific to the original deployment. Hostname validation is not user authentication; the current implementation does not add application-level authentication or rate limiting.
Project structure
Codeforces_mcp/
├── codeforces_mcp.py # API client, six MCP tools, and server entry point
├── requirements.txt # Python dependencies
├── Procfile # Deployment start command
├── .gitignore
└── README.mdCurrent limitations
Requests depend on Codeforces availability and API limits.
Errors are returned as readable strings; clients should distinguish them from JSON data.
The server retrieves data but does not persist reflections or problem logs.
Deployment configuration includes a fixed port and an explicit host allowlist.
References
This server cannot be deployed
Maintenance
Related MCP Connectors
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
Teamfight Tactics data & AI coaching for Claude and ChatGPT — 19 tools, built-in Riot key.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to search and retrieve LeetCode problems, user profiles, and statistics through natural language.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access Codeforces public data (users, contests, problems, etc.) via natural language or direct tool calls through Pipeworx gateway.20 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to fetch and analyze your public LeetCode submission history, weak areas, and daily challenge via a remote MCP server.6 npmMIT
- FlicenseAqualityCmaintenanceEnables coding agents to discover unsolved Codeforces practice problems, analyze tag performance, and inspect submissions, profiles, rating history, and upcoming contests through MCP-compatible clients.6-