Dwarf Fortress (DFHack) MCP server
io.github.alexanderolvera/dfhack-mcp·v1.4.1·2 starsMCP server exposing a live Dwarf Fortress fort to an AI agent as curated, semantic tools
2 stars35 downloads/wk
Reviews
Write oneNobody has reviewed Dwarf Fortress (DFHack) yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Dwarf Fortress (DFHack) tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.9 · 2026-09-24 · same rubric, same numbers if you re-run it
- Code scan2 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 46 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Dwarf Fortress (DFHack) compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 80% of 4,460 AI and agents servers
- GitHub stars
- 2
- more than 65% of 2,711 AI and agents servers
- Downloads a week
- 35
- more than 25% of 1,538 AI and agents servers with a package
Install Dwarf Fortress (DFHack) in Claude Code, Cursor or VS Code
Runs npx -y dfhack-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add dfhack-mcp -- npx -y dfhack-mcp
What the publisher says
From the Dwarf Fortress (DFHack) repository's README, as published. We do not edit it. Read it on GitHub
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 the running game and answers in plain language.
Read-only by default. The 37 sensor and reference tools only observe the game. A handful of actuators that change the fort — queue manager orders, apply quickfort blueprints, assign labor, sound the civilian alert, pull a lever — ship behind an explicit opt-in and stay hidden until you enable them (see Taking action).
Two kinds of tools:
threats, stocks, jobsandlabor, military, injuriesandhealth, defenses, and more.
- Sensors answer what is my fort doing right now? — fort_status,
world's ground truth (its loaded raws), the wiki tools are the general explanation, and identify fuses the two for "what is this creature and how do I handle it."
- Reference answers how does Dwarf Fortress work? — gamedata is your
It returns facts, not advice — already-summarized JSON that reads like a glance at the screen, leaving the judgment to the agent.
Every tool has a reference page — parameters, return shape, real example output, caveats — in docs/tools.
Quick start
The package is published to npm and ships a prebuilt bundle — there is nothing to build. Point your MCP client at it with npx:
{
"mcpServers": {
"dfhack": {
"command": "npx",
"args": ["-y", "dfhack-mcp"]
}
}
}That's it for Claude Desktop / Claude Code / any stdio MCP client. npx -y dfhack-mcp fetches and runs the latest release; its runtime dependencies — the MCP SDK, zod, and the dfhack-remote-node RPC transport — are pulled from npm automatically.
Clients that browse the official MCP Registry can find this server there as io.github.alexanderolvera/dfhack-mcp; the listing is generated from server.json and points at the same npm package, so either route installs the identical build.
Then just have your fort running (next section) and ask your agent something like "check on my fort and flag anything urgent."
Prefer a pinned global install?
npm install -g dfhack-mcp # then set "command": "dfhack-mcp", "args": []Requirements
live game; if no fort is loaded they say so.
- Dwarf Fortress running with DFHack, with a fort loaded. The tools read the
runs with DFHack — no config file to edit. (The allowremote setting only governs connections from other machines and can stay false; a local MCP server reaches it either way.) Point elsewhere with DFHACKHOST / DFHACK_PORT.
- DFHack Remote RPC on localhost:5000. This is on by default whenever DF
source — see Development.)
- Node 20+ to run the published package. (Node 24+ only if you develop from
What you can ask it
Your agent picks the tools; you just describe what you want. The tools below are what it has to work with.
Sensors — the state of your fort
No arguments; each reports on the loaded fort.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Dwarf Fortress (DFHack): common questions
- Is Dwarf Fortress (DFHack) MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the Dwarf Fortress (DFHack) safety report
- How do I install Dwarf Fortress (DFHack)?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Dwarf Fortress (DFHack) need an API key?
- No secret keys are declared. It reads 3 settings from the environment.
- Is Dwarf Fortress (DFHack) maintained?
- The last commit was 87 days ago (2026-08-09). The latest release is v1.4.1.
- What can I use instead of Dwarf Fortress (DFHack)?
- Servers from other publishers that do the same job: Serena MCP: the IDE for your agent MCP server, Power BI Authoring MCP Server (Local) and Memanto MCP server.
- How does Dwarf Fortress (DFHack) compare with other AI and agents MCP servers?
- safety score 88/100 (higher than 80% of 4,460 AI and agents servers); github stars 2 (more than 65% of 2,711 AI and agents servers); downloads a week 35 (more than 25% of 1,538 AI and agents servers with a package). Full comparison.
Alternatives to Dwarf Fortress (DFHack)
Same job from other publishers: the closest match first, then the best rated.
- Serena MCP: the IDE for your agentA powerful toolkit for coding, providing semantic retrieval and editing capabilities.not reviewedWidely usedC
- Power BI Authoring MCP Server (Local)The Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.not reviewedEstablishedA
- MemantoMCP server for Memanto - persistent semantic memory for any MCP-compatible agentnot reviewedEstablishedA
- Watch SkillWatch video and live sessions, keep timestamped evidence, and verify an agent's own work.not reviewedEstablishedB
- WaveSpeedRun any model on the live WaveSpeed catalog: image, video, audio, 3D.not reviewedEstablishedA