D

Dwarf Fortress (DFHack)

MCP server · by alexanderolvera

Developer Tools npm v1.4.1

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

View source ↗ Website ↗ Generate config for multiple servers More servers

Install

registry version 1.4.1

npm
npx -y dfhack-mcp

Setup by client

Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.

claude_desktop_config.json

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

Format verified against the official Claude Desktop docs ↗.

Environment variables

Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.

  • DFHACK_HOST — Host running DFHack's remote RPC server. Defaults to 127.0.0.1.
  • DFHACK_PORT — Port for DFHack's remote RPC server. Defaults to 5000.
  • DFHACK_MCP_ACTUATORS — Set to any value to expose the write tools. Unset, the server is read-only.

GitHub

⭐ 2 stars · 最近更新于 80 天前 · ISC license

About this server

dfhack mcp 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…

Summary from the project README — github.com/alexanderolvera/dfhack-mcp

Distributed as npm, listed under Developer Tools. Review our MCP security guide before granting access to real data.

Frequently asked questions

What does the Dwarf Fortress (DFHack) MCP server do?

dfhack mcp 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

How do I install Dwarf Fortress (DFHack)?

Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.

Is Dwarf Fortress (DFHack) free to use?

The MCP server itself is free to install. The source is public on https://github.com/alexanderolvera/dfhack-mcp. Any third-party service it calls may require its own API key and account.

Which clients support Dwarf Fortress (DFHack)?

Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.

Add this badge

Publish this server? Link back with a badge on your README or site — copy either snippet.

Listed on MCPNav

Markdown

[![Listed on MCPNav](https://mcpnav.net/badge/dfhack-mcp.svg)](https://mcpnav.net/server/dfhack-mcp/)

HTML

<a href="https://mcpnav.net/server/dfhack-mcp/"><img src="https://mcpnav.net/badge/dfhack-mcp.svg" alt="Listed on MCPNav" height="20"></a>