s2docs MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| S2DOCS_DB | No | The SQLite index file. | $S2DOCS_DATA_DIR/s2docs.db |
| S2DOCS_DATA_DIR | No | Directory holding the index, workspace and captured logs. Never relative to the cwd. | ./data when running from a source checkout, otherwise a per-user directory (~/.local/share/s2docs, or %LOCALAPPDATA%\s2docs on Windows) |
| S2DOCS_REAP_SEC | No | Seconds between orphan-run reaper passes (<= 0 disables the periodic task). | 60 |
| S2DOCS_STUCK_SEC | No | Phase age (seconds) after which a fresh host lock reads STUCK. | 1800 |
| S2DOCS_WORKSPACE | No | Local addon sources written by the build tools. | $S2DOCS_DATA_DIR/workspace |
| S2DOCS_AUTH_TOKEN | No | When set, mutating /api requests and every /mcp request must present this token. Read once at startup; restart the server to rotate it. With the variable unset the behaviour is unchanged: no auth. | unset (auth off) |
| S2DOCS_STUCK_PHASES | No | JSON object of per-phase stuck thresholds, merged over the built-in defaults. | built-in per-phase defaults |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
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 |
|---|---|
| list_gamesA | List supported games with their currently indexed build and patch version. |
| server_infoA | This server's DB identity: db_path, data_dir, pid, started_at and version, plus status. |
| search_docsA | Full-text search across everything. Each hit's |
| get_convarA | Get a console variable or command: default, min/max, flags (cheat, replicated, ...) and help text. |
| list_convarsB | List console variables/commands, filtered by substring and/or flag. |
| get_entityA | Get a Hammer entity: keyvalues (with choices), inputs and outputs, including inherited ones.
|
| find_entities_with_ioA | Find entity classes (including base classes) that declare an input or output with this name. Subclasses inherit it too, so check candidates with get_entity. |
| get_schema_classA | Get an engine schema class or enum: fields with types, defaults and metadata, the inheritance chain and direct subclasses. Use it for networked fields, VData keys (Deadlock abilities) and plugin offsets. |
| list_schema_classesB | List schema classes/enums by name substring, module, kind or declared field. |
| get_game_eventA | Get a game event's fields and types (the effective definition after core/game/mod overrides). |
| list_game_eventsB | List game events, optionally filtered by a substring of the name or description. |
| get_script_apiA | Look up the CS2 cs_script (point_script) JavaScript API. A type name returns the type with all
members, including inherited ones. Anything else returns the matching members with signature and docs.
|
| list_script_typesA | List every top-level cs_script type: the Instance const, classes, interfaces, enums and type aliases. |
| search_pulseC | Search Pulse (Valve's visual scripting) node bindings: entity inputs/outputs and functions. |
| diff_buildsA | Show what changed between two ingested builds, at member granularity: one row per added/
removed/changed schema field, entity member, game-event field, script symbol, convar, Pulse
binding or Hammer class. Each entry carries |
| list_examplesA | List example scripts (Valve's cs_script_demo samples) with the API each one uses. |
| get_exampleA | Get the full source of an example script. Prefer adapting these Valve-written patterns. |
| get_docA | Get a community documentation page (source2.wiki) as Markdown, with its URL and license for citation. |
| list_docsA | Browse community documentation pages (titles, URLs) without bodies. |
| validate_cs_scriptA | Type-check a cs_script with the TypeScript compiler against this build's Valve point_script.d.ts.
Errors with category |
| validate_cfgA | Check every command in a .cfg against the indexed convars/commands: unknown names (with suggestions), out-of-range values, cheat/devonly flags, and client-vs-server context. |
| scaffold_addonA | Create a new addon in the local workspace (content/csgo_addons// with scripts/, maps/, materials/, ...), a starter cs_script, Valve's point_script.d.ts + tsconfig.json, and a README with the Hammer setup steps. Fails if the addon already exists. |
| build_modelA | Write a Source 2 model document (.vmdl) for a mesh that is already inside the addon. |
| list_addonsB | List addons in the local workspace. |
| get_addonB | Show an addon's local root and file list. |
| read_addon_fileB | Read a text file from an addon in the workspace. |
| write_addon_fileA | Write a text source file (.js, .cfg, .vmat, .vdata, panorama .xml/.css, ...) into an addon. Binary/compiled assets are produced by Valve's tools, not written here. Use overwrite=true to replace. |
| list_workflowsA | List orchestration workflows: multi-step recipes (research → design → build → validate → test → document) that chain this server's tools and prompts. Start one with start_project. |
| start_projectA | Start a persistent orchestration project and get the first ready step(s). Progress is stored on the server, so any later session can continue with next_step(project_id). |
| next_stepA | Get the ready step(s) of a project: instructions, tools to use, rendered prompt text and the gate the server will check when the step is marked done. |
| update_stepA | Record progress on a step and get the next brief. Marking 'done' runs the step's gate (e.g. all addon scripts must type-check); if it fails you get the problems back — fix them and retry. |
| get_projectB | Full project state: every step's status, notes, artifacts and recent events. |
| list_projectsB | List orchestration projects (most recently updated first). |
| get_prompt_textA | Render one of this server's prompts as text, for clients that can't fetch MCP prompts mid-task. |
| list_hostsA | List registered test/build hosts with their facts (shell, GPU, paths) and current lock state.
CHECK THIS before driving any host: a fresh lock means another session/workstream owns it.
Each lock carries |
| get_hostB | One host's registry entry: ssh target, shell flavor, probed facts, and lock. |
| register_hostA | Register (or update) a test/build host. Upsert: omitted fields keep their previous values. |
| probe_hostA | SSH to the host, run the probe script (GPU, RAM, processes, CS2 path/build) and store the facts. Use before planning work on a host — e.g. to see if a game or a heavy GPU process is running. |
| claim_hostA | Claim exclusive use of a host. Fails if another owner holds a fresh lock — a stale lock
(heartbeat older than its TTL, e.g. from a crashed worker) is taken over automatically.
Always report a |
| heartbeat_hostA | Refresh your lock's heartbeat so it doesn't go stale mid-task. Heartbeating the SAME phase
does not clear stuck-ness (that is the point); report a new |
| release_hostA | Release a host lock. Always call this when finished with a host. |
| build_startA | Start a server-owned build run on a host: acquires the host lease, runs the command over SSH and
returns a run id immediately. Do NOT poll with sleeps — use build_wait(run_id) or build_status. The
host lease is released automatically when the run reaches a terminal status. The lease's phase is
the run |
| build_statusA | One build run's record: status, exit code, parsed summary counts, material guard and artifacts. |
| build_logA | Tail a build run's log. The log is UTF-16 (resourcecompiler) — this decodes it for you,
returning the detected |
| build_waitA | Block (server-side, no client sleep loop) until the run finishes, then return its record. Raises if it is still running after timeout_sec. With strict_materials, a run whose log has material-guard warnings is an error even though its status is 'succeeded'. |
| build_cancelA | Cancel a run: mark it cancelled and release its host lease (terminates the process when this server owns it). |
| build_listA | Recent build runs (newest first), optionally one host and/or active only. |
| deploy_pushA | Copy files to a host and verify what landed (Get-FileHash over SSH). Returns a deploy id whose entries carry the server-checked md5 + verified flags. Call deploy_verify later to re-check. |
| deploy_verifyB | Re-check a recorded deployment's MD5s on the host and update its status. |
| deploy_listB | Recent deployments (newest first), optionally one host. |
| add_evidenceA | Record structured evidence for a step. This is what the |
| list_evidenceA | List evidence rows (newest first), optionally filtered by project, step and/or kind. |
| test_startA | Start a server-side test session (state=running). Claims the host lease when a host is given.
Mirror the state onto the in-game TEST STATUS HUD yourself via |
| test_stepA | Set the running session's current step (the HUD strip's |
| test_finishA | Finish a running session pass/fail (the HUD's |
| test_clearB | Dismiss a session ( |
| test_statusA | One test run's record, or the current active run when no id is given. |
| list_test_runsB | Recent test sessions (newest first), optionally filtered by state. |
| job_listB | Jobs newest first. |
| job_getB | One job with its full timeline (events), links to test runs/builds/deploys/evidence and artifacts. |
| job_screenshotsA | A job's screenshots tied to their step and verdict (seq, step, reason, url, web_url, verdict,
dimensions) — the image context a reviewer pulls after a run. Filter by |
| job_enqueueA | Enqueue a job (validated intake -> queued). The intake is the gate: every missing required field
comes back in one error with a field list. Set |
| job_nextA | The head queued job for a host, only when that host's lease is free. Errors (with the holder) when a fresh lock blocks it, and when the host's queue is empty. |
| job_assignB | Set (or move) a queued job's host and queue order. |
| job_startB | queued -> running, recording the worker and started_at. A second call is a conflict. |
| job_eventA | Append one timeline event. |
| job_attachA | Copy a local file into the job's artifacts (MCP runs on the Mac). Append-only: no overwrite.
Images also record a |
| job_request_screenshotA | Ask the runner for a screenshot: an info event plus |
| job_linkB | Attach a canonical record the job is about (a test run, build, deploy, evidence row or project). |
| job_verdictA | Answer the running job's current step with a human verdict (pass | fail | skip). Writes a
human-confirm evidence row through the same path as |
| job_finishA | Close out a running/queued job. Gate: |
| job_restatusA | Correct a FINISHED job's terminal status (terminal -> terminal), for a mis-recorded close-out
— e.g. a run that finished 'passed' but never got a verdict. |
| job_cancelA | queued/running -> cancelled; the reason is recorded as a timeline event. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| cs2_script | Author a JavaScript cs_script for a CS2 map, grounded in the current point_script.d.ts API. |
| hammer_io_logic | Build map logic from entities, keyvalues and input/output connections (no scripting). |
| server_config | Produce a .cfg of convars/commands for a goal, verified against the convar index. |
| deadlock_mod | Plan a Deadlock addon (VPK) or server plugin using schema/VData and entity data. |
| orchestrate | Kick off a persistent, gated project chaining the research, prompt, build and validate tools. |
| cs2_map_rebuild | A pre-flight checklist for decompile/rebuild work, baking in reserved paths, nodraw physics-surface materials and the material guard. |
| explain_symbol | Explain a convar, entity, schema class, event or script API symbol with sources. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| point_script.d.ts | Valve's TypeScript declarations for cs_script. Copy next to your scripts for IntelliSense. |
| cs_script tsconfig.json | Valve's tsconfig.json for cs_script editing (target ES version used by CS2). |
TDQS
Scored across 73 tools
Most tools target distinct resources and actions, and the long descriptions clarify boundaries between docs, builds, jobs, hosts, tests, and projects. However, with 73 tools there is meaningful cross-domain overlap and potential confusion among job/test/project/evidence lifecycle tools and among related build/deploy/test list/status/finish operations.
All names use snake_case, which helps readability, and many tools are grouped by domain prefixes such as job_, build_, deploy_, and test_. But the convention mixes noun_verb domain-prefixed names (job_list, build_start) with generic verb_noun names (list_projects, get_host), so it is readable but not fully consistent.
The server exposes 73 tools, which is far beyond a well-scoped set for a single MCP server. Even though the surface spans several subdomains, the count is extreme and creates a heavy selection and maintenance burden.
The surface is broad and covers most major workflows: documentation lookup, schema/entity/script queries, addon creation and editing, build/deploy/test lifecycle, host management, jobs, evidence, and projects. Minor gaps remain, such as addon/file deletion or project cleanup operations, but core workflows are well covered.