CS2 RCON MCP

CS2 RCON MCP

By v9rt3x GitHub

CS2 RCON MCP - Server management tool for Counter-Strike 2

cs2 rcon
Overview

What is CS2 RCON MCP?

CS2 RCON MCP is a server management tool designed for Counter-Strike 2, providing a Model Context Protocol (MCP) interface for managing game servers via RCON.

How to use CS2 RCON MCP?

To use CS2 RCON MCP, install it using pip, run the server, and connect using an MCP client like Cursor to manage your CS2 server with natural language commands.

Key features of CS2 RCON MCP?

  • Manage your CS2 server using natural language commands
  • Execute RCON commands remotely
  • Monitor server status in real-time
  • Support for Server-Sent Events (SSE) communication
  • Docker support for easy deployment

Use cases of CS2 RCON MCP?

  1. Executing server commands like changing maps or restarting games.
  2. Monitoring server status and player counts.
  3. Managing game settings and configurations through natural language.

FAQ from CS2 RCON MCP?

  • Can I run CS2 RCON MCP in a Docker container?

Yes! It is recommended to run CS2 RCON MCP using Docker for easier management.

  • What commands can I execute with CS2 RCON MCP?

You can execute various RCON commands such as changing levels, restarting the game, and checking server status.

  • Is there a way to connect to CS2 RCON MCP from other clients?

Yes! You can connect using any MCP client by configuring the appropriate settings.

Content

CS2 RCON MCP

A Model Context Protocol server for CS2 RCON management.

Description

This project provides a Model Context Protocol (MCP) server interface for managing CS2 game servers via RCON. It allows remote control and monitoring of CS2 servers through a standardized protocol.

Features

  • Manage your CS2 server in natural language
  • RCON command execution
  • Server status monitoring
  • SSE-based communication
  • Docker support

Installation

pip install -e .

Usage

Running the Server

python -m rcon_mcp

Available Commands

  • rcon <command>: Execute any RCON command
  • status: Get current server status
  • changelevel <map_name>: Change the current map
  • mp_warmup_end: End the warmup phase
  • mp_restartgame 1: Restart the game
  • And many more CS2 server commands

Environment Variables

  • HOST: CS2 server IP
  • SERVER_PORT: CS2 server port
  • RCON_PASSWORD: RCON password

Build and run with Docker:

docker build -t rcon-mcp .
docker run -p 8080:8080 rcon-mcp

Docker Environment Variables

When running with Docker, you can set the environment variables:

docker run -p 8080:8080 \
  -e HOST=your_server_ip \
  -e SERVER_PORT=your_server_port \
  -e RCON_PASSWORD=your_password \
  rcon-mcp

Connecting from Cursor (or any other MCP-Client)

  1. Start the MCP server (either directly or via Docker)
  2. Configure Cursor's MCP settings by creating or updating ~/.cursor/mcp.json:
    {
      "mcpServers": {
        "cs2server": {
          "url": "http://localhost:8080/cs2server/sse"
        }
      }
    }
    
  3. In Cursor, open the MCP panel (usually in the sidebar)
  4. The server should automatically connect using the configured URL

Once connected, you can manage your server in natural language:

Example prompts:

  1. "Add 5 bots to the server and start a competitive match on de_dust2"
  2. "What's the current server status? How many players are connected and what map are we on?"

Happy fragging! 😊

No tools information available.
No content found.