bettergi-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bettergi-mcp 帮我启动原神并跑一条龙日常"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bettergi-mcp
简体中文 | English
BetterGI(更好的原神)的 MCP stdio 服务器:把「启动游戏、跑一条龙、采集材料、打秘境、改配置/队伍、查战果与失败原因」这些操作包成 29 个 bgi_* 工具,让 DSH / Claude Code / 任何支持 MCP 的 agent 用一句话直接指挥本机 BetterGI。
零第三方依赖(Node ≥ 18),单文件服务器;所有真实操作都转发给已经验证过的 bettergi-control 技能脚本,MCP 层只负责参数校验、结构化返回,以及官方脚本仓库的检索/下载。
能力一览
分组 | 工具 |
体检 / 状态 |
|
启动 / 关闭 |
|
一条龙 |
|
配置组 |
|
采集 / 路线 |
|
JS 脚本 |
|
配置 |
|
排错 |
|
bgi_collect_now { material: "星螺", confirm: true } 是最省事的一个:找路线 → 缺则下载 → 建配置组 → 检查窗口 → 触发 → 轮询到"真的开始跑了"。
Related MCP server: HMCL MCP Server
环境要求
Windows + Node.js ≥ 18
本机已安装 BetterGI(默认
D:\software\BetterGI,可用BETTERGI_ROOT覆盖)bettergi-control技能(~/.agents/skills/bettergi-control/,提供被复用的 15 个 PowerShell 脚本;可用BETTERGI_SKILL_DIR覆盖)游戏需可见且前台、16:9 ≥ 1920×1080;没有后台挂机
安装
git clone https://github.com/gychen-NJU/bettergi-mcp.git不需要 npm install(零依赖)。
在 DSH 里注册
编辑对应 profile 的 cordis.patch.yml(例如 ~/.dsh/profiles/desktop/cordis.patch.yml),在末尾的 insert 段加一行:
- insert:
- id: bettergi-mcp
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: bettergi
transport: stdio
command: node
args:
- '<clone 下来的目录>/bettergi-mcp.mjs'
cwd: '<clone 下来的目录>'
failOnStartupError: false重启 DSH 后即可在会话里看到 mcp__bettergi__* 工具。
在 Claude Code / 其它 MCP 客户端里注册
// .mcp.json 或等价配置
{
"mcpServers": {
"bettergi": {
"command": "node",
"args": ["<clone 下来的目录>/bettergi-mcp.mjs"],
"env": { "BETTERGI_ROOT": "D:\\software\\BetterGI" }
}
}
}交给 Agent 安装(一句话)
帮我把 https://github.com/gychen-NJU/bettergi-mcp 装进当前 DSH:clone 到本地,在 profile 的 cordis.patch.yml 里加一条 serverName=bettergi 的 MCP stdio 声明指向 bettergi-mcp.mjs,重启后确认 mcp__bettergi__bgi_doctor 能调通。
环境变量
变量 | 默认 | 说明 |
|
| BetterGI 安装根( |
|
| 被复用的技能脚本目录 |
| GitHub raw | 官方脚本仓库 raw 前缀(CNB 在部分网络下解析失败) |
安全与边界
不读写游戏内存、不改游戏文件;只驱动 BetterGI 与它的配置/日志。
硬要求:BetterGI 运行中时命令行参数会被单实例吃掉;改配置必须先退出 BetterGI。
执行类工具内置 运行闸门(
run-gate.mjs):BetterGI 占用、窗口 <1080p、非 16:9、最小化等"注定白跑"的情况直接拦下;确需强行放行用force:true。长任务一律「发起 → 轮询」:单次工具调用被夹在 50 秒内,跑完用
bgi_watch/bgi_wait_milestone确认。账号风险由使用方式决定:官方条款把第三方软件 / 模拟操作列为封号理由之一,低调使用。
自测
node --check bettergi-mcp.mjs
node test-gate.mjs # 运行闸门纯函数单测(不需要 BetterGI 在跑)
node selftest.mjs --quiet # MCP 自检(只读)
powershell -NoProfile -File gate-check.ps1 # 全量验收(需要本机 BetterGI)cache/ 是官方仓库索引缓存(自动生成,已在 .gitignore 里)。
相关项目
dsh-game-daily:DSH 设置页里的「游戏日常」插件。原神的每日代理需要这个 MCP;插件会在缺失时自动把
bettergi-mcp.mjs下载到$DSH_HOME/game-daily/vendor/bettergi-mcp/,并提示你补 profile 注册行。
许可
MIT © 2026 gychen-NJU
Available Tools
29 toolsbgi_add_group_to_onedragonA
把一个配置组接入「一条龙」每日流程(离线改 User\OneDragon<配置>.json:新增 GUID 条目到 TaskDefinitions/TaskEnabledList/TaskOrder)。会改变每日自动化内容,需 confirm=true;会自动备份。
Inputs: group (required), config, confirm, position.
bgi_closeA
关闭原神 / BetterGI(先优雅关闭、必要时强制),并如实报告是否真的关掉。改 User\config.json 或 User\OneDragon*.json 之前必须先退出 BetterGI(它运行中会整份回写覆盖)。BetterGI 若以管理员权限运行,普通权限关不掉——会明确报告权限不足并给出替代路径。需 confirm:true(或用 dry_run 预览)。
Inputs: force, target, confirm, dry_run.
bgi_collect_materialA
一键采集材料(旗舰工具):在官方仓库找到该材料的路线 → 缺则下载到 User\AutoPathing → 生成配置组「采集-<材料>」→(run=true 时)立即触发执行。
Inputs: material (required), run, overwrite, include_related.
bgi_collect_nowA
「说一句就采集」的一步到位入口:确保路线与配置组就绪 → 检查/准备游戏窗口(最小化或不在前台时尝试还原并置前)→ 触发配置组 → 轮询到"真的开始跑了"(里程碑)。会真正启动 BetterGI 并接管游戏操作,需 confirm=true。dry_run=true 只做准备与汇报。
Inputs: material (required), force, confirm, dry_run, +1 more.
bgi_create_groupA
新建或向既有配置组追加项目。Pathing 项目的 target 用「子目录/文件名.json」或「文件名」。
Inputs: name (required), targets (required), type, folder.
bgi_create_onedragonA
新建一个「一条龙」配置(复制现有配置或从空模板),并可选设置任务顺序。注意:命令行 startOneDragon <名> 按 JSON 里的 Name 字段匹配(Ordinal 精确比较),不是按文件名 → 本工具会同时把文件名与 Name 设成同一个名字,并在发现重名时拒绝(重名会让 BetterGI 随机命中其中一个)。
Inputs: config (required), from, tasks, dry_run, +1 more.
bgi_doctorA
开跑前体检(只读,不启动任何进程):安装与关键配置、进程/窗口就绪(可见+前台+16:9≥1080P)、显示分辨率与 DPI 能否容纳 1920×1080、安装包识别资源分辨率、路线资产、配置组里每个 Pathing 项目对应的文件是否真的存在(缺失会被静默跳过)、一条龙配置与收工动作、MCP/包装器等闭环件。跑采集或秘境前先调它。
Inputs: material.
bgi_find_routesA
在官方脚本仓库(babalae/bettergi-scripts-list)里检索地图追踪路线,例如「星螺」→ 5 条璃月路线。download=true 时下载到 User\AutoPathing。
Inputs: material (required), kind, download, overwrite.
bgi_focus_gameA
跑自动化前的窗口准备(会改变你当前焦点):把原神从最小化还原并尝试切到前台,回报客户区尺寸、是否 16:9、是否 ≥1080P、是否在前台。采集/秘境要求「可见 + 前台 + 16:9 ≥1920×1080」,不满足时自动化会失败或暂停。
Inputs: no_focus.
bgi_install_jsA
把官方仓库的一个 JS 脚本整目录安装到 User\JsScript<名字>\(含 manifest.json、main.js 与资源)。装完可用 bgi_run_js 建组执行,或用 bgi_add_group_to_onedragon 接进每日一条龙。
Inputs: name (required), overwrite.
bgi_js_settingsA
读写官方 JS 脚本的设置(它们不落盘到脚本目录,而是存在配置组项目的 jsScriptSettingsObject 里)。不带 set 时列出全部可配置项与当前值;带 set 时先按 settings.json 的 schema 校验(select 必须在 options 内、checkbox 转布尔)再写回配置组并自动备份。
Inputs: name (required), set.
bgi_list_groupsA
列出所有配置组及其项目(名字/类型/状态)。
Inputs: no named parameters.
bgi_list_js_scriptsB
列出官方仓库里的 JS 脚本(js/ 分区,本机 2026-10-16 实测有 144 个,例如 AutoCommission 自动每日委托、使用历练点完成每日委托、AutoRefinedCondensationResin 自动合成浓缩树脂)。detail=true 时会拉该脚本的 manifest.json 显示名称/说明/版本。
Inputs: detail, filter.
bgi_list_pathingA
列出本机已安装的地图追踪路径(User\AutoPathing***.json),可按关键词过滤。
Inputs: filter, extra_dirs.
bgi_list_strategiesA
列出本机战斗策略(User\AutoFight***.txt),并可按队伍预测「根据队伍自动选择」会选中哪一份。
Inputs: team.
bgi_log_searchA
在当天 BetterGI 日志里定向检索(诊断"为什么失败"的取证工具):按级别/正则/时间窗/任务关键字过滤,返回带行号、时间戳、类名与消息正文的命中行。比 bgi_status 的日志尾部强得多。
Inputs: tail, task, levels, pattern, +1 more.
bgi_repo_indexB
浏览官方脚本仓库目录树(用于发现可用的路线/JS 脚本/战斗策略)。
Inputs: kind, limit, filter.
bgi_resultsA
战果统计(只读):某天/最近几天配置组里每条路线跑成没、各自花了多久、成功/失败计数与失败清单,并附刷取统计(FarmingPlan 小怪/精英数)与断点续跑进度(task_progress)。注意:一条龙不写执行记录,只有配置组任务 / --startGroups / --TaskProgress 会写。
Inputs: date, days, group, material.
bgi_run_groupsA
按顺序执行一个或多个「配置组」(User\ScriptGroup<名>.json)——采集/锄地/自定义脚本编排都走这里。立即返回;执行过程与成败用 bgi_watch 轮询。
Inputs: groups (required), force, dry_run, wait_seconds.
bgi_run_jsB
一键跑官方 JS 脚本:确保已安装 → 生成同名配置组(单个 Javascript 项目)→(run=true 时)触发执行。JS 脚本是 BetterGI 能力最强的扩展面(自动委托、树脂、纪行、尘歌壶、抽卡兑换等)。
Inputs: name (required), run, overwrite.
bgi_run_one_dragonA
跑「一条龙」日常配置(本机配置名:日常 = 领取邮件→合成树脂→领取每日奖励→自动秘境)。要求 BetterGI 未在运行(单实例会吞掉参数);干完就返回,成败用 bgi_watch 轮询。
Inputs: force, config, dry_run, wait_seconds.
bgi_run_task_progressA
从上次中断处续跑配置组(等价 BetterGI.exe --TaskProgress <组名|latest>)——采集/长任务被打断后用。要求 BetterGI 未在运行。
Inputs: name, force.
bgi_schedule_infoB
调度与运行一览(只读):计划任务的触发时间/下次/上次/返回码/RunLevel、包装器日志尾部与今天是否已触发、一条龙配置与任务顺序、每个配置组是否已接进一条龙、最近几次运行的收尾时间。
Inputs: no named parameters.
bgi_set_configA
安全修改 User\config.json(父.子=值)。要求 BetterGI 已退出;会自动备份并回读校验。dry_run=true 只预览。
Inputs: changes (required), dry_run.
bgi_set_onedragonA
改「一条龙」配置(User\OneDragon<名>.json):秘境/队伍/每日奖励队伍/合成台地区/冒险家协会地区/收工动作/保留原粹/按星期换秘境/任务顺序与启停。要求 BetterGI 未运行(它会把文件回写覆盖);自动备份并回显改动前后。dry_run=true 只预览。
Inputs: tasks, config, dry_run, party_name, +9 more.
bgi_start_gameA
启动原神与 BetterGI 截图器(等价于 BetterGI.exe start),会联动启动游戏并自动进游戏。注意:游戏真正进到可操作状态要 1-2 分钟,超出单次调用上限(本机 MCP 约 60 秒)时会返回「仍在启动中」——这不算失败,随后用 bgi_status 复查即可。
Inputs: dry_run, wait_seconds.
bgi_statusA
BetterGI 只读状态总览:进程/窗口/关键配置/一条龙配置/最新日志尾部/进度文件。任何操作前先调用它确认状态。
Inputs: json.
bgi_wait_milestoneA
等待日志出现某个里程碑(确认"真的跑起来了",而不只是"已发起"):capturer_ready(截图器就绪)/ dragon_started / group_started / task_started / domain_entered(真进秘境)/ combat_matched / script_finished / finished(整体收尾)/ any_error。单次最多等 50 秒,超时就再调一次。
Inputs: pattern, milestone, wait_seconds, since_minutes.
bgi_watchA
观察并判定成败(只读,可反复调用)。默认立即返回当前判定;verdict=incomplete 表示还没收尾,隔一会儿再调一次(或用 wait_seconds 在单次调用内最多轮询 50 秒)。只把「本次运行」的 ERR 计入失败,更早运行的 ERR 单独列出。
Inputs: mode, wait_seconds, since_minutes.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Most tools map to distinct resources/actions, but bgi_collect_now and bgi_collect_material both present as 'one-click collect' entries with overlapping trigger-and-watch behavior, and bgi_watch vs bgi_wait_milestone both poll for run phase/completion. The read-only state tools (bgi_status, bgi_doctor, bgi_schedule_info, bgi_watch) are individually described but require reading carefully to pick correctly.
Nearly all tools share a bgi_ prefix followed by verb_noun (list_groups, run_js, create_group, set_config, install_js, collect_material). A few benign deviations exist — bgi_status, bgi_results, bgi_doctor, bgi_watch are noun-only and bgi_log_search inverts the verb/noun order — but the overall convention is clear and predictable.
29 tools is on the heavy side for the domain; while the underlying surface (execution, config editing, repo browsing, installs, diagnostics) is genuinely broad, the count brushes against the point where several read-only/status tools feel redundant. It sits at the uncomfortable edge between justified breadth and over-exposure.
The lifecycle is well covered: status/doctor diagnostics, game start, multiple run modes, milestone/verdict polling, results and log search, config read/write, group and one-dragon creation, script install, and close. Gaps are minor — there is no explicit cancel-stop for an in-flight run (must use bgi_close) and no delete/uninstall tools for groups, one-dragon configs, or installed scripts.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server that gives an LLM agent standalone-equivalent control over a Mineflayer Minecraft bot — movement, mining, crafting, inventory, combat, containers, chat, and much more — exposed as 110 strongly-typed tools across 23 groups, with full bot lifecycle management and dual (poll + push) event streaming.142 npm8MIT
- FlicenseAqualityDmaintenanceMCP server that lets AI agents drive HMCL (Hello Minecraft! Launcher) programmatically to install Minecraft versions, search/download/import modpacks from Modrinth/CurseForge, and launch/stop the game.132-
- AlicenseNot gradedqualityBmaintenanceMCP server providing AI-friendly computer-use primitives (capture, detect, click) to let LLM agents drive desktop GUI applications on Windows, macOS, and Linux.2MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that equips AI agents with real-world tools including file operations, read-only MySQL queries, web summarization, safe calculations, and system info. It uses stdio transport and enforces safety guardrails like SELECT-only database access and AST-based math evaluation.MIT