Dwarf Fortress (DFHack)

v1.4.1
io.github.alexanderolvera/dfhack-mcp Checked 6 hours ago Published 4 months ago

MCP server exposing a live Dwarf Fortress fort to an AI agent as curated, semantic tools

Values you need

VariableWhat it is
DFHACK_HOSToptional Host running DFHack's remote RPC server. Defaults to 127.0.0.1. Default: 127.0.0.1
DFHACK_PORToptional Port for DFHack's remote RPC server. Defaults to 5000. Default: 5000
DFHACK_MCP_ACTUATORSoptional Set to any value to expose the write tools. Unset, the server is read-only.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add dfhack-mcp -- npx -y dfhack-mcp@1.4.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "dfhack-mcp": {
      "args": [
        "-y",
        "dfhack-mcp@1.4.1"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "dfhack-mcp": {
      "args": [
        "-y",
        "dfhack-mcp@1.4.1"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "dfhack-mcp": {
      "args": [
        "-y",
        "dfhack-mcp@1.4.1"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.dfhack-mcp]
command = "npx"
args = ["-y", "dfhack-mcp@1.4.1"]

For AI agents

  1. 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).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: artifacts_and_engravings, burrows, chronicle, citizen, defenses, environment, farming, find_unit, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json