Skip to main content

MCP Server for Arknights PRTS Wiki & game data

Project description

PRTS MCP Server — Python 实现

明日方舟同人创作辅助 MCP Server,Python 版本。通过 stdio 传输接入 MCP 客户端(Claude Desktop、Claude Code、Chatbox 等),支持 Docker 部署。

提供 23 个 MCP 工具(2.0):PRTS 词条检索与页面结构、干员档案/语音/基础信息、剧情活动与台词、角色出场追踪、全文搜索、敌人图鉴、关卡查询、关卡敌人融合,以及物品/材料查询。完整清单见仓库根目录 README.md

2.0 变更:工具面由 1.x 的 32 个合并为 23 个(详见 1.x → 2.0 迁移指南);新增可选的 output channel(PRTS_OUTPUT_CHANNEL 环境变量,默认 content,与 1.x 行为一致)。


快速开始(Docker)

# 从仓库根目录构建(可选预置 bundled 数据,详见下方)
docker build -f python/Dockerfile -t prts-mcp .

# 运行(named volume 持久化游戏数据,推荐)
docker run -i --rm -v prts-mcp-data:/data/gamedata -v prts-mcp-levels:/data/gamedata-levels -v prts-mcp-storyjson:/data/storyjson prts-mcp

接入 MCP 客户端

{
  "mcpServers": {
    "prts_wiki": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-v", "prts-mcp-data:/data/gamedata", "-v", "prts-mcp-levels:/data/gamedata-levels", "-v", "prts-mcp-storyjson:/data/storyjson", "prts-mcp"]
    }
  }
}

请使用 docker run 而非 docker compose run。后者会向 stdio 流写入进度信息,污染 JSON-RPC 通道。


不使用 Docker(pip install)

pip install -e .

# 需指定游戏数据目录(GAMEDATA_PATH 设置后禁用 auto-sync)
GAMEDATA_PATH=/path/to/ArknightsGameData prts-mcp

数据机制

服务器启动时自动同步三类数据:

  • 游戏表格数据gamedata volume):从 3aKHP/ArknightsGameData Release 下载 zh_CN-excel.zip,其内容同步自 Kengxxiao/ArknightsGameData
  • 关卡战斗数据gamedata-levels volume):从同一 Release 下载 zh_CN-levels.zip,用于关卡实际出怪和关卡级敌人数值
  • 剧情数据storyjson volume):从 ArknightsStoryJson Releases 下载 zh_CN.zip

镜像内置 bundled 数据作为网络不可用时的离线保底。

PyPI 包本身不内置 bundled 数据;直接 pip install prts-mcp 时会在启动时自动同步,或使用 GAMEDATA_PATH / STORYJSON_PATH 指向你自己的本地数据。若 GAMEDATA_PATH 指向完整 ArknightsGameData 仓库根目录,内含的 zh_CN/gamedata/levels 会直接用于关卡战斗数据;否则默认在其相邻目录维护 gamedata-levels。正式 Docker 镜像会由 CI 预置兜底数据。


详细文档

docs/deployment.md:完整部署方式、MCP 客户端配置、环境变量参考

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prts_mcp-2.0.1.tar.gz (112.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prts_mcp-2.0.1-py3-none-any.whl (77.8 kB view details)

Uploaded Python 3

File details

Details for the file prts_mcp-2.0.1.tar.gz.

File metadata

  • Download URL: prts_mcp-2.0.1.tar.gz
  • Upload date:
  • Size: 112.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prts_mcp-2.0.1.tar.gz
Algorithm Hash digest
SHA256 3148bc7ac5440f861cf8b1fc415f1874d6e3e747a77619531d4ea73c16f9dd7b
MD5 98c89aadb59dad9d78249977f646ee80
BLAKE2b-256 438d4d4e5fcbf962b3eb81d30f60a7e69c1c2e50b626ecbfdee886ba74696c5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for prts_mcp-2.0.1.tar.gz:

Publisher: cd.yml on 3aKHP/prts-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prts_mcp-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: prts_mcp-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 77.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prts_mcp-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61f8eac610c22f5effa490a831e82144670f749ca943d09371614c4024556bb6
MD5 cc7b28dd1b3f15c7af674a5b7ef392f7
BLAKE2b-256 66536079f689bff22cc8d5ba8a90a73e493f6ce7789cee16bd2874c2101a4b7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for prts_mcp-2.0.1-py3-none-any.whl:

Publisher: cd.yml on 3aKHP/prts-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page