Dwarf Fortress (DFHack) MCP Server

An MCP server that gives an AI agent a live window into your Dwarf Fortress fort - a co-pilot and early-warning advisor, not an autopilot. Point Claude (or any MCP client) at it and ask _"how's my fort doing?"_ - it reads happiness, threats, stocks, jobs, health, and defenses straight from the running game and answers in plain language. It runs locally over stdio via the published package.

People who work with Dfhack and want it reachable from Claude, Cursor, VS Code, or another MCP client. The project is written in Lua.

VERIFIED ACTIVE

LAST COMMIT 2026-08-09 · ★ 2 · #562 OF 998 MAINTAINED OTHER · VERIFIED 2026-09-30

ISC · Lua · how we verify → /methodology

01 · Install Dwarf Fortress (DFHack)

before you install - you'll need

Set DFHACK_MCP_ACTUATORS before connecting.

Claude Code

claude mcp add alexanderolvera-dfhack-mcp -- npx -y dfhack-mcp

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "alexanderolvera-dfhack-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dfhack-mcp"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license ISC - declared in the repository

npm package dfhack-mcp - unscoped; check the name against the project README before installing

registry namespace io.github.alexanderolvera is GitHub-verified and matches the repo owner

03 · What Dwarf Fortress (DFHack) can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

Latest releases

v1.4.1 · 2026-07-26

v1.4.0 · 2026-07-25

refresh threats/fort_status goldens against current fixture image · v1.3.0 - Emergency Response (burrows/civilian_alert, mechanisms/pull_lever, military equipment depth) · v1.4 - Logistics & Engineering · resolve…

v1.2.0 · 2026-07-22

v1.2.0 - Animal Economy & Administration

04 · Who maintains Dwarf Fortress (DFHack)

Dwarf Fortress (DFHack) is maintained by alexanderolvera. It's the only MCP server we track from this author; the repo dates to Jul 2026.

05 · Facts

category
other - ranked #562 of 998 actively-maintained other servers as of 2026-09-30.
release cadence
5 releases in the last 90 days (latest 2026-07-26)
registry
io.github.alexanderolvera/dfhack-mcp (active, first published 2026-07-25 · 2 versions)
packages
npm:dfhack-mcp

06 · Dwarf Fortress (DFHack) FAQ

What is Dwarf Fortress (DFHack)?

An MCP server that gives an AI agent a live window into your Dwarf Fortress fort - a co-pilot and early-warning advisor, not an autopilot. Point Claude (or any MCP client) at it and ask _"how's my fort doing?"_ - it reads happiness, threats, stocks, jobs, health, and defenses straight from the running game and answers in plain language. It runs locally over stdio via the published package.

Is Dwarf Fortress (DFHack) still maintained?

Yes - as of 2026-09-30, its last commit was 2026-08-09 and it shipped 5 releases in the last 90 days. We re-verify nightly.

How do I install Dwarf Fortress (DFHack)?

Run `npx -y dfhack-mcp`. The README documents one environment variable (DFHACK_MCP_ACTUATORS) to set first. Set DFHACK_MCP_ACTUATORS before connecting. You can also paste the ready-made client config above.

Does Dwarf Fortress (DFHack) run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Dwarf Fortress (DFHack)

More MCP servers to compare · Resili Replay · Almured · Alphago2580 Naramarketmcp · Propresenter MCP · Fedit