civ-atlas
Integrates with OpenAI-compatible LLM APIs to let AI monarchs receive briefings and decide commands each round, supporting custom OpenAI-compatible endpoints as well as DeepSeek and Bailian.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
给 civ-atlas 的星球历史推演加一层「可被 AI 接管」的沙盒:MCP 工具层、AI 君主回合、小事件裁决层、可配置场与地块级演化、本地浏览器查看器。

本页图片均为程序模拟生成的地图,不是真实地图。
这是什么
上游 civ-atlas 是纯前端的世界生成 + 历史推演网站。这个仓库在它之上加了一层无头、可编排、可 AI 接管的沙盒:
不重写引擎:所有扩展都在编排层,通过「停止推演 → 下命令 → 接着推」的
playAPI 完成。引擎确定性不破:同一世界 + 同一命令史 = 逐字节一致的结果(21 组指纹对账全过)。
全程可回放:AI 下的每一道命令都进命令史,
civ_session_verify能重推对账。
Related MCP server: Fieldkit
新增了什么
模块 | 内容 |
MCP 工具层( | 零依赖 JSON-RPC stdio 服务,21 个 |
AI 君主( | 每个国家先拿简报,再由 LLM(或 mock)决定命令;每国每回合最多 3 条,编译成引擎命令后统一推演;支持 DeepSeek / 百炼 / 自定义 OpenAI 兼容 |
小事件裁决层( | 接官方 Jev |
DM 小决策与故事 | 天灾/小贸易真写进引擎; |
浏览器查看器( | 本地 |
可配置场( | 玩家给一份 spec 就能生成一组原生插件表:自己选密度、扩散、衰减、强度,以及影响哪些官方数值( |
地块级场 |
|
官方 .civplugin 加载器( | 在 MCP 的 CommonJS 产物里用 QuickJS 直装官方推演插件(文件或源码目录,最多 4 个),与内置场并列 |
魔力动态场( | 内置示例插件:魔脉扩散渗流 + 人口耗散,每 50 年一帧,影响城市容量;强度 0 时官方指纹逐字节不变 |
更多细节在 mcp/README.md。
快速开始
需要 Node.js 22+ 与 pnpm。
1. 跑原版网站
pnpm install
pnpm dev # http://localhost:5188Windows 下也可以双击根目录的 启动.bat。
2. 构建 MCP 工具层
# 本机没有 pwsh 可执行文件时用 powershell 调脚本
powershell -NoProfile -ExecutionPolicy Bypass -File mcp/build.ps1构建产物在 mcp/.build/,把 MCP 客户端指向 mcp/.build/mcp/server.js:
{
"mcpServers": {
"civ-atlas": {
"command": "node",
"args": ["<仓库路径>/mcp/.build/mcp/server.js"]
}
}
}3. 跑查看器
node mcp/.build/mcp/viewer.js --port 5190
# 浏览器打开 http://127.0.0.1:5190查看器只监听本机,世界/会话在内存里,关掉就没了;日志写在 mcp/.runs/(不提交)。
4. 一个最小 AI 对局
civ_world_create(seed必填,params.cells可选)civ_monarch_setup(polities: "all",mock: true先不联网)civ_session_open(worldId+startYear)civ_monarch_round反复跑;中途civ_state_get/civ_session_verify
想要场:civ_session_open 加 fields(可带 "unit": "tile");想要官方插件:加 plugins。
验证
# 13 个自检(引擎、协议、君主、press、DM、小事件、场、插件、地块场)
node mcp/.build/mcp/selftest.js
node mcp/.build/mcp/selftest-protocol.js
node mcp/.build/mcp/selftest-monarch.js
node mcp/.build/mcp/selftest-press.js
node mcp/.build/mcp/selftest-dm.js
node mcp/.build/mcp/selftest-dm-oracle.js
node mcp/.build/mcp/selftest-petty-core.js
node mcp/.build/mcp/selftest-petty-oracle.js
node mcp/.build/mcp/selftest-field.js
node mcp/.build/mcp/selftest-magic.js
node mcp/.build/mcp/selftest-field-plugin.js
node mcp/.build/mcp/selftest-plugin-loader.js
node mcp/.build/mcp/selftest-tile-field.js13 组自检全绿(含地块场 30/30)。
根
tsc --noEmit与examples/plugins类型检查均为 0 错误;已发布的插件接口第 1 版未改动。确定性指纹 21/21 一致(含改地形、干预、分段推演等 21 组,2026-11-11)。
截图
魔力动态场 | 地块级场 |
|
|

目录
mcp/ 无头工具层(MCP 服务、君主、DM、小事件、查看器、场渲染、自检)
src/gen/civ/ 引擎与官方推演插件接口(新增 magicPlugin / fieldPlugin / storyEngine 等)
ai-ruler/ 「AI 扮演统治者」独立原型(简报 → 决策 → 命令,含 mock)
docs/ 开发文档、截图
examples/plugins/ 官方格式推演插件示例
多Agent沙盒-改造计划.md 这次改造的设计与分阶段计划
UPSTREAM.md 上游 civ-atlas 原 README文档
mcp/README.md:MCP 工具、AI 君主、DM/小事件、场系统、插件加载器、查看器的详细用法与边界多Agent沙盒-改造计划.md:三阶段改造的目标、约束、验收标准ai-ruler/README.md:AI 统治者原型(可先不接 MCP 单独跑)docs/development.md:上游的引擎开发说明
许可与致谢
本项目基于 guaner-334/civ-atlas(AGPL-3.0),保留其全部历史与许可证。
本仓库的修改同样以 AGPL-3.0 发布;如果把它改完挂到网上给别人用,需要按 AGPL 公开修改。
引擎、星球生成、历史推演、原网站的所有功劳归上游作者与贡献者;这里新增的是多 Agent 编排、场系统、查看器与工具层。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that acts as a local stdio adapter for Civarium agent HTTP APIs, enabling interaction with game agents through tools like get_active_round, get_visible_state, submit_command, list_my_commands, and wait_next_round.15MIT
- AlicenseBqualityBmaintenanceEnables a small local AI model to discover, describe, run, undo, and verify deterministic tools over JSON-RPC on stdio, with previews and approval gates for changes.10AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to inspect and reverse-engineer large binaries through bounded stdio JSON-RPC 2.0 tools for graph queries, SSA facts, path solving, runtime grounding, and mod scaffolding.1AGPL 3.0

SimArch MCP Serverofficial
AlicenseBqualityBmaintenanceEnables AI tools and agents to form contract-bound organizations, execute persistent task DAGs with independent audits, score decisions with counterfactual trees, run time-compressed world simulations, and control an on-demand localhost dashboard via stdio tools.61Apache 2.0

