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 "Install 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 custom MCP (Model Context Protocol) server that connects Claude AI to the Codeforces public API. Built to streamline competitive programming problem logging — Claude can automatically fetch your latest submission data instead of you having to type it manually.
What is MCP?
MCP (Model Context Protocol) is a protocol developed by Anthropic that lets Claude connect to external services and tools. Instead of Claude only knowing what you type, it can directly call APIs, read databases, and interact with external services on your behalf.
This project turns the Codeforces public API into an MCP server that Claude can use as a custom connector.
Related MCP server: mcp-codeforces
What Does This Server Do?
Once connected to Claude, this server gives Claude the ability to:
Tool | What it does |
| Fetch your latest CF submissions with problem name, rating, tags, verdict, contest ID |
| Get your current rating, rank, and profile info |
| Get your full rating history across all contests |
| Check your rank in any specific contest |
| Get all submissions from a specific contest |
| List all past and upcoming Codeforces contests |
Primary Use Case
The main reason this was built is to automate problem logging. When solving problems on Codeforces, instead of manually providing the problem name, number, rating, and tags every time — Claude fetches all of that automatically from your submission history. You only need to provide:
How difficult it felt
What happened during solving
What you learned
Project Structure
codeforces-mcp/
├── codeforces_mcp.py # Main server file — all tools and API logic
├── requirements.txt # Python dependencies
├── .gitignore # Files excluded from version control
└── README.md # This fileHow It Works
Claude → MCP Connector URL → This Server → Codeforces Public API → Back to ClaudeClaude receives a trigger from the user
Claude calls the appropriate tool on this MCP server
The server makes a request to the Codeforces public API
Codeforces returns the data
The server sends it back to Claude
Claude uses that data to respond
The Codeforces API is completely public — no authentication or API keys required.
Tech Stack
Python 3.11
FastMCP (
mcp[server]<2) — framework for building MCP servershttpx — async HTTP client for making API requests
uvicorn — ASGI server (comes with mcp[server])
SSE (Server-Sent Events) — transport protocol used by Claude to communicate with MCP servers
Local Setup
Prerequisites
Python 3.11
Miniforge / Conda
Step 1 — Clone the repo
git clone https://github.com/YOUR_USERNAME/codeforces-mcp.git
cd codeforces-mcpStep 2 — Create conda environment
conda create -n codeforces-mcp python=3.11
conda activate codeforces-mcpStep 3 — Install dependencies
pip install -r requirements.txtStep 4 — Run the server
python3 codeforces_mcp.pyYou should see:
INFO: Starting Codeforces MCP server...
INFO: Uvicorn running on http://127.0.0.1:8000Deployment (Railway)
The server needs to be deployed to a hosting platform so Claude can reach it over the internet. Railway is the recommended option — free tier is sufficient.
Step 1 — Create a Railway account
Go to railway.app and sign up with GitHub.
Step 2 — Create a new project
Click New Project
Select Deploy from GitHub repo
Select this repo
Step 3 — Add a Procfile
Create a file called Procfile (no extension) in the root of the project:
web: python3 codeforces_mcp.pyPush this to GitHub — Railway will use it to know how to start the server.
Step 4 — Get your public URL
Railway will give you a URL like:
https://codeforces-mcp-production.up.railway.appConnecting to Claude
Once deployed:
Go to claude.ai
Open Settings → Connectors
Click Add custom connector
Paste your Railway URL with
/sseat the end:
https://codeforces-mcp-production.up.railway.app/sseSave — Claude can now use all the tools in this server
Available API Endpoints (Internal)
These are the Codeforces API endpoints this server uses internally:
Server Tool | CF API Endpoint |
|
|
|
|
|
|
|
|
|
|
|
|
Full Codeforces API documentation: codeforces.com/apiHelp
Why Not Use the CF API Directly?
Claude's web_fetch tool goes through Anthropic's proxy server, which intercepts and rewrites certain URLs — making direct CF API calls unreliable from inside Claude. This MCP server solves that by acting as a middleman that Claude can reliably call.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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 gradedqualityCmaintenanceEnables Claude to search and retrieve LeetCode problems, user profiles, and statistics through natural language.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access Codeforces public data (users, contests, problems, etc.) via natural language or direct tool calls through Pipeworx gateway.16MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to fetch and analyze your public LeetCode submission history, weak areas, and daily challenge via a remote MCP server.154MIT
- FlicenseAqualityBmaintenanceEnables 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-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MindForge-Abhishek/Codeforces_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server