hltv-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ALL_PROXY | No | Standard all-protocols proxy environment variable, recognised by the server. | |
| HLTV_PROXY | No | Egress proxy, e.g. http://user:pass@host:port or socks5://host:port. The primary remedy for IP-level blocking. | |
| HLTV_JITTER | No | Upper bound of the random jitter added to intervals (seconds). | 0.8 |
| HLTV_WARMUP | No | Warm up the browser in the background at startup so the first query doesn't wait for a cold start. Set 0 to disable. | 1 |
| HTTPS_PROXY | No | Standard HTTPS proxy environment variable, recognised by the server. | |
| HLTV_BACKEND | No | Backend: auto (browser preferred) / browser (forced) / http (forced HTTP) / hybrid (HTTP preferred, switch to browser when blocked). | auto |
| HLTV_TIMEOUT | No | Single-request timeout (seconds). | 40 |
| HLTV_CACHE_DIR | No | Stores the profile, browser logs and port record. | platform cache dir |
| HLTV_CHROME_BIN | No | Path to the browser executable (Chrome/Chromium/Edge). | auto-detected |
| HLTV_BROWSER_CDP | No | Reuse an externally launched browser, e.g. http://127.0.0.1:9222. Leave empty to let the service prepare one. | |
| HLTV_IMPERSONATE | No | TLS fingerprint for the HTTP backend; also accepts chrome131, firefox135, etc. | safari17_0 |
| HLTV_MAX_RETRIES | No | Number of retries on failure. | 3 |
| HLTV_NAV_RETRIES | No | Page navigation retries (browser backend). | 3 |
| HLTV_WARMUP_IDLE | No | Seconds to wait before warming the next page, to see whether the user is doing anything. Yields immediately if a request arrives. | 8 |
| HLTV_BLOCK_ASSETS | No | Set 1 to block images/fonts/ad analytics scripts. HLTV is mostly server-rendered HTML, so enabling this is actually slightly slower on desktop; worth trying on weak devices. | 0 |
| HLTV_BROWSER_PORT | No | Preferred debugging port when auto-launching; switches automatically if occupied. | 9222 |
| HLTV_MIN_INTERVAL | No | Minimum interval between two requests for the HTTP backend (seconds). | 3.0 |
| HLTV_WARMUP_PAGES | No | Pages fetched in sequence during warmup. Cloudflare issues an extra real challenge on the first visit to certain paths, taking 10-25 s; running through them at startup makes user queries warm. | /matches,/livescore,/results,/ranking/teams,/search |
| HLTV_CHALLENGE_POLL | No | Challenge polling interval (seconds). | 0.6 |
| HLTV_CHALLENGE_WAIT | No | Maximum wait for the Cloudflare challenge to pass (seconds). | 25 |
| HLTV_CHROME_PROFILE | No | Separate profile directory used when auto-launching. | ~/.cache/hltv-mcp/chrome-profile |
| HLTV_BROWSER_VISIBLE | No | Set 1 to make the browser window visible (for debugging). Hidden by default. | 0 |
| HLTV_BROWSER_HEADLESS | No | Set 1 to force headless. Note that headless gets blocked by Cloudflare; avoid unless necessary. | automatic |
| HLTV_BROWSER_AUTOLAUNCH | No | Set 0 to forbid auto-launching a browser and only reuse an existing instance. | 1 |
| HLTV_HYBRID_MIN_INTERVAL | No | Minimum interval for the probing HTTP request in hybrid mode (seconds). | 1.0 |
| HLTV_BROWSER_MIN_INTERVAL | No | Minimum interval between two requests for the browser backend (seconds). | 0.5 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
查询 HLTV.org 的 Counter-Strike 赛事数据:赛程、赛果、世界排名、战队、选手、新闻与赛事日历。所有工具都接受数字 id 或名称(如 "Vitality"、"ZywOo"),名称会由服务端自动解析。不确定名称拼写时先用 hltv_search。
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| hltv_searchA | 在 HLTV 上搜索选手、战队、赛事或新闻,返回名称与对应 ID。不确定拼写、或需要把名称换成 ID 时先调这个。 |
| hltv_get_matchesA | 获取赛程:即将开始与正在进行中的比赛。可按队伍名或赛事名过滤,也可只看正在直播的比赛。 |
| hltv_get_resultsC | 获取最近的比赛结果(已结束),含比分与胜方。可按队伍或赛事过滤。 |
| hltv_get_matchC | 获取单场比赛的详细信息:双方阵容、地图比分、选手数据。 |
| hltv_get_team_rankingC | 获取 HLTV 世界战队排名(含各队积分)。这是 CS 圈最常被引用的排名。 |
| hltv_get_teamB | 获取战队资料:世界排名、Valve 排名、教练、阵容名单(含选手 ID)。 |
| hltv_get_playerC | 获取选手资料:真名、国籍、年龄、当前战队、Rating 3.0 及各项能力评分、生涯荣誉(Major 冠军数、线下赛冠军数等)。 |
| hltv_get_player_careerB | 获取选手的逐年生涯数据:历年在哪支战队、历年 HLTV Top 20 年度排名(如 2023 年第 3 名)、历年评委会奖项、历年赛事成绩。用于回答「某选手历年表现如何」这类问题。 |
| hltv_get_player_year_statsB | 获取选手逐年 Rating 与详细数据(Rating 3.0/2.0、K/D、ADR、地图数、对 Top5/10/20 对手的 Rating 等)。这是回答「某选手历年数据怎么样」最直接的接口。 |
| hltv_get_player_event_statsA | 获取选手在【某届赛事】中的个人统计数据(按赛事过滤,区别于按年份)。返回 Rating 2.0、CT/T Rating、KAST、ADR、KPR、DPR、K/D、爆头率、地图数,以及对各级对手的 Rating 与能力评分。需要浏览器后端(约几秒,带缓存)。赛事优先传数字 event_id(如 IEM Cologne 2022 = 6140);也可传 event_name 由服务端解析,但历史赛事名解析可能失败,推荐用 ID。 |
| hltv_get_eventC | 获取赛事详情:总奖金池、起止日期、地点、VRS 权重、参赛队伍名单、以及名次与奖金分配(冠军/亚军/各名次拿多少钱)。 |
| hltv_get_team_matchesB | 获取某支战队的近期比赛战绩:日期、对手、比分、胜负。用于回答「某队最近打得怎么样」。 |
| hltv_get_head_to_headB | 获取两支队伍的历史交手记录(H2H)。返回逐地图的对战明细(日期、赛事、地图、比分、胜负)与按地图聚合的胜率,用于赛前分析。 |
| hltv_get_match_statsA | 获取单场比赛的逐地图、分阵营(CT/T)的选手详细数据:Op.K-D、多杀、KAST、1vX 残局、爆头数、助攻、死亡、ADR、Rating 等。支持按地图(All/Inferno/Ancient…)与阵营(both/T/CT)筛选。 |
| hltv_get_newsB | 获取 HLTV 最新新闻列表(标题、分类、时间、链接)。 |
| hltv_get_news_articleC | 获取一篇 HLTV 新闻的正文内容。 |
| hltv_get_eventsC | 获取赛事日历:正在进行与即将开始的比赛及线下大赛(含赛事 ID、地点、横幅)。 |
| hltv_backend_statusA | 查看当前用哪种方式访问 HLTV(浏览器后端 / HTTP 后端)、浏览器是否可用、以及各页面能否正常取到。排查「查不到数据」类问题时先调这个。 |
| hltv_get_live_scoresA | 获取正在进行的比赛的实时比分快照:当前地图的回合数、已赢地图数、双方队伍与赛事。想追踪某场比分的变化就间隔调用(内部有 15 秒缓存,防止打爆 HLTV)。可按 match_id 过滤只看一场。 |
| hltv_get_player_photoB | 获取选手照片(bodyshot):默认返回 CDN 地址;download=true 时下载到本地。传 year 可回溯那一年的照片(走统计页,通常 800×800,适合做老比赛的数据页)。 |
| hltv_get_team_logoB | 获取战队 logo 的 CDN 地址,可选下载到本地。默认只返回 URL;download=true 时保存文件并返回路径、字节数、sha256 与宽高。 |
| hltv_get_images_batchA | 批量获取选手照片 / 战队 logo / 赛事 logo。每类最多 50 个,可混用数字 ID 与名称。默认只返回 URL;download=true 时保存到本地。单条失败不影响其余,错误单独列出。 |
| hltv_get_match_photosA | 一次性下载一场比赛两队全部选手的照片(默认当前官方照,传 year 取当年照片)。做赛事数据页时比逐个调用快得多;返回每人的文件路径与来源。 |
| hltv_get_player_matchupC | 两名选手的「同图对位」数据:两人同时出场的每张地图上各自的 K-D、Rating、ADR、KAST、首杀、多杀、残局,按地图聚合。可指定单张地图(如 Nuke)。 |
| hltv_get_squad_matchupB | 一名选手对上一整支队伍:拆成他与队内每名选手的同图对位,一次拿全。例如「jL 对 MOUZ 全队」,可限定地图与时间范围。 |
| hltv_get_kill_matrixA | 击杀矩阵:HLTV 单图性能页那张彩色格子表,列出「谁杀了谁、杀了几次」。三个视角:all(全部击杀)、first_kills(首杀)、awp_kills(AWP 击杀)。传 map 只看一张图,不传则把整场各图累加。 |
| hltv_get_map_performanceB | 单图完整性能数据:两队 Kills/Deaths/Assists 对比、击杀矩阵三视角、以及每名选手逐回合的 round swing。给定 mapstatsid 直接拉,不需要 match_id。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 27 tools
Most tools map cleanly to a resource+action (news vs article, matches vs results vs live scores, team matches vs head-to-head), but several clusters overlap: hltv_get_match already returns player data that hltv_get_match_stats re-supplies, and hltv_get_kill_matrix is essentially a subset of hltv_get_map_performance. The image trio (player_photo, team_logo, match_photos) is also largely re-implemented by hltv_get_images_batch, and the three player-stats tools (event_stats, year_stats, career) require careful reading to distinguish.
Nearly every name follows the hltv_<verb>_<resource> snake_case pattern with a consistent 'get_' verb, which makes the set predictable. The only deviations are hltv_search (no get_) and hltv_backend_status (a status probe), both of which are natural exceptions rather than inconsistencies.
27 tools is heavy, though the domain is genuinely broad (players, teams, matches, events, news, images, live data). Some tools are redundant with each other (kill_matrix vs map_performance, images_batch vs the individual photo/logo tools), so trimming a handful would make the set tighter for the same coverage.
Coverage is strong across the lifecycle: search, player/team/event/match profiles, schedules, results, live scores, detailed stats, H2H, matchups, news, and asset fetching. Minor gaps remain — no player Top-20/ranking-list tool and no team map-pool or aggregate team-performance tool — but agents can work around these via existing endpoints.