Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ don't clone it to work on the server.
stripping (`node src/index.ts`); no ts-node. (`engines` in `package.json` is the
looser `>=20` — that governs the _published_ bundle's runtime, not this
from-source dev workflow.)
- **Windows-native by default.** DF + DFHack run on the Windows host; there is no
headless mode yet (that's [#27](https://github.com/alexanderolvera/dfhack-mcp/issues/27)).
- **Windows-native by default.** DF + DFHack run on the Windows host; headless mode is available via Docker (see [docker/README.md](docker/README.md)) ([#27](https://github.com/alexanderolvera/dfhack-mcp/issues/27)).
- **Don't expose the fort.** Never enable `allow_remote` in `remote-server.json`.
DFHack's RPC only accepts connections that _originate_ from `127.0.0.1`, so the
server talks to `localhost:5000` by default. `DFHACK_HOST` / `DFHACK_PORT` can
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ All optional, set in your MCP client's `env` for the server:
| `DFHACK_PORT` | `5000` | Port for DFHack's Remote RPC. |
| `DFHACK_MCP_ACTUATORS` | _(unset)_ | Set to `1` to expose the write actuators (off = strictly read-only). |
| `DFHACK_MCP_DEV` | _(unset)_ | Set to `1` to expose `run_lua`, a raw DFHack Lua escape hatch (reads **and writes** game state; for tool authors only). |
| `DFHACK_MCP_QUERY_DIR` | `src/dfhack-queries/` (dev) / `dist/dfhack-queries/` (bundled) | Overrides the directory from which the MCP query scripts are loaded. |

## Troubleshooting

Expand Down
3 changes: 2 additions & 1 deletion src/wiki/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { cleanHtml } from './clean.ts';
import pkg from '../../package.json' with { type: 'json' };

const API = 'https://dwarffortresswiki.org/api.php';
const USER_AGENT = 'dfhack-mcp/0.1 (personal DF co-pilot)';
const USER_AGENT = `${pkg.name}/${pkg.version} (personal DF co-pilot)`;
// The wiki kept DF2014 for the Steam/Premium release — a known constant, no v50.
export const VERSION_NS = 'DF2014';
const SEARCH_LIMIT = 8;
Expand Down