Skip to main content
Glama

Overview

This MCP server connects your AI assistant (Claude Desktop, Antigravity IDE, Cursor, Windsurf, etc.) directly to TryHackMe. It enables you to pull room descriptions, step-by-step walkthroughs, terminal commands, and questions directly into your workspace for training and reference.

Key capabilities

  • Vercel checkpoint bypass: Automatically handles the TryHackMe bot challenge in the background, caching clearance tokens for fast subsequent API calls.

  • Account-aware extraction: Supports session cookie (connect.sid) authentication to access subscriber and VIP rooms.

  • Clean Markdown export: Converts raw HTML room materials into readable Markdown with syntax-highlighted code blocks, command snippets, and hints.

  • Curated tracks: Includes built-in references to core learning modules across Linux, Docker, Bash scripting, networking, and security.


Related MCP server: Kali MCP Server

Quick Start (Zero Clone Needed)

If you have uv installed, you can add this MCP server directly without cloning the repository.

1. Claude Desktop

Open your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the tryhackme entry to mcpServers:

{
  "mcpServers": {
    "tryhackme": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/bledny1099/tryhackme-mcp",
        "tryhackme-mcp"
      ]
    }
  }
}

Restart Claude Desktop (Cmd + Q on macOS and relaunch).


2. Cursor IDE

  1. Open Cursor Settings (Cmd + , or click gear icon).

  2. Go to Features -> MCP Servers.

  3. Click Add New MCP Server.

  4. Fill in:

    • Name: tryhackme

    • Type: command

    • Command:

      uvx --from git+https://github.com/bledny1099/tryhackme-mcp tryhackme-mcp

3. Remote SSE Mode (Web Clients & Connectors)

You can run the server as a standalone HTTP/SSE service that provides an endpoint URL:

uvx --from git+https://github.com/bledny1099/tryhackme-mcp tryhackme-mcp --transport sse --port 8000

SSE endpoint URL: http://localhost:8000/sse


Available Tools

Tool

Parameters

Description

thm_check_auth

None

Checks current authentication status and session validity.

thm_search_rooms

query (string), limit (int, default: 10)

Searches rooms by topic or keyword (e.g., linux, docker, networking, bash).

thm_get_room_overview

room_code (string)

Returns room metadata, difficulty, estimated time, and task outline.

thm_get_task

room_code (string), task_no (int)

Fetches full instructions, commands, and questions for a specific task.

thm_get_room_full

room_code (string)

Exports complete room content as a structured Markdown document.

thm_get_curated_topics

None

Lists recommended foundational learning rooms grouped by category.


Authentication

Free and public rooms work out of the box without logging in. For VIP/subscriber rooms or account-specific progress, provide your connect.sid session cookie.

Option A: Interactive Login Helper (Local Clone)

git clone https://github.com/bledny1099/tryhackme-mcp.git
cd tryhackme-mcp
uv run python login.py

This opens a Chrome window, waits for your login on TryHackMe, and saves your session into .env.

Option B: Environment Variable in MCP Config

Add THM_SESSION to the env block in your MCP client configuration:

{
  "mcpServers": {
    "tryhackme": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/bledny1099/tryhackme-mcp",
        "tryhackme-mcp"
      ],
      "env": {
        "THM_SESSION": "your_connect_sid_cookie_here"
      }
    }
  }
}

Usage Example

Once configured, your AI assistant can interact with TryHackMe:

User: "Find TryHackMe rooms about Linux fundamentals and pull the content of task 2 from linuxfundamentalspart1."

The model calls:

  1. thm_search_rooms(query="linux")

  2. thm_get_task(room_code="linuxfundamentalspart1", task_no=2)

The model receives the exact theoretical notes, command syntax, and exercise questions in clean Markdown.


License

MIT

Available Tools

6 tools
thm_check_authB

Check current TryHackMe authentication status and session validity.

Returns details on whether the MCP server is currently connected under your account.

Inputs: no named parameters. Returns: result

thm_get_curated_topicsA

List curated TryHackMe foundational learning rooms grouped by category (Linux, Networking, Security).

Inputs: no named parameters. Returns: result

thm_get_room_fullB

Extract complete room content into structured Markdown with all tasks, theory, code, and exercises.

Args: room_code: The room identifier (e.g. 'linuxfundamentalspart1').

Inputs: room_code (required). Returns: result

thm_get_room_overviewB

Get an overview of a TryHackMe room, including difficulty, estimated time, and tasks outline.

Args: room_code: The room identifier (e.g. 'linuxfundamentalspart1').

Inputs: room_code (required). Returns: result

thm_get_taskA

Get the full educational content, commands, theory, and questions for a specific task in a room.

Args: room_code: The room identifier (e.g. 'linuxfundamentalspart1'). task_no: The task number (1-indexed).

Inputs: task_no (required), room_code (required). Returns: result

thm_search_roomsB

Search TryHackMe rooms by keyword (e.g., 'linux', 'bash', 'networking', 'privesc').

Args: query: Search term or topic. limit: Maximum number of rooms to return (default: 10).

Inputs: query (required), limit. 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 6 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: auth check, keyword search, curated listing, room overview, single task, and full-room extraction. The only mild overlap is granularity between thm_get_task/thm_get_room_full and thm_get_room_overview/thm_get_room_full, since full content subsumes the others, but the scopes are described clearly enough to choose between them.

    Naming Consistency5/5

    All six tools follow a consistent `thm_` prefix plus verb_noun pattern (check_auth, search_rooms, get_room_overview, get_task, get_room_full, get_curated_topics). The convention is uniform and predictable throughout with no style mixing.

    Tool Count5/5

    Six tools is well-scoped for a focused content-reading/extraction server. Each tool earns its place, covering auth, discovery, and content retrieval at varying granularities without bloat.

    Completeness4/5

    The content-access surface is fairly complete: auth, search, curated discovery, overview, task-level, and full-room extraction are all present. Minor gaps exist around user progress/completion tracking or answer retrieval, but the core read workflow has no dead ends.

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides secure access to Exegol penetration testing tools for CTF competitions and red team learning. Enables AI assistants to perform web penetration testing, network reconnaissance, password cracking, OSINT analysis, and more for educational purposes.
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to execute penetration testing commands and security tools on Kali Linux remotely. Supports automated reconnaissance, vulnerability scanning, and CTF solving through integration with 25+ offensive security tools like nmap, gobuster, and nuclei.
      16
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Connects AI assistants to 55+ Kali Linux security tools for automated CTF solving, penetration testing, and security analysis across 7 categories including cryptography, forensics, web security, and binary exploitation.
      79
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables searching and querying HackTricks pentesting documentation directly from Claude, with tools for quick lookup, grouped search results, page outlines, section extraction, and cheatsheet mode.
      7
      84 npm
      11
      MIT