CCA Client (Console Command API Client) is the WebSocket server component that provides centralized command management for multiple MCDReforged servers. It acts as a relay between external clients (bots, APIs) and MCDR plugin instances.
This project is part of the Console Command API system:
- cca_client (this repo) - WebSocket server
- console_command_api - MCDR plugin
- Centralized WebSocket server for command relay
- Bearer token authentication for secure access
- Multi-server routing via unique
server_name - Command request/response message protocol
- Health check endpoint for monitoring
- HTTP REST API for additional operations
- Automatic plugin connection management
- Graceful handling of plugin disconnections
- Python 3.8+
websockets>=12.0pyyaml
- Click "Download zip" on the code page
- Extract to your desired location and double-click
start.batto run
On first startup, the server will:
- Generate a random token for authentication
- Create
config.yamlwith default settings - Display the token in the console
Important: Copy this token - you'll need it for plugin configuration. You can also view the token later in config.yaml.
[INFO] Token generated: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[INFO] Please add this token to the plugin's config.json
host: "0.0.0.0"
port: 8001
http_host: "0.0.0.0"
http_port: 8000
token: "" # Leave empty to auto-generate on first run
timeout: 30.0
max_connections: 100
log_level: "INFO"| Field | Type | Default | Description |
|---|---|---|---|
host |
string | 0.0.0.0 | Bind address. Use 127.0.0.1 for localhost only. |
port |
int | 8001 | WebSocket listen port |
http_host |
string | 0.0.0.0 | Bind address. Use 127.0.0.1 for localhost only. |
http_port |
int | 8000 | HTTP listen port |
token |
string | (auto) | Bearer token. Auto-generated if empty. |
timeout |
float | 30.0 | Command execution timeout (seconds). |
max_connections |
int | 100 | Max concurrent WebSocket connections. |
log_level |
string | INFO | Log level: DEBUG, INFO, WARNING, ERROR. |
You can view the API documentation at:
http://host:port/docs
MIT License. See LICENSE for details.
- console_command_api - MCDR plugin component
- MCDReforged - Minecraft server plugin framework