Skip to main content
Glama

vic3-mcp

读取本机 Victoria 3 存档(.v3)的 MCP 服务器。Agent 可以列出存档、解析国家数据,并给出建设 / 法案 / 外交建议。

默认测试存档:~/Documents/Paradox Interactive/Victoria 3/save games/Qing_MCP.v3(1836 大清)。

存档从哪来

路径

用途

~/Documents/Paradox Interactive/Victoria 3/save games/

.v3 存档

~/Library/Application Support/Steam/steamapps/common/Victoria 3/game/

本地化与定义(国名、法案、建筑)

游戏默认写入 二进制 zip。服务器用随附的 rakaly 把存档融化成文本后再抽数据。融化结果缓存在 ~/Library/Caches/vic3-mcp/。

Related MCP server: palworld-save-mcp

安装

uv sync
chmod +x scripts/run-mcp.sh vendor/rakaly

vendor/rakaly 是 macOS ARM64 的 rakaly 0.8.19。别的平台请从 https://github.com/rakaly/cli/releases 下载,放到 vendor/rakaly 或设置 RAKALY。

给 Grok 用

项目里已经有 .grok/config.toml。也可以:

grok mcp add vic3 -- /Users/i/myCode/vicroria/.venv/bin/python -m vic3_mcp

工作目录要能 import 到包:用上面的 venv,或 scripts/run-mcp.sh。

手动冒烟:

uv run python scripts/smoke.py Qing_MCP

网页(对话 + 指标 + 建议动作)

cp .env.example .env
# 编辑 .env:填 VIC3_LLM_BASE_URL、VIC3_LLM_API_KEY,模型默认 kimi-k3
uv sync
./scripts/run-web.sh

打开 http://127.0.0.1:8765

  • 上:存档 KPI,支持自动刷新 / 手动刷新

  • 左:和顾问对话(会读存档、改写右侧动作)

  • 右:建议动作看板(启发式先填,对话后由模型更新)

  • 模型设置:OpenAI 协议的 base URL、API Key、model(也可写在 .env)

工具

工具

作用

list_saves

列出本机存档

load_save

载入(默认 Qing_MCP)

overview

日期、GDP、金库、列强

analyze_situation

风险 + 建议

country / economy / politics / pops

国家切片

diplomacy / military / technology / journal

外交/军事/科技/日志

buildings / states / rankings

建筑、省份、排行

compare_countries

多国对比

search_save

在融化文本里搜原始字段

localize

查游戏 loc

country 参数:player、CHI、GBR 或数字 id。

环境变量

复制 .env.example 为 .env 后填写。.env 已在 .gitignore 中,不要提交。

变量

说明

VIC3_LLM_BASE_URL

OpenAI 兼容接口,需含 /v1

VIC3_LLM_API_KEY

接口密钥

VIC3_LLM_MODEL

模型名,默认 kimi-k3

VIC3_SAVE_DIR / VIC3_USER_DIR / VIC3_GAME_DIR

覆盖存档/游戏路径

VIC3_MCP_CACHE

融化缓存目录

RAKALY

rakaly 可执行文件路径

Available Tools

19 tools
analyze_situationC

根据存档数据给出风险标记和可执行建议(大清 1836 会附开局打法)。

Inputs: country. Returns: result

buildingsC

建筑汇总:按类型的等级、利润,以及亏损建筑。

Inputs: top_n, country. Returns: result

compare_countriesA

对比多个国家的 GDP、威望、人口、科技数。tags 为逗号分隔标签。

Inputs: tags. Returns: result

countryB

单个国家的完整摘要(经济、人口、政府、省份列表)。

Inputs: tag. Returns: result

diplomacyC

外交:关系、协定/敌对、战争。

Inputs: country. Returns: result

economyC

金库、周收支、投资池、税率。

Inputs: country. Returns: result

journalC

该国激活的日志条目。

Inputs: country. Returns: result

list_countriesA

列出存档里的国家。sort: gdp | prestige | population | tag。

Inputs: sort, limit. Returns: result

list_savesA

列出本机 Victoria 3 存档(Documents/Paradox Interactive/Victoria 3/save games)。

Inputs: no named parameters. Returns: result

load_saveC

融化并载入一个 .v3 存档。name 可以是存档名(如 Qing_MCP)或完整路径。

Inputs: lang, name. Returns: result

localizeA

查询游戏本地化。keys 为逗号分隔的 loc key,如 CHI,law_serfdom,ig_landowners。

Inputs: keys (required). Returns: result

militaryD

陆军/海军编制。

Inputs: country. Returns: result

overviewC

国家总览:日期、等级、GDP、威望、生活水平、人口、金库与列强名单。

Inputs: country. Returns: result

politicsC

利益集团、法案、机构、统治者/继承人。

Inputs: country. Returns: result

popsC

人口结构:阶层、职业、文化、失业、生活水平。

Inputs: country. Returns: result

rankingsA

威望排行与国家等级(列强/大国等)。

Inputs: no named parameters. Returns: result

search_saveA

在融化后的存档文本里搜索原始字段(调试/查冷门数据)。

Inputs: query (required), max_hits. Returns: result

statesB

该国省份:名称、整合度、基础设施、人口。

Inputs: country. Returns: result

technologyD

已研究科技。

Inputs: country. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 19 tools

    Disambiguation4/5

    Tools are mostly separated by distinct game systems (economy, politics, pops, diplomacy, military, technology, buildings, states), so an agent can usually pick the right one. Some overlap exists among overview, country, rankings, and list_countries, but descriptions make their scopes reasonably clear.

    Naming Consistency3/5

    All names are readable lowercase with underscores, but the pattern is mixed: many are bare noun section names like economy, politics, and pops, while others use verb_noun forms like load_save, compare_countries, and search_save. The naming is intuitive enough to navigate, but it does not follow a single predictable convention.

    Tool Count3/5

    At 19 tools, the server is on the heavier side and includes many near-parallel section getters. Each tool maps to a legitimate Victoria 3 subsystem, but the set feels borderline and could be consolidated without losing much capability.

    Completeness4/5

    The tools cover the main Victoria 3 save-analysis surface: countries, economy, politics, pops, diplomacy, military, technology, buildings, states, rankings, and raw save searching. Missing conveniences like a market/trade or goods-price view are noticeable, but search_save can partially work around them.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude to read Crusader Kings III save files and retrieve strategic game information such as realm overview, military, succession, diplomacy, vassals, factions, and expansion options.
      14
      11
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to develop Banner of the Maid mods by reading and modifying game data (characters, items, weapons, skills, dialogue, saves, portraits) and to perform live in-game verification via launching the game, taking screenshots, and clicking by coordinates.
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Lets users interrogate an Europa Universalis V save with an AI assistant, returning real figures decoded from their own save, game files and wiki-verified rules for economy, locations, buildings, markets, diplomacy and strategy. It is read-only and reports unverifiable values as missing rather than guessing.
      AGPL 3.0