Skip to main content
Glama

cf-analyser

A local MCP server for analysing Codeforces activity: weekly practice summaries, problem recommendations, user comparisons, weak-topic detection, contest tracking, and rating progress. Backed by the public Codeforces API, with every request signed and authenticated for higher rate limits and reliability.

Requirements

Related MCP server: DevAssist MCP Server

Setup

  1. Clone the repo and install dependencies:

    git clone <this-repo-url>
    cd cf_analyser
    uv sync
  2. Copy .env.example to .env and fill in your API key/secret:

    cp .env.example .env

    (.env isn't loaded automatically — it's just there as a reference for the values you'll put into your MCP client config in the next step.)

Adding to Claude Desktop / Claude Code

Add an MCP server entry pointing at this project. Find the absolute path to uv with which uv, and use the absolute path to wherever you cloned this repo — Claude launches MCP servers without your shell's PATH, so a bare "uv" command may fail to resolve.

Claude Desktop: edit claude_desktop_config.json (on macOS, ~/Library/Application Support/Claude/claude_desktop_config.json). Claude Code: use claude mcp add or edit its MCP config the same way.

{
  "mcpServers": {
    "cf-analyser": {
      "command": "/absolute/path/to/uv",
      "args": ["run", "--directory", "/absolute/path/to/cf_analyser", "cf-analyser"],
      "env": {
        "PYTHONPATH": "/absolute/path/to/cf_analyser/src",
        "CF_API_KEY": "your-api-key",
        "CF_API_SECRET": "your-api-secret"
      }
    }
  }
}

Restart Claude Desktop/Code afterwards so it picks up the new server.

Running standalone (for testing)

CF_API_KEY=... CF_API_SECRET=... PYTHONPATH=src uv run cf-analyser

Or use the MCP inspector to poke at tools interactively in the browser:

CF_API_KEY=... CF_API_SECRET=... PYTHONPATH=src uv run mcp dev src/cf_analyser/server.py

Tools

  • get_user_profile(handle) — rank, rating, max rating, contribution, rating trend.

  • analyse_activity(handle, days=7) — problems solved/attempted, verdict breakdown, tags practiced, difficulty range.

  • recommend_problems(handle, count=5, target_rating=None, tags=None) — unsolved problems near the user's level.

  • compare_users(handle1, handle2) — side-by-side rating, solved counts, shared solves, tag strength.

  • weak_topics(handle, min_attempts=3) — tags with the lowest solve rate.

  • upcoming_contests(count=5) — next contests, soonest first.

  • contest_performance(handle, contest_id) — rank, points, penalty, and rating delta for one contest.

  • solve_streak(handle) — current and longest daily solve streak.

  • rating_progress(handle) — rating history summary, best/worst contest, plateau detection.

Once connected, just ask Claude things like "analyse my Codeforces week", "recommend some problems for me", or "compare me with tourist" — it'll call the right tool automatically.

Troubleshooting

  • Server doesn't show up in Claude: double-check the command path is absolute and correct (which uv), and that --directory points at this repo.

  • "CF_API_KEY and CF_API_SECRET must be set": the env block in your MCP config is missing or has empty values.

  • Tool calls fail with a Codeforces error message: usually an invalid handle, or an invalid/expired API key or secret — regenerate one at https://codeforces.com/settings/api if needed.

License

I never understood what this actually is

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A complete, all-in-one MCP server for Codeforces, enabling AI assistants to access user profiles, compare users, search problems, get practice recommendations, and more.
    8
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A production-ready MCP server for GitHub and competitive programming (Codeforces) that enables AI assistants to fetch user profiles, repository stats, contest history, and personalized problem recommendations.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables Claude to fetch and analyze your public LeetCode submission history, weak areas, and daily challenge via a remote MCP server.
    150
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Enables 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

View all related MCP servers

Related MCP Connectors

  • Search Codeforces problems and inspect public problem metadata through the official Codeforces API.

  • Codeforces competitive programming users, contests, problems

  • Search AtCoder problems and fetch public problem statements through MCP.

View all MCP Connectors

Latest Blog Posts

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/Adityanath-madishetti/cf_analyser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server