Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoHTTP transport bind address.0.0.0.0
PORTNoHTTP transport bind port.8000
CACHE_TTLNoCache lifetime in seconds.600
MAX_RETRIESNoRetry attempts for transient failures.3
PROBLEMSET_TTLNoProblemset cache lifetime in seconds.1800
CODEFORCES_LANGNoLanguage for names.en
REQUEST_TIMEOUTNoPer-request timeout in seconds.30
MIN_REQUEST_INTERVALNoSeconds between upstream calls.1.1

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Codeforces MCP Server — read-only access to the official Codeforces API.

Capabilities: problemset search by id/title/tag/rating, problem metadata, practice-ladder filtering, user profiles and rating history, submission history, derived performance analytics, head-to-head comparison, the rated leaderboard, contest listings and standings, rating changes, and live platform activity.

This server never submits code, never executes code, and never accepts Codeforces credentials. Call get_capabilities to enumerate the supported surface and get_health to diagnose failures.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_problemsA

Search the official Codeforces problemset by problem id ('158A', '158/A'), title, tag ('dp', 'greedy', 'binary search') or rating ('1500', '1200-1600'). Multi-word queries must match every token, so 'dp 1500' returns 1500-rated dynamic programming problems. Prefer this over scraping codeforces.com.

get_problem_metadataA

Fetch official metadata for one problem by id ('158A', '158/A' or '158-A'): name, rating, tags, solved count and canonical URL. Note: the Codeforces API does not expose the full problem statement, so this returns metadata only.

list_problemsA

Browse the problemset with structured filters instead of a text query. Returns the most-solved problems matching ALL given tags within the rating range. Ideal for building practice ladders.

get_user_infoA

Fetch structured profile data for 1-10 Codeforces handles: rating, max rating, rank/tier, country, organization, contribution and registration date.

get_user_ratingB

Return a user's full contest rating history (newest first) with per-contest rating deltas, ranks, tier labels, best rating, biggest gain and biggest drop. Use for trend questions.

get_user_submissionsB

Return a user's recent submissions, compacted to verdict, problem, language, runtime and memory. Raw Codeforces submission objects are very large; this trims them for LLM context.

get_user_statsA

Compute derived analytics from a user's submission history: unique problems solved vs attempted, acceptance rate, verdict breakdown, favourite languages, strongest tags, solved-by-rating distribution and hardest solved problem. Answers 'how good is X' in one call.

compare_usersA

Fetch compact side-by-side profiles for 2-5 handles sorted by rating. Handy for 'who is stronger' or team-selection questions.

get_rated_usersA

Return the top rated Codeforces users, optionally only currently-active users or above a minimum rating. The upstream list has hundreds of thousands of entries, so results are always capped to protect context size.

get_contest_listA

List Codeforces contests with start time, duration, type and phase. Filter by phase (BEFORE = upcoming, CODING = running, FINISHED = past) or switch to the gym archive.

get_upcoming_contestsA

Return the next scheduled Codeforces contests, soonest first, including how many hours away each one starts. Use for 'when is the next contest' questions.

get_contest_standingsA

Fetch the standings table for a contest: contest metadata, the problem list, and a bounded window of ranked rows with points, penalty, hacks and per-problem results. Pass 'handles' to look up specific competitors instead of the top of the table.

get_contest_rating_changesA

Return the rating deltas applied after a rated contest: handle, rank, old rating, new rating and the computed change. Only available once the contest has been rated.

get_contest_statusA

Return submissions made in a specific contest, optionally narrowed to a single handle. Useful for reviewing what a competitor submitted and which verdicts they received.

get_recent_submissionsA

Return the most recent submissions across the whole Codeforces platform, compacted to verdict, problem, language and runtime. Useful for sampling live activity.

get_capabilitiesA

Report which Codeforces operations this server supports, which are degraded, and which are deliberately unsupported (this adapter is strictly read-only and never submits code or accepts credentials). Call this first to discover the safe surface area.

get_healthA

Probe the official Codeforces API and report transport, schema, auth and upstream health, plus the last observed error and request latency. Use this to diagnose failing tool calls.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 17 tools

Disambiguation4/5

Most tools target distinct resources and actions, and descriptions clarify the boundaries between users, problems, submissions, and contests. A few pairs still have some overlap, especially search_problems vs list_problems for problemset discovery and get_contest_list vs get_upcoming_contests for contest listing.

Naming Consistency4/5

The set uses consistent snake_case with verb_noun naming such as get_user_info, get_user_rating, search_problems, and list_problems. There are minor deviations like get_contest_list instead of list_contests, and get_recent_submissions vs get_user_submissions, but the pattern remains readable and predictable.

Tool Count4/5

At 17 tools, the surface is slightly above the typical 3-15 range, but the breadth is justified by covering problems, users, submissions, contests, and diagnostics. Each tool has a plausible role, though a couple of pairs could potentially be consolidated.

Completeness4/5

The read-only Codeforces domain is well covered across problem discovery, user analytics, submission history, contest listings, standings, and rating changes. Minor gaps remain, such as fetching a specific submission or full problem statement, with the latter explicitly limited by the upstream API.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues