Skip to main content
Glama

gmod-agent

Lets an LLM play Garry's Mod (Trouble in Terrorist Town) through MCP. It sees the game window, hears sounds with direction, listens and talks in voice chat, and moves, aims and shoots with virtual input. A local loop handles fast reactions (walking around walls, reloading); picking targets is always the model's call. Speech and sound recognition run locally.

Requirements

  • Linux with PipeWire and xdg-desktop-portal

  • KDE Plasma 6 or any X11 session for the focus guard (--no-focus-guard elsewhere)

  • Write access to /dev/uinput

  • Python 3.11+, PyGObject, GStreamer with the PipeWire plugin, ffmpeg

Related MCP server: mcp-garry-codes

Install

python -m venv --system-site-packages .venv
.venv/bin/pip install -e .

The first start downloads about 650 MB of speech and sound models.

Use

.venv/bin/gmod-agent --name <in-game name>   # start the game first, pick its window once
.venv/bin/gmod-agent play --duo              # Opus strategist + Sonnet pilot

play without --duo runs one model (--model haiku, or --client opencode). Interactive use: claude then /play in this folder. The web UI at http://127.0.0.1:8765/ shows the view, the model's intents and a pause button; --lan serves it to your phone.

Switching away from the game pauses all input. gmod-agent --help lists the options, gmod-agent train-sounds trains the sound recognizer on the game's own files.

Many servers don't allow bots. Check the rules of the server you play on, and edit gmod_agent/knowledge/server_rules.md for yours.

License

GPL-3.0-or-later

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to play local Windows games through low-level keyboard/mouse input, screen capture, OCR, and per-game profiles for semantic actions.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLMs to act as a real player on a Factorio Space Age server via scenario/RCON tools, a second real client, background keyboard/mouse input, memory observation, and WebUI control. It supports walking, mining, crafting, building, blueprint placement, and space-platform actions.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude to see and play Steam games on Windows by listing and launching titles, capturing game windows, sending timed keyboard and mouse input, and reading Source-engine state for exact aiming and control.
      GPL 3.0