Skip to content
MCP server

Dwarf Fortress (DFHack)

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

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
1.4.1
Listing updated
6 days ago

About Dwarf Fortress (DFHack)

Dwarf Fortress (DFHack) is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Install

Run in a terminal

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

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dfhack-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dfhack-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dfhack-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dfhack-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "dfhack-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "dfhack-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Using several servers? Build one config file with the MCP config generator.

Configuration

  • DFHACK_HOSTHost running DFHack's remote RPC server. Defaults to 127.0.0.1.
  • DFHACK_PORTPort for DFHack's remote RPC server. Defaults to 5000.
  • DFHACK_MCP_ACTUATORSSet to any value to expose the write tools. Unset, the server is read-only.

Pricing

Open source

Dwarf Fortress (DFHack) FAQ

Is Dwarf Fortress (DFHack) free?

Yes. Dwarf Fortress (DFHack) is open source, so you can use and self-host it for free.

How do I add Dwarf Fortress (DFHack) to Claude Code?

Run this command in your terminal: claude mcp add dfhack-mcp -- npx -y dfhack-mcp

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers