MC-Minder ๐ฎ
A smart management suite for Minecraft Fabric servers on Termux/Android. ไธไธชไธบ Termux/Android ไธ็ Minecraft Fabric ๆๅกๅจ่ฎพ่ฎก็ๆบ่ฝ็ฎก็ๅฅไปถใ
Note: This project was written with AI assistance. ๆฌ้กน็ฎ็ฑ AI ่พ ๅฉ็ผๅใ
Features ๅ่ฝ็นๆง
- Log Monitoring ๆฅๅฟ็ๆง: Real-time monitoring of server logs, parsing chat/join/leave/death events
- AI Chatbot AI ่ๅคฉๆบๅจไบบ: Support for OpenAI API and Ollama, triggered by
!prefix - RCON Communication RCON ้ไฟก: Native RCON protocol implementation for sending commands and messages
- Context Memory ไธไธๆ่ฎฐๅฟ: Per-player conversation history with automatic expiration
- HTTP API: RESTful API for status queries, history, and command execution
- Shell Scripts Shell ่ๆฌ: Integrated start/stop/monitor/backup management
Installation ๅฎ่ฃ
From crates.io
From Source
For Termux/Android (aarch64)
Usage ไฝฟ็จๆนๆณ
1. Directory Structure ็ฎๅฝ็ปๆ
MC_server/ # Server root directory
โโโ fabric-server.jar # Server core
โโโ start.sh # Startup script (copy from scripts/)
โโโ config.toml # Configuration file
โโโ logs/
โ โโโ latest.log
โโโ world/
โโโ mc-minder/ # This project
โโโ Cargo.toml
โโโ src/
โโโ target/release/mc-minder
2. Configuration ้ ็ฝฎ
Copy config.example.toml to your server root directory and rename to config.toml:
Edit config.toml:
[]
= "fabric-server.jar"
= "512M"
= "1G"
= "mc_server"
= "logs/latest.log"
[]
= "127.0.0.1"
= 25575
= "your_rcon_password"
[]
= "https://api.openai.com/v1/chat/completions"
= "sk-xxx"
= "gpt-3.5-turbo"
= "!"
= 150
= 0.7
[]
= false
= "http://localhost:11434/api/generate"
= "qwen:0.5b"
[]
= "world"
= "../backups"
= 7
[]
= ""
= ""
= true
3. Start the Server ๅฏๅจๆๅกๅจ
# Copy scripts to server root
# Start
# Stop
# Status
# Attach to console
4. AI Chat Usage AI ่ๅคฉไฝฟ็จ
Players can trigger AI responses by prefixing their message with !:
!hello
!help
!how to make a diamond sword?
HTTP API
| Endpoint | Method | Description |
|---|---|---|
/status |
GET | Get server status and uptime |
/history |
GET | Get conversation history |
/command |
POST | Execute RCON command |
Example:
# Get status
# Execute command
Project Structure ้กน็ฎ็ปๆ
mc-minder/
โโโ Cargo.toml # Rust project configuration
โโโ config.example.toml # Configuration example
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ .gitignore
โโโ scripts/
โ โโโ start.sh # Server startup script
โ โโโ backup.sh # Backup utility
โโโ src/
โโโ main.rs # Main entry point
โโโ lib.rs # Library exports
โโโ config.rs # Configuration parsing
โโโ log_monitor.rs # Log file monitoring
โโโ ai_client.rs # AI API client
โโโ rcon_client.rs # RCON protocol client
โโโ context.rs # Conversation context manager
โโโ http_api.rs # HTTP API server
Command Line Options ๅฝไปค่ก้้กน
mc-minder [OPTIONS]
Options:
-c, --config <PATH> Configuration file path [default: ../config.toml]
-v, --verbose Enable verbose logging
--http-port HTTP API port [default: 8080]
-h, --help Show help
-V, --version Show version
Backup ๅคไปฝ
# Create backup
# List backups
# Restore from backup
# Clean old backups
Requirements ็ณป็ป่ฆๆฑ
- Rust 1.70+
- Java (for Minecraft server)
- tmux (for session management)
- Optional: Ollama (for local AI)
Contributing ่ดก็ฎ
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License ่ฎธๅฏ่ฏ
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments ่ด่ฐข
- This project was written with AI assistance
- Inspired by the need for lightweight Minecraft server management on mobile devices
Author ไฝ่
- GitHub: @SharkMI-0x7E