Civilization V Harness (Linux)

v2.20.1
io.github.ty-meador/civ-v-llm-harness Checked 12 hours ago Published 2 days ago

Play Sid Meier's Civilization V (native Linux) as a human seat, by the game's own rules.

Values you need

VariableWhat it is
CIV5_TUNERD_SOCKrequired Path of the Unix socket of the running tuner daemon (python -m harness.tunerd), usually $XDG_RUNTIME_DIR/civ5-tuner.sock. The game and the daemon must be running first; see the install guide.
CIV5_TUNERD_TOKENoptional secret This agent's seat token, when the daemon runs with a seat table (--seats). Not needed for a solo game.
CIV5_CALL_LOGoptional Optional path of a JSON-lines file that receives one line per tool call. Off when unset.

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add civ-v-llm-harness -e 'CIV5_TUNERD_SOCK=<CIV5_TUNERD_SOCK>' -- uvx civ-v-llm-harness==2.20.1 --seat auto
Add to claude_desktop_config.json
{
  "mcpServers": {
    "civ-v-llm-harness": {
      "args": [
        "civ-v-llm-harness==2.20.1",
        "--seat",
        "auto"
      ],
      "command": "uvx",
      "env": {
        "CIV5_TUNERD_SOCK": "<CIV5_TUNERD_SOCK>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "civ-v-llm-harness": {
      "args": [
        "civ-v-llm-harness==2.20.1",
        "--seat",
        "auto"
      ],
      "command": "uvx",
      "env": {
        "CIV5_TUNERD_SOCK": "<CIV5_TUNERD_SOCK>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "CIV5_TUNERD_SOCK",
      "id": "civ5-tunerd-sock",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "civ-v-llm-harness": {
      "args": [
        "civ-v-llm-harness==2.20.1",
        "--seat",
        "auto"
      ],
      "command": "uvx",
      "env": {
        "CIV5_TUNERD_SOCK": "${input:civ5-tunerd-sock}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.civ-v-llm-harness]
command = "uvx"
args = ["civ-v-llm-harness==2.20.1", "--seat", "auto"]
env = { "CIV5_TUNERD_SOCK" = "<CIV5_TUNERD_SOCK>" }

For AI agents

  1. Ask the user for: CIV5_TUNERD_SOCK. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: reference, turn, state, order, question, answer, notebook, batch, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json