Skip to main content
Glama
CTFtime MCP Server

CTFtime MCP Server

by 0x-Professor

CTFtime MCP Server

A Model Context Protocol (MCP) server providing programmatic access to CTFtime.org data. Retrieve information about CTF competitions, team rankings, event details, and competition results through a standardized interface.

MCP Compatible Python 3.13+ License: MIT MCP Badge

Features

Tools

Tool

Description

get_upcoming_ctfs

Retrieve upcoming CTF events with configurable time range

get_past_ctfs

Retrieve historical CTF events

get_event_details

Get comprehensive information about a specific event

get_top_teams

Query global CTF team rankings

get_top_teams_by_country

Query regional team rankings by country code

get_team_info

Retrieve detailed team information and statistics

get_event_results

Access competition results and scores

search_events

Search events by name, description, or organizer

get_ctf_calendar

View monthly calendar of CTF events

Prompts

Prompt

Description

analyze_ctf_event

Generate analysis for a specific CTF event

find_beginner_ctfs

Identify beginner-friendly competitions

team_performance_analysis

Analyze team performance metrics

weekly_ctf_briefing

Generate weekly competition summary

country_ctf_scene

Analyze regional CTF community

Resources

Resource URI

Description

ctftime://info

Server and platform documentation

ctftime://formats

CTF competition format reference

ctftime://categories

Challenge category documentation

Related MCP server: Scoring Engine MCP Server

Installation

Prerequisites

  • Python 3.13 or higher

  • uv (recommended) or pip

git clone https://github.com/0x-Professor/CTF-time-mcp.git
cd ctf-times-mcp
uv sync

Using pip

git clone https://github.com/yourusername/ctf-times-mcp.git
cd ctf-times-mcp
pip install -e .

Usage

Running the Server

# Using uv
uv run server.py

# Using Python directly
python server.py

Development Mode

# Launch with MCP Inspector for testing
uv run mcp dev server.py

Client Configuration

To add the CTFtime MCP server to Claude Desktop, run this command:

uv run mcp install server.py --name "CTFtime"

Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "ctftime": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/ctf-times-mcp", "server.py"]
    }
  }
}

VS Code with Continue

Add to your Continue configuration:

{
  "mcpServers": [
    {
      "name": "ctftime",
      "command": "uv",
      "args": ["run", "server.py"],
      "cwd": "/path/to/ctf-times-mcp"
    }
  ]
}

Example Queries

Once connected to an MCP-compatible client:

  • "List upcoming CTF competitions for the next two weeks"

  • "Get details for CTF event ID 2345"

  • "Show the top 20 CTF teams globally"

  • "Find CTF teams from Germany"

  • "Search for CTF events related to DEF CON"

  • "Display the CTF calendar for March 2026"

API Reference

This server interfaces with the CTFtime.org API.

Endpoints Used

Endpoint

Purpose

/api/v1/events/

Event listing with date filters

/api/v1/events/{id}/

Individual event details

/api/v1/top/

Global team rankings

/api/v1/top/{year}/

Year-specific rankings

/api/v1/top-by-country/{code}/

Country-specific rankings

/api/v1/teams/{id}/

Team information

/api/v1/results/

Competition results

Rate Limiting

The CTFtime.org API is provided for data analysis and application development. Implement appropriate request throttling to respect server resources.

Competition Formats

Format

Description

Skill Level

Jeopardy

Category-based challenges (Web, Crypto, Pwn, Rev, Forensics)

All levels

Attack-Defense

Real-time offensive and defensive operations

Advanced

Mixed

Combination of Jeopardy and Attack-Defense

Intermediate+

Hack Quest

Narrative-driven progressive challenges

Learning

Challenge Categories

Category

Focus Area

Web

Web application security vulnerabilities

Crypto

Cryptographic analysis and exploitation

Pwn

Binary exploitation and memory corruption

Reverse

Static and dynamic binary analysis

Forensics

Digital artifact investigation

OSINT

Open source intelligence gathering

Misc

Programming, trivia, unconventional challenges

Project Structure

ctf-times-mcp/
├── server.py          # MCP server implementation
├── pyproject.toml     # Project configuration and dependencies
└── README.md          # Documentation

Development

Testing

# Run with MCP Inspector
uv run mcp dev server.py

# Execute tests
uv run pytest

Code Style

This project follows PEP 8 conventions with type annotations throughout.

Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/enhancement)

  3. Commit changes (git commit -m 'Add enhancement')

  4. Push to branch (git push origin feature/enhancement)

  5. Open a Pull Request

License

This project is licensed under the MIT License. See LICENSE for details.

Acknowledgments

Disclaimer

This is an independent project and is not affiliated with or endorsed by CTFtime.org. Please review and comply with CTFtime.org's terms of service and API usage guidelines.

Available Tools

9 tools
get_ctf_calendarB

Retrieve CTF events calendar for a specific month.

Args: month: Month number 1-12 (default: current month) year: Year (default: current year)

Returns: Calendar view of CTF events organized by date

Inputs: month, year. Returns: result

get_event_detailsA

Retrieve detailed information about a specific CTF event.

Args: event_id: The CTFtime event identifier

Returns: Comprehensive event details including format, weight, prizes, and participants

Inputs: event_id (required). Returns: result

get_event_resultsB

Retrieve CTF event results and scores.

Args: year: Specific year for results (default: all available)

Returns: Competition results with top teams and scores per event

Inputs: year. Returns: result

get_past_ctfsB

Retrieve past CTF events from CTFtime.org.

Args: limit: Maximum number of events to return (1-100, default: 10) days_back: Number of days to look back (default: 30)

Returns: Formatted list of past CTF events with details

Inputs: limit, days_back. Returns: result

get_team_infoA

Retrieve detailed information about a specific CTF team.

Args: team_id: The CTFtime team identifier

Returns: Team details including rating history, country, and aliases

Inputs: team_id (required). Returns: result

get_top_teamsA

Retrieve top-ranked CTF teams from CTFtime.org.

Args: year: Specific year for rankings (default: current year) limit: Maximum number of teams to return (1-100, default: 10)

Returns: Ranked list of top CTF teams with scores

Inputs: year, limit. Returns: result

get_top_teams_by_countryA

Retrieve top CTF teams from a specific country.

Args: country_code: ISO 3166-1 alpha-2 country code (e.g., 'US', 'DE', 'CN') limit: Maximum number of teams to return (default: 10)

Returns: Ranked list of top teams from the specified country

Inputs: country_code (required), limit. Returns: result

get_upcoming_ctfsB

Retrieve upcoming CTF events from CTFtime.org.

Args: limit: Maximum number of events to return (1-100, default: 10) days_ahead: Number of days to look ahead (default: 30)

Returns: Formatted list of upcoming CTF events with details

Inputs: limit, days_ahead. Returns: result

search_eventsB

Search for CTF events by name, description, or organizer.

Args: query: Search keywords limit: Maximum number of results (default: 20) include_past: Include past events in search (default: True) include_upcoming: Include upcoming events in search (default: True)

Returns: Matching CTF events sorted by relevance

Inputs: query (required), limit, include_past, include_upcoming. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 9 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific aspect of CTF data (calendar, event details, results, past events, team info, top teams, top teams by country, upcoming events, search) with clear boundaries. The descriptions reinforce distinct use cases, making misselection unlikely.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case (e.g., get_ctf_calendar, get_event_details, search_events). The naming is predictable and readable throughout, with 'get_' as the dominant verb prefix for retrieval operations and 'search_' for the search function, maintaining uniformity.

    Tool Count5/5

    With 9 tools, the count is well-scoped for a CTFtime server, covering key operations like event retrieval, team rankings, and search. Each tool earns its place by addressing a specific need in the domain, avoiding bloat while providing comprehensive coverage for typical agent workflows.

    Completeness4/5

    The tool set offers strong coverage for retrieving CTF events, results, and team information, with no dead ends. Minor gaps exist, such as the lack of tools for user-specific data (e.g., personal team participation) or administrative actions, but agents can work around these for core querying tasks.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to query CTF (Capture The Flag) cybersecurity competition data from CTFtime.org, including events, team rankings, results, and votes through the public CTFtime API.
      7
      56 npm
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Provides programmatic access to all Scoring Engine API functionality for managing Red/White/Blue team cybersecurity competitions, including scoreboard, overview, team management, service management, injects, notifications, and admin tools.
      53
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables automated access to problems, contests, solutions, and public or authenticated user data across global and China platforms, with tools for searching problems, retrieving profiles and submissions, running code, submitting solutions, and managing notes.
      -