Query a Source-engine game server's status, player list, and rules over UDP using the A2S protocol for a server browser

domain: developer.valvesoftware.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Send an A2S_INFO request ('T' + "Source Engine Query\0") to the server's UDP listen port and parse the single-packet ('I' header) or multi-packet (-2 header) response
  2. If the server replies with an S2C_CHALLENGE ('A') packet instead of data, resend the original query appended with the returned challenge number
  3. For A2S_PLAYER and A2S_RULES, first send the query with challenge -1 to obtain a challenge number, then repeat the query with that challenge to get player/rule data
  4. Reassemble multi-packet responses using the packet's ID and Number/Total fields, since UDP packets can arrive out of order
  5. Handle the legacy GoldSource response format ('m' header) separately from the newer Source format when the server's AppID indicates an older engine

Known gotchas

Related routes

Build a server browser with NAT traversal fallback (STUN, then TURN/relay) for a peer-hosted indie multiplayer game
datatracker.ietf.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans