TryHackMe MCP Server
Provides tools for searching TryHackMe rooms by topic or keyword, retrieving room overviews (metadata, difficulty, task outlines), fetching specific task instructions, commands and questions, exporting full room content as structured Markdown, listing curated foundational learning topics, and checking authentication status. Supports session cookie authentication to access subscriber/VIP rooms.
Click on "Deploy 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., "@TryHackMe MCP Server find TryHackMe Linux rooms and pull the first tasks"
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.
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.jsonWindows:
%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
Open Cursor Settings (
Cmd + ,or click gear icon).Go to Features -> MCP Servers.
Click Add New MCP Server.
Fill in:
Name:
tryhackmeType:
commandCommand:
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 8000SSE endpoint URL: http://localhost:8000/sse
Available Tools
Tool | Parameters | Description |
| None | Checks current authentication status and session validity. |
|
| Searches rooms by topic or keyword (e.g., |
|
| Returns room metadata, difficulty, estimated time, and task outline. |
|
| Fetches full instructions, commands, and questions for a specific task. |
|
| Exports complete room content as a structured Markdown document. |
| 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.pyThis 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:
thm_search_rooms(query="linux")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
Available Tools
6 toolsthm_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
Scored across 6 tools
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.
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.
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.
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
Web search, URL content extraction to Markdown, site mapping, and recursive web crawler.
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
Search, read, download and report on tested step-by-step recipes (playbooks) for AI agents.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides 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.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables 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-
- FlicenseNot gradedqualityDmaintenanceConnects 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-
- AlicenseAqualityDmaintenanceEnables searching and querying HackTricks pentesting documentation directly from Claude, with tools for quick lookup, grouped search results, page outlines, section extraction, and cheatsheet mode.784 npm11MIT