mcp-gmod-rcon
v1.0.16
Published
A Model Context Protocol (MCP) server that provides WM_COPYDATA access to Garry's Mod servers
Maintainers
Readme
MCP GMod RCON
A Model Context Protocol (MCP) server that provides RCON access to Garry's Mod servers.
Features
- Connect to Garry's Mod servers via RCON
- Execute server commands remotely
- Execute Lua code on the server
- Real-time response handling
Installation
npm install mcp-gmod-rconUsage
To use this MCP server, you need to configure it in your MCP client configuration.
Prerequisites
Launch Garry's Mod with RCON enabled:
gmod.exe -usercon -sw -condebug +rcon_password YOUR_RCON_PASSWORDSet the following environment variables:
RCON_HOST: IP address of the GMod server (e.g., "192.168.1.100")RCON_PORT: RCON port (default: 27015)RCON_PASSWORD: RCON password set on the serverGMOD_LOG_PATH: Path to GMod console.log (optional, for additional logging)
Configuration
Add this to your MCP client configuration (usually in ~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"gmod-rcon": {
"command": "node",
"args": ["path/to/node_modules/mcp-gmod-rcon/dist/index.js"],
"env": {
"RCON_HOST": "192.168.1.100",
"RCON_PORT": "27015",
"RCON_PASSWORD": "your_rcon_password",
"GMOD_LOG_PATH": "C:/Program Files (x86)/Steam/steamapps/common/GarrysMod/garrysmod/console.log"
}
}
}
}Available Tools
execute_command
Execute any server command on the GMod server.
- command: The command to execute (string, required)
Examples:
"status"- Get server status and player list"map gm_flatgrass"- Change the map"kick player_name"- Kick a player
execute_lua
Execute Lua code on the GMod server.
- code: The Lua code to execute (string, required)
Examples:
"print(#player.GetAll())"- Print number of players"for _, ply in ipairs(player.GetAll()) do ply:ChatPrint('Hello!') end"- Send chat message to all players"game.ConsoleCommand('sv_gravity 200\\n')"- Change server gravity via Lua
Development
# Install dependencies
npm install
# Build
npm run build
# Test
npm testLicense
ISC
