dfhack-mcp

MCP serverAI & models

MCP 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)

ToolWhat it does
artifacts_and_engravingsThe 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...
burrowsThe 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)...
chronicleThe fort's announcement/report stream (combat, deaths, moods, artifacts, sieges, migrants, ...) as triaged, cursor-addressable events. Reads the rolling, front-pruned report window.
citizenA 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...
defensesWhere 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...
environmentThe 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...
farmingThe 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_unitLook up citizens by a name fragment or profession (case-insensitive, matches either).
fluidsWater 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_healthThe fort's computational health as facts — FPS death is the true endgame boss, and nothing else reports it.
fort_statusOne-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_dataLook up the LOADED WORLD's raws (ground truth for THIS world) and return curated, labeled facts.
geologyA 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_routesThe fort's minecart hauling infrastructure: routes, each route's stops, and the vehicle (minecart) objects fort-wide. routes[] is {id, name?, stops[], vehicles[]}.
identifyOne-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_healthThe 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_laborWorkforce 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_pasturesThe fort's tame animal economy as facts — every prior tool sees hostiles (threats) or nothing at all here.
map_overviewCheap 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_justiceThe 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.
mechanismsThe 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.
militaryThe 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...
moodsAny active strange mood (fey/secretive/possessed/macabre/fell) and its material countdown.
nobles_and_administratorsThe 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)...
petitionsThe 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_zonesThe fort's facility inventory, each count paired with its demand-side number where one exists: bedrooms (assigned/unassigned vs.
site_historyThis fort's entry in the PERMANENT world saga (the durable history event log, not the pruned live report stream).
stockpilesThe fort's hauling/logistics picture: every stockpile as a fact sheet, plus fort-wide backlog signals stockpiles alone don't surface.
stocksFood 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.
threatsDangerous 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_regionA 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).
tradeThe 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_needsWhy the fort is stressed: the dwarven needs system aggregated across all citizens. Returns the top unmet needs (e.g.
wiki_lookupFetch 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_searchSearch 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_detailsList 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_listList 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