Sever Agent

This mod lets your Minecraft server connect to AI service APIs

Sever Agent — AI Assistant for Minecraft Servers

An AI chatbot assistant for your Minecraft server. Just install it on the server (compatible with single-player / LAN / dedicated servers) — no client mod required.

Supported versions: Minecraft 1.21.1 · NeoForge

✨ Features

  • 🗨️ Chat with AI — players ask questions with /ai <message> or /ai ask <message>, and the answer is delivered back as a private message (/tell effect).
  • 🌐 Web Search — built-in presets that automatically declare web search to the connected model. Supports ChatGPT/OpenAI, DeepSeek, Zhipu GLM, Qwen (Tongyi), ERNIE (Wenxin), Doubao (Volcengine Ark) and more.
  • ⚙️ Hot-reload config — change everything at runtime via /ai config set <key> <value> or /ai reload, no server restart needed.
  • 🚫 Admin controls — ban/unban players from using the AI with /ai ban <player> / /ai unban <player>.
  • 🧠 Deep thinking support — optionally show the model's reasoning process (showThinking), if the model supports it.
  • 🔀 Smart queue & rate limiting — a shared server-wide FIFO queue with sliding-window rate limits and global cooldown; never floods your API key.
  • 📦 Full, non-streamed replies — waits for the complete response before sending; long answers are split automatically.
  • 🌍 Multi-language — Simplified/Traditional Chinese (HK & TW), Classical Chinese, English, Spanish, French, Arabic, Russian and Japanese.

📖 Commands

Command Description Permission
/ai <message> Ask the AI (same as /ai ask) Player
/ai ask <message> Ask the AI, reply via private message Player
/ai status Show API config, rate-limit & queue status Player
/ai reload Reload config from disk Admin (OP 2)
/ai config set <key> <value> Change config at runtime, applied immediately Admin (OP 2)
/ai ban <player> Ban a player from using the AI Admin (OP 2)
/ai unban <player> Unban a player Admin (OP 2)

⚙️ Configuration

Generated at config/severagent-server.toml on first run (NeoForge native TOML).

Key options (also changeable via /ai config set):

Key Description
apiKey Your API key (leave empty to disable AI)
baseUrl OpenAI-compatible endpoint URL
model Model name
webSearchEnabled Enable web search (default off)
webSearchMode Preset: chatgpt / deepseek / zhipu / qwen / ernie / doubao / search_field / search_enabled_field
windowMinutes Rate-limit window (only 1 / 5 / 10)
maxRequestsPerWindow Max requests per window
cooldownSeconds Global cooldown between requests
showThinking Show the model's thinking process
systemPrompt System prompt template ({player_name} placeholder)

🚀 Quick Start

/ai config set apiKey sk-xxxx
/ai config set webSearchEnabled true
/ai config set webSearchMode chatgpt
/ai 今天天气怎么样?

Note: Web search only works if the model/API you connect to actually supports it. DeepSeek's official API does not offer native web search — use it through a compatible gateway, or use the aggregator platform's preset (e.g. qwen) instead.



Sever Agent —— 我的世界服务器 AI 助手模组

为你的 Minecraft 服务器接入 AI 聊天助手。 仅需在服务端安装(兼容单人游戏 / 局域网开放 / 专用服务器),客户端无需安装

支持版本:Minecraft 1.21.1 · NeoForge

✨ 功能特性

  • 🗨️ 与 AI 对话 —— 玩家用 /ai <内容>/ai ask <内容> 提问,回答以私信(/tell 效果)回传。
  • 🌐 联网搜索 —— 内置主流大模型联网声明预设,自动生成对应平台的请求字段,支持 ChatGPT/OpenAI、DeepSeek、智谱 GLM、通义千问、文心一言、豆包(火山方舟) 等。
  • ⚙️ 配置热更新 —— 通过 /ai config set <键> <值>/ai reload 运行时修改配置,无需重启服务器
  • 🚫 管理员封禁 —— /ai ban <玩家> / /ai unban <玩家> 冻结/恢复玩家对 AI 的访问权限。
  • 🧠 深度思考支持 —— 可配置是否展示模型的思考过程(showThinking),适用于支持深度思考的模型。
  • 🔀 智能队列与限流 —— 全服共享 FIFO 请求队列,配合滑动时间窗口限流与全局冷却,避免 API 被并发打爆。
  • 📦 完整响应、非流式回传 —— 等待完整回复后再发送,绝不流式逐条截断;超长回复自动分片。
  • 🌍 多语言支持 —— 简体/繁体中文(香港、台湾)、文言文、英语、西班牙语、法语、阿拉伯语、俄语、日语。

📖 指令一览

指令 说明 权限
/ai <内容> 直接提问(等价于 /ai ask 玩家
/ai ask <内容> 向 AI 提问,结果私信回传 玩家
/ai status 查看 API 配置、限流与队列状态 玩家
/ai reload 从磁盘热重载配置 管理员(OP 2)
/ai config set <键> <值> 运行时修改配置并立即生效 管理员(OP 2)
/ai ban <玩家> 封禁玩家使用 AI 管理员(OP 2)
/ai unban <玩家> 解除封禁 管理员(OP 2)

⚙️ 配置说明

首次运行自动生成 config/severagent-server.toml(NeoForge 原生 TOML 配置),也可通过 /ai config set 修改:

说明
apiKey API 密钥(留空禁用 AI)
baseUrl 兼容 OpenAI 协议的接口地址
model 模型名称
webSearchEnabled 是否启用联网搜索(默认关闭)
webSearchMode 预设:chatgpt / deepseek / zhipu / qwen / ernie / doubao / search_field / search_enabled_field
windowMinutes 限流时间窗口(仅 1 / 5 / 10)
maxRequestsPerWindow 窗口内最大对话次数
cooldownSeconds 相邻请求全局冷却
showThinking 是否展示思考过程
systemPrompt 系统提示词模板({player_name} 占位符)

🚀 快速上手

/ai config set apiKey sk-xxxx
/ai config set webSearchEnabled true
/ai config set webSearchMode chatgpt
/ai 今天天气怎么样?

提示:联网功能是否生效取决于所连接模型/API 本身是否支持。DeepSeek 官方接口无原生联网,需通过兼容网关接入,或改用聚合平台预设(如 qwen)。


Building / 构建

Requires JDK 21.

./gradlew build

The built mod jar is at build/libs/severagent-<version>.jar.

License / 许可证

Licensed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE.

The Sever Agent Team

profile avatar
Owner
  • 11
    Projects
  • 3.6K
    Downloads

More from youyiMCView all

  • Create: Mass-Energy project image

    Create: Mass-Energy

    Added radio logistics and data storage to the Create mod based on the mass-energy formula

    • 52
    • September 4, 2026
  • HDD Mode project image

    HDD Mode

    Like most PS4-era console games, this mod provides HDD (mechanical hard drive) storage I/O strategy optimization for Minecraft 1.21.1.

    • 86
    • August 23, 2026
  • Voice Message project image

    Voice Message

    Send a Voice Message in the chatbox

    • 53
    • August 19, 2026
  • Benchmark Severside project image

    Benchmark Severside

    A lightweight, AI-readable server-side performance benchmark mod for NeoForge 1.21.1. Lightweight · Sampling-based CPU profiler · JSON/Text reports · No JavaScript rendering required

    • 24
    • August 19, 2026
  • Create: Mass-Energy project image

    Create: Mass-Energy

    Added radio logistics and data storage to the Create mod based on the mass-energy formula

    • 52
    • September 4, 2026
  • HDD Mode project image

    HDD Mode

    Like most PS4-era console games, this mod provides HDD (mechanical hard drive) storage I/O strategy optimization for Minecraft 1.21.1.

    • 86
    • August 23, 2026
  • Voice Message project image

    Voice Message

    Send a Voice Message in the chatbox

    • 53
    • August 19, 2026
  • Benchmark Severside project image

    Benchmark Severside

    A lightweight, AI-readable server-side performance benchmark mod for NeoForge 1.21.1. Lightweight · Sampling-based CPU profiler · JSON/Text reports · No JavaScript rendering required

    • 24
    • August 19, 2026