Skip to main content
Glama

CS2 RCON MCP

Python MCP 兼容 许可证:MIT

用于 CS2 RCON 管理的模型上下文协议服务器。

描述

该项目提供了一个模型上下文协议 (MCP) 服务器接口,用于通过 RCON 管理 CS2 游戏服务器。它允许通过标准化协议对 CS2 服务器进行远程控制和监控。

CS2 RCON MCP 演示

Related MCP server: Coolify MCP Server

特征

  • 使用自然语言管理您的 CS2 服务器

  • RCON命令执行

  • 服务器状态监控

  • 基于SSE的通信

  • Docker 支持

安装

pip install -e .

用法

运行服务器

python -m rcon_mcp

可用命令

  • rcon <command> :执行任何 RCON 命令

  • status :获取当前服务器状态

  • changelevel <map_name> :更改当前地图

  • mp_warmup_end :结束预热阶段

  • mp_restartgame 1 :重新开始游戏

  • 还有更多 CS2 服务器命令

环境变量

  • HOST :CS2服务器IP

  • SERVER_PORT :CS2 服务器端口

  • RCON_PASSWORD :RCON 密码

Docker(推荐)

从 GitHub Container Registry 拉取 Docker 镜像:

docker pull ghcr.io/v9rt3x/cs2-rcon-mcp:main

Docker 环境变量

使用Docker运行时,可以通过两种方式设置环境变量:

  1. 直接在命令中

    docker run -p 8080:8080 \
      -e HOST=your_server_ip \
      -e SERVER_PORT=your_server_port \
      -e RCON_PASSWORD=your_password \
      ghcr.io/v9rt3x/cs2-rcon-mcp:main
  2. 使用.server-env文件:创建一个名为.server-env的文件,其内容如下:

    HOST=your_server_ip
    SERVER_PORT=your_server_port
    RCON_PASSWORD=your_password

    然后像这样运行容器:

    docker run -p 8080:8080 --env-file .server-env ghcr.io/v9rt3x/cs2-rcon-mcp:main

这为用户提供了设置环境变量的替代方法,从而更容易管理密码等敏感信息。

从 Visual Studio Code 连接 (GitHub Copilot)

要配置 Visual Studio Code 以与 MCP 服务器配合使用,请按照以下步骤操作:

  1. 启动 MCP 服务器:在尝试从 VS Code 连接之前,请确保您的 MCP 服务器正在运行。

  2. 打开 Visual Studio Code :启动 VS Code 并确保已安装并配置 GitHub Copilot 扩展。

  3. 配置 GitHub Copilot

    • 将模式从“询问”更改为“代理”模式。

  4. 添加 MCP 服务器配置

    • 单击 Copilot 提示左上角的工具箱图标。

    • 选择“添加 MCP 服务器”并选择HTTP - 服务器发送事件的选项。

  5. 输入服务器网址

    • 对于 URL,请输入: http://localhost:8080/cs2server/sse 。这是 MCP 服务器的 SSE 连接端点。

备选方案:从 Cursor(或任何其他 MCP 客户端)连接

  1. 启动 MCP 服务器

  2. 通过创建或更新~/.cursor/mcp.json来配置 Cursor 的 MCP 设置:

    {
      "mcpServers": {
        "cs2server": {
          "url": "http://localhost:8080/cs2server/sse"
        }
      }
    }
  3. 在 Cursor 中,打开 MCP 面板(通常在侧边栏)

  4. 服务器应该使用配置的 URL 自动连接

一旦连接,您就可以使用自然语言管理您的服务器。

提示示例:

  1. “在服务器中添加 5 个机器人并在 de_dust2 上开始竞技比赛”

  2. “当前服务器状态如何?有多少玩家在线?我们在哪张地图上?”

祝你玩得开心!😊

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with Coolify instances through natural language, allowing management of servers, applications, databases, and deployments.
    4,079
    575
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables monitoring and remote control of Nvidia Jetson boards using natural language commands over a network connection.
    11
    -
  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that enables AI models like Claude to control TeamSpeak servers, allowing users to manage channels, send messages, configure permissions, and perform server administration through natural language commands.
    40
    10
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/v9rt3x/cs2-rcon-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server