接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
An MCP Server for Arknights fan creation (同人創作) AI agents. Powered by the PRTS Wiki MediaWiki API and auto-synced operator game data, it gives any MCP-compatible client — Claude Desktop, Claude Code, Chatbox, and more — live access to lore, operator archives, and voice lines from the world of Terra.
Starting with 3.x, PRTS-MCP is unified into a single native Rust implementation at the repository root, with its C regular-expression engine statically linked into prebuilt binaries. All game-data queries, Wiki requests, and MCP protocol handling run in Rust:
Node >=22, npm >=10) that invokes the platform-matched Rust binary; Bun is not required.On npm, install prts-mcp (or pin 3.1.1). If you want to keep existing 2.x command names (prts-mcp-ts, prts-mcp-ts-bun, prts-mcp-ts-stdio), install prts-mcp-ts; from 3.0.0 it is also backed by the Rust binary. To stay on 2.8.x, pin [email protected] or ghcr.io/3akhp/prts-mcp:2. See the roadmap, 2.x → 3.0 migration guide, and 2.8.1 documentation.
Prebuilt binaries are provided for Linux x64/ARM64 (glibc >= 2.28), Windows x64, and macOS ARM64/x64 (macOS 14.0+). Linux musl/Alpine and other CPU architectures are not supported by the prebuilt native archives. Docker images are published for Linux x64 and ARM64. See NATIVE-PLATFORMS.md for platform ABI baselines and verification details.
# Install globally and start Streamable HTTP (default on port 3000):
npm install -g [email protected]
prts-mcp
# Or run in stdio mode for local MCP clients:
PRTS_TRANSPORT=stdio prts-mcp
# Or keep legacy 2.x command names via the compatibility package:
npm install -g [email protected]
prts-mcp-ts-stdio
For a one-off trial without global installation:
npx -y [email protected]npx -y [email protected] prts-mcp-ts-stdioDefault transport behavior by entry point:
prts-mcp (native binary and npm main package): defaults to Streamable HTTP at http://localhost:3000/mcp (health check at /health). Set PRTS_TRANSPORT=stdio when a local MCP client spawns the server as a subprocess.ghcr.io/3akhp/prts-mcp): defaults to stdio. Pass -e PRTS_TRANSPORT=http to run it as an HTTP server.prts-mcp-ts compatibility commands: run the Rust binary under the hood (no Bun needed) while keeping fixed 2.x transport modes — prts-mcp-ts and prts-mcp-ts-bun always use HTTP, and prts-mcp-ts-stdio always uses stdio.# Run as an HTTP service with persistent data:
docker run -d --name prts-mcp -p 127.0.0.1:3000:3000 -e PRTS_TRANSPORT=http -v prts-data:/data ghcr.io/3akhp/prts-mcp:3.1.1
Download the archive for your OS and CPU from the 3.1.1 GitHub Release, verify its SHA-256 checksum, extract it while keeping the bin/ and data/ directory structure intact, and run bin/prts-mcp (bin\prts-mcp.exe on Windows). To build from source, run cargo build --locked --release --bins.
For MCP client configuration snippets (Claude Desktop, Claude Code, Roo Code, Codex), see the Agent & MCP Beginner Guide, Client Quick Start Guide, and Tools & Workflow Guide. For server deployment, Docker volume mounting, and troubleshooting, see the Server Deployment Guide.
The server exposes 24 MCP tools (IMAGES_ENABLED=false disables operator_artwork, leaving 23 tools):
get_operator_basic_info(name) returns the basic profile by default. Pass action="skills" for Lv1–7 and mastery effects, or action="stats" for elite-phase Lv1/max stat panels with trust and potential bonuses. To query a specific level's panel, supply both phase (0–2) and level — for example, get_operator_basic_info("阿米娅", action="stats", phase=2, level=40). phase and level are valid only when action="stats", and each call returns only the selected action's content.
By default, tools return human-readable Markdown in the MCP content field. Clients that consume MCP structuredContent can set a connection-level output channel (content, structured, or both) via PRTS_OUTPUT_CHANNEL. In HTTP mode, individual requests or sessions can also override this via the ?output_channel= query parameter or the x-prts-output-channel header. See the environment variable reference and the 2.0 migration guide.
operator_artwork)The operator_artwork tool (2.5.0+) is enabled by default and supports two data-source modes controlled by LOCAL_IMAGE:
Zero configuration is required out of the box: the server fetches requested illustrations from MediaWiki and caches them in memory. Set LOCAL_IMAGE=true only if you want a full local mirror of AKDP artwork assets. For storage planning and the full list of runtime variables, see Data & Artwork Storage Management and docs/admin/environment-variables.md.
https://prts.wiki/api.php) — lore articles, faction info, and world-building entries.3aKHP/arknights-data-pipeline) — self-hosted data pipeline publishing game data tables (zh_CN-excel.zip), level combat data (zh_CN-levels.zip), and parsed story dialogue with LLM summaries (zh_CN.zip) via GitHub Releases.Game tables, level combat data, and story archives are stored under gamedata, gamedata-levels, and storyjson respectively. Once the server starts listening, it checks for updates in the background immediately and re-checks every hour by default (PRTS_AUTO_SYNC_INTERVAL_SECONDS=3600; configurable across 60..604800, or 0 to run only the startup check).
New pipeline releases include a manifest.json (prts-mcp-data/v1 contract) with the source versionId and each archive's SHA-256 and byte size. Archives that fail manifest or structure checks are rejected before activation, while pre-manifest releases remain supported. If a download or validation fails, the previously activated data generation stays online without interruption.
GITHUB_MIRRORS accepts comma-separated fallback URL prefixes for GitHub release downloads (surrounding whitespace and trailing slashes are normalized automatically). Standard proxy environment variables (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY) are also respected; using a proxy or mirror never bypasses manifest or ZIP verification.
Public Rust native archives, Docker images, and npm packages ship with a verified read-only fallback snapshot of game, level, and story data so offline queries work immediately even before the first sync completes. Once complete user data is present in the writable data directory or volume, user data takes precedence. Source builds rely on runtime auto-sync or explicit data paths (GAMEDATA_PATH, STORYJSON_PATH); crates.io publication is planned after 3.0.0 stable, and there is no Rust package on PyPI.
initialize + Mcp-Session-Id) and the stateless 2026-07-28 modern envelope (_meta per request) with zero server-side configuration. In Streamable HTTP mode, a single /mcp endpoint can serve multiple legacy and modern clients concurrently, isolating each session's state and output channel; if a legacy session expires after the 24-hour idle timeout (SESSION_IDLE_TIMEOUT_MS) or a server restart (-32002: MCP session lost), clients can simply re-send initialize or toggle the MCP connection in client settings. In stdio mode, the first message on a pipe locks the protocol era for that subprocess. See the Client Quick Start Guide, Server Deployment Guide, and 2.5 → 2.6 Migration Guide.operator_name → name, output channel)面向明日方舟同人创作 AI 助手的 MCP Server。通过 PRTS Wiki MediaWiki API 与自动同步的游戏数据,为 Claude Desktop、Claude Code、Chatbox 等 MCP 客户端提供泰拉世界观、干员档案、技能数值、关卡敌情与剧情文本的实时查询。
从 3.x 起,PRTS-MCP 统一为仓库根目录下的原生 Rust 实现,并将 C 正则组件静态链接进预编译二进制中。游戏数据查询、Wiki 解析与 MCP 协议处理全部由 Rust 执行:
Node >=22、npm >=10),自动拉起对应平台的预编译 Rust 二进制,无需安装 Bun。通过 npm 安装时,请安装 prts-mcp(或指定精确版本 3.1.1)。若希望保留 2.x 的旧命令名(prts-mcp-ts、prts-mcp-ts-bun、prts-mcp-ts-stdio),可安装兼容包 prts-mcp-ts,它自 3.0.0 起同样运行 Rust 二进制。如需继续使用 2.8.x,请固定 [email protected] 或 ghcr.io/3akhp/prts-mcp:2。详见路线图、2.x → 3.0 迁移指南与 2.8.1 旧版文档。
预编译二进制支持 Linux x64/ARM64(glibc >= 2.28)、Windows x64 与 macOS ARM64/x64(macOS 14.0+);暂不支持 Linux musl/Alpine 及其他 CPU 架构。Docker 镜像支持 Linux x64 与 ARM64。各平台的 ABI 基线与验证详情见原生平台说明。
# 全局安装并启动 Streamable HTTP 服务(默认监听 3000 端口):
npm install -g [email protected]
prts-mcp
# 本地客户端以 stdio 子进程方式接入:
PRTS_TRANSPORT=stdio prts-mcp
# 若需保留 2.x 旧命令配置,可安装兼容入口包:
npm install -g [email protected]
prts-mcp-ts-stdio
免安装临时试用可直接通过 npx 启动:
npx -y [email protected]npx -y [email protected] prts-mcp-ts-stdio各入口的默认传输方式如下:
prts-mcp(原生二进制与 npm 主包):默认启动 Streamable HTTP,端点为 http://localhost:3000/mcp,健康检查为 /health。本地客户端拉起子进程时,设置 PRTS_TRANSPORT=stdio 切换为 stdio。ghcr.io/3akhp/prts-mcp):默认使用 stdio;作为独立 HTTP 服务运行时,需显式传入 -e PRTS_TRANSPORT=http。prts-mcp-ts 兼容命令:底层同样运行 Rust 二进制(无需安装 Bun),并保持 2.x 的固定传输行为——prts-mcp-ts 与 prts-mcp-ts-bun 固定为 HTTP,prts-mcp-ts-stdio 固定为 stdio。# 以 HTTP 模式后台运行镜像,并挂载数据卷:
docker run -d --name prts-mcp -p 127.0.0.1:3000:3000 -e PRTS_TRANSPORT=http -v prts-data:/data ghcr.io/3akhp/prts-mcp:3.1.1
从 3.1.1 Release 下载对应系统与架构的归档包,校验 SHA-256 后解压(请完整保留解压目录内的 bin/ 与 data/ 相对结构),直接运行 bin/prts-mcp(Windows 为 bin\prts-mcp.exe)。从源码编译请执行 cargo build --locked --release --bins。
各大 MCP 客户端的零基础入门、配置片段与工具串联工作流请参阅Agent 与 MCP 零基础入门指南、客户端接入与快速上手指南和工具使用与同人创作工作流指南;服务器常驻部署、Docker 卷挂载与故障排查请参阅服务端部署与容器运维指南。
服务端共提供 24 个 MCP 工具(设置 IMAGES_ENABLED=false 会隐藏 operator_artwork,剩余 23 个):
get_operator_basic_info(name) 默认返回干员基础档案(action="basic")。传入 action="skills" 可查询技能 Lv1–7 与专精效果;传入 action="stats" 可查询各精英阶段 Lv1/满级面板及信赖、潜能加成。如需查询特定等级面板,请同时传入 phase(0–2)与 level,例如 get_operator_basic_info("阿米娅", action="stats", phase=2, level=40)。phase 与 level 仅在 action="stats" 下有效,每次调用只返回对应 action 的内容。
工具默认在 MCP content 字段中输出人类可读的 Markdown。支持消费 MCP 原生 structuredContent 的客户端,可通过环境变量 PRTS_OUTPUT_CHANNEL 将连接级输出通道设为 content(默认)、structured 或 both;HTTP 模式还支持通过 ?output_channel= 查询参数或 x-prts-output-channel 请求头按连接/请求覆盖。设计背景见 2.0 迁移指南,详细配置见环境变量参考。
operator_artwork)operator_artwork 工具(2.5.0+)默认开启,通过 LOCAL_IMAGE 切换数据源模式:
默认配置无需额外准备,直接通过 MediaWiki 按需获取并缓存立绘。仅当需要本地全量离线立绘时,再开启 LOCAL_IMAGE=true。存储规划与完整环境变量说明见数据同步与立绘存储管理和环境变量参考。
https://prts.wiki/api.php) — 泰拉世界观词条、阵营设定与剧情资料。3aKHP/arknights-data-pipeline) — 自建数据流水线,通过 GitHub Release 统一发布游戏数据表(zh_CN-excel.zip)、关卡战斗数据(zh_CN-levels.zip)以及带 LLM 摘要的剧情台词数据(zh_CN.zip)。干员与表格数据存放在 gamedata 目录,关卡战斗数据存放在 gamedata-levels 目录,剧情数据存放在 storyjson 目录。服务启动监听后会立即在后台检查一次更新,之后默认每小时检查一次(PRTS_AUTO_SYNC_INTERVAL_SECONDS=3600,可在 60..604800 秒范围内调整,或设为 0 仅保留启动时检查)。
新版数据 Release 附带 manifest.json(遵循 prts-mcp-data/v1 契约),记录源端 versionId 以及各压缩包的大小与 SHA-256。校验不通过的归档会在激活前被拒绝;同时仍兼容不含 manifest 的旧版 Release。若下载、解压或校验失败,服务会继续使用上一代已激活的数据,不会中断现有查询。
GITHUB_MIRRORS 支持配置逗号分隔的 GitHub 下载备用前缀(自动去除首尾空白与末尾斜杠)。HTTP 客户端同时支持标准代理环境变量(HTTP_PROXY、HTTPS_PROXY、ALL_PROXY、NO_PROXY);使用镜像或代理不会跳过 manifest 与 ZIP 完整性校验。
公开发布的 Rust 原生归档包、Docker 镜像与 npm 包均内置经过校验的只读备用数据(含游戏表、关卡与剧情),首次同步完成前或离线环境下可直接查询。一旦可写用户数据目录或数据卷中存在完整的用户数据,服务优先读取用户数据,且后台同步只写入用户目录,不会修改安装包内的备用数据。从源码构建或使用 Cargo 源码包时依赖启动同步或显式配置的数据路径;crates.io 计划在 3.0 正式版发布后上架,Rust 版不再通过 PyPI 发布。
initialize + Mcp-Session-Id)与 2026-07-28 无状态现代信封(请求内携带 _meta)。Streamable HTTP 模式下,同一个 /mcp 端点支持多个不同协议世代、不同输出通道的客户端同时连接;当 Legacy 会话因服务端重启或连续空闲满 24 小时(SESSION_IDLE_TIMEOUT_MS)被自动驱逐(返回 -32002: MCP session lost)时,客户端可直接重发 initialize 或在设置中关闭重开连接恢复。stdio 模式下,子进程连接上的首条消息决定该连接的协议世代。详见客户端接入指南、服务端部署指南与 2.5 → 2.6 迁移指南。operator_name → name、输出通道)Tool names, parameters, output channels, and data semantics match the frozen TS/v2.8.1 baseline, with seven approved implementation differences (D-001 through D-007, covering runtime identity, native diagnostics schema, and specific Unicode regex case-folding edges) documented in contracts/baseline.json. Full JSON Schemas for all tool inputs are recorded in contracts/tool-declarations.json.
3.x 的工具名、参数、输出通道与数据语义严格对齐 TS/v2.8.1 基线;7 项经批准的实现差异(D-001 至 D-007,涉及运行时标识、原生诊断结构及部分 Unicode 正则大小写折叠边界)完整记录于 contracts/baseline.json,所有工具的参数 Schema 见 contracts/tool-declarations.json。
Project source code is licensed under MIT; vendored native code retains its upstream license notices. Game data and PRTS Wiki content remain under their respective terms — see LICENSE, NOTICE, and native component notices.
项目源代码采用 MIT 许可证授权;随仓打包的原生组件保留各自的上游许可声明。明日方舟游戏数据与 PRTS Wiki 内容仍适用各自版权与授权条款,详见 LICENSE、NOTICE 与原生组件许可说明。
MCP Server for Arknights PRTS Wiki and local game data
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Prts 透過 stdio 在本機執行。
上次檢查時間:2026-11-09。 MCP Server for Arknights PRTS Wiki and local game data