dfhack-mcp
MCP serverAI & modelsMCP server exposing a live Dwarf Fortress fort to an AI agent as curated, semantic tools
This server has no hosted endpoint yet, so ahel can't serve it. You can still add it. It stays paused until ahel can serve it.
Serve it through your gateway
One link, every agent. Your own credentials, stored once.
Tools it gives your agents (37)
| Tool | What it does |
|---|---|
| artifacts_and_engravings | The fort's art, as labeled facts. Returns the named ARTIFACTS (paginated), SITE-SCOPED BY DEFAULT — only artifacts belonging to the loaded fort, which is almost always what is meant by "our... |
| burrows | The fort's burrows as facts: each burrow's id, name, exact tile_count (dfhack.burrows.isAssignedBlockTile summed over every assigned block — the precise painted area, not a bounding box)... |
| chronicle | The fort's announcement/report stream (combat, deaths, moods, artifacts, sieges, migrants, ...) as triaged, cursor-addressable events. Reads the rolling, front-pruned report window. |
| citizen | A deep dossier on ONE citizen, chained by unit_id from find_unit (or chronicle). Where find_unit stays compact, this is the depth: the walkable social graph (spouse, parents, children, friends... |
| defenses | Where the threats are versus what you have to fight them with. Returns active hostiles the fort has DISCOVERED (same fog-of-war gate and same count as threats()' active_hostiles and military()'s... |
| environment | The fort's ambient conditions right now: current season and dominant weather (none/rain/snow), the surface temperature with whether exposed water is currently frozen (the freezing point is 10000 DF... |
| farming | The fort's farm plots and seed stock as facts — the early-survival pipeline that stocks (food OUTPUTS) and game_data (what is plantable, in the abstract) don't cover. |
| find_unit | Look up citizens by a name fragment or profession (case-insensitive, matches either). |
| fluids | Water and magma engineering facts the Earthworks tier (tile_region, geology) does not cover: aquifer layers, standing/flowing water, the magma sea's top, flood exposure at the fort interior, and... |
| fort_health | The fort's computational health as facts — FPS death is the true endgame boss, and nothing else reports it. |
| fort_status | One-call situational overview of the currently loaded Dwarf Fortress fort: name, in-game date and season, population, created wealth, a happiness breakdown (miserable/unhappy/content/happy)... |
| game_data | Look up the LOADED WORLD's raws (ground truth for THIS world) and return curated, labeled facts. |
| geology | A one-call geological survey of the embark, REVEALED-INFO ONLY by default. Returns surface_z_max — the highest open-to-sky ground z-level found ANYWHERE on the embark (NOT map_overview()'s... |
| hauling_routes | The fort's minecart hauling infrastructure: routes, each route's stops, and the vehicle (minecart) objects fort-wide. routes[] is {id, name?, stops[], vehicles[]}. |
| identify | One-call "what is this creature and how do I handle it": fuses THIS WORLD's raws (ground truth) with the DF wiki (strategy). Pass a creature token (e.g. |
| injuries_and_health | The fort's medical picture, counted on CURRENT condition rather than on history. wounded = dwarves carrying at least one wound with live damage (bleeding, pain, swelling, an unset fracture, a... |
| jobs_and_labor | Workforce utilization: how many working-age dwarves are busy vs. idle (children/babies excluded from the labor pool), the idle percentage, and a ranked breakdown of what jobs the fort is currently... |
| livestock_and_pastures | The fort's tame animal economy as facts — every prior tool sees hostiles (threats) or nothing at all here. |
| map_overview | Cheap spatial orientation to run BEFORE any per-tile terrain read: map extents (x/y/z tile counts), the fort-core coordinate (the same 3D citizen centroid defenses() reports), surface_z_at_core —... |
| mandates_and_justice | The fort's nobility overhead as facts. Active production mandates (a noble's make-N-of-an-item quota with its remaining count and days to deadline) and export bans, listed by item. |
| mechanisms | The fort's lever/pressure-plate wiring as facts — players (and an AI co-pilot) routinely forget which lever raises which bridge; this makes it legible. |
| military | The fort's military: number of squads, how many living present dwarves are actually enlisted (soldiers), filled squad positions, and readiness read against hostiles currently on the map... |
| moods | Any active strange mood (fey/secretive/possessed/macabre/fell) and its material countdown. |
| nobles_and_administrators | The fort's appointed positions (manager, bookkeeper, broker, chief medical dwarf, sheriff, expedition leader/mayor, militia commander/captain, hammerer, and any higher noble the site has grown into)... |
| petitions | The fort's outstanding agreements as facts: location petitions (temple/guildhall requests from a deity's worshippers or a guild) and residency/citizenship petitions (a migrant or visitor asking to... |
| rooms_and_zones | The fort's facility inventory, each count paired with its demand-side number where one exists: bedrooms (assigned/unassigned vs. |
| site_history | This fort's entry in the PERMANENT world saga (the durable history event log, not the pruned live report stream). |
| stockpiles | The fort's hauling/logistics picture: every stockpile as a fact sheet, plus fort-wide backlog signals stockpiles alone don't surface. |
| stocks | Food and drink as estimated days-of-supply for the current population, plus counts of critical materials (wood, fuel, cloth, tanned hides, stone) and lists of notably low or high stocks. |
| threats | Dangerous units currently on the map, grouped by creature type. Separates ACTIVE hostiles from CONTAINED ones (caged/chained), flags great-danger creatures (megabeasts, titans, demons, forgotten... |
| tile_region | A bounded window of ONE z-level rendered as an ASCII character grid plus a self-describing legend (every response carries the legend for exactly the glyphs it uses). |
| trade | The trade picture right now: whether a trade depot exists, is complete, and is wagon-accessible (DF's own pathability check, not merely built); which caravans are present and their lifecycle state... |
| unmet_needs | Why the fort is stressed: the dwarven needs system aggregated across all citizens. Returns the top unmet needs (e.g. |
| wiki_lookup | Fetch a Dwarf Fortress wiki article as clean, readable text, pinned to the DF2014 namespace. Follows redirects (multi-hop) and honors section fragments (e.g. |
| wiki_search | Search the Dwarf Fortress wiki (MediaWiki) for candidate article titles and cleaned snippets. Discovery/disambiguation step before wiki_lookup; biased to the DF2014 (Steam/Premium) namespace. |
| work_details | List the fort’s work details (the labor-management groups) as facts: each detail’s name, mode (OnlySelectedDoesThis / EverybodyDoesThis / NobodyDoesThis / Default), the labor tokens it enables, and... |
| work_order_list | List the fort’s active manager (work) orders as facts: id, job type, output item/material tokens, amount total/left, repeat frequency, bound workshop, condition count, and per-order validation state... |
Signals
- Forks
- 1
- Last commit
- Aug 2026
- Weekly downloads
- 83
- Tools captured
- 37