Skip to main content
Glama
dzstudio-mcp
by siemendev

dzstudio-mcp

CI npm

An MCP server that lets an AI agent build in dzStudio, the in-game object editor for DayZ, together with people. The agent joins a dzStudio collaboration session as a participant without the game: it speaks the open collaboration protocol dzcollab 1 (see PROTOCOL.md of the dzStudio collaboration server), keeps the project state on your machine and applies every operation exactly like the editor does. Everyone in the session sees it as "‹you›'s agent", with a status line saying what it is working on.

The agent works on data, not on screenshots. It never saves: when it is done it asks for review, and a person in the session saves or discards.

Setup (once)

Requires Node.js 22 or newer. Add it to your MCP client, for example in Claude Code:

claude mcp add dzstudio -e DZSTUDIO_MCP_SERVERS=dzbot=https://collab.dzbot.de/dzcollab/ -e DZSTUDIO_MCP_AGENT_NAME=Scout -- npx -y @dzbot/dzstudio-mcp

or in a client's JSON configuration (Claude Desktop, Cursor and others):

{
  "mcpServers": {
    "dzstudio": {
      "command": "npx",
      "args": ["-y", "@dzbot/dzstudio-mcp"],
      "env": { "DZSTUDIO_MCP_SERVERS": "dzbot=https://collab.dzbot.de/dzcollab/", "DZSTUDIO_MCP_AGENT_NAME": "Scout" }
    }
  }
}

Use your own server's address instead of dzbot's if you run the collaboration server yourself. To run it from a checkout instead: npm install && npm run build, then node /path/to/dzstudio-mcp/dist/index.js as the command.

That is all the configuration there is. From then on you work in the conversation:

  1. Servers — the agent adds a server with add_server (a name of your choice and the server's base address), or you name them once in DZSTUDIO_MCP_SERVERS (name=url, comma-separated).

  2. Login — login gives you an address and a code; confirm it in the browser and the agent finishes the login. The token is stored on your machine and kept across restarts.

  3. Sessions — the agent lists projects and sessions, joins one (by id, by opening a project that has a running session, or with an invitation code), and can be in several sessions at once.

Settings and tokens live in ~/.config/dzstudio-mcp/ (or $XDG_CONFIG_HOME/dzstudio-mcp, %APPDATA%\dzstudio-mcp on Windows, or the directory in DZSTUDIO_MCP_CONFIG_DIR). credentials.json is readable only by you; no tool ever returns a token to the agent.

Variable

Meaning

DZSTUDIO_MCP_SERVERS

Servers added on start if missing: name=url,name=url

DZSTUDIO_MCP_AGENT_NAME

Short name of the agent (default Agent)

DZSTUDIO_MCP_CONFIG_DIR

Where settings and tokens are kept

DZSTUDIO_MCP_CACHE_LIMIT_MB

Size limit of the map data cache in MB (default 2048)

DZSTUDIO_MCP_WORLD_DATA

Class and map data: a folder or a file:///https:// base address (overrides worldData.base)

DZSTUDIO_MCP_WORLD_DATA_POINTER

Pointer to the current revisions for a base address (overrides worldData.pointer)

Class and map data

The world tools compute on static data: per world 256 m tiles with terrain heights, surface, walkable surfaces and static objects, and one class index with boxes, dimensions and shape rasters. By default they come from dzbot (https://uploads.dzbot.de/world-data/, current revisions from https://dzbot.de/api/public/world-data). Another source is set once in config.json:

{ "worldData": { "base": "file:///srv/world-data/" } }

or a mirror with its own pointer:

{ "worldData": { "base": "https://mirror.example.org/world-data/", "pointer": "https://mirror.example.org/world-data.json" } }

A local folder has the published layout (classes/<revision>/…, worlds/<world>/<revision>/…); its newest revisions are used and the map key comes from each manifest. Downloaded files are kept in cache/ of the config directory below their revision and never requested again; every tile and raster is checked against size and SHA-256 from the manifest, a changed file in the cache is loaded once more, and a file that stays wrong is reported as "map data corrupt". The session's map key (e.g. chernarus) picks the world; the revision stays the same for the whole session. Missing data are "unknown", never zero: a class without data has "box unknown", a map without data gives "No map data for ‹map› — project objects only", and a tile that cannot be loaded is named in the answer.

The cache holds at most 2 GB. Above that, the least recently used tiles and rasters are deleted (and downloaded again when a question needs them); nothing of a revision that a session the agent is in works on is ever deleted. Another limit is set in MB with worldData.cacheLimitMb in config.json or DZSTUDIO_MCP_CACHE_LIMIT_MB:

{ "worldData": { "cacheLimitMb": 512 } }

Related MCP server: DMI MCP Server

Tools

Tool

What it does

list_servers, add_server, login

Servers, whether you are signed in, whether they admit agents

list_projects, open_project, join_session

Projects and sessions you may join; join one, or open a project on the server that nobody has open

list_sessions, switch_session, leave_session

The sessions the agent is in; the current one is used when a tool names none

session_info, session_events

Participants with phase and status, rights, save state; what happened since the last call

read_scene, query_objects

Groups and objects of the project, by id, group, class, circle or rectangle; how many entries each layer holds

create_objects, modify_objects, delete_objects

Each call is one step for everyone; objects are locked first

query_layers

Entries of the layers Spawns, Effects and Territories, by layer, id, name, circle or rectangle, with position, radius and values; entries carried over unchanged come last, read-only

edit_spawns, edit_effects, edit_territories

One step in a layer, as dzStudio makes it: spawn points, fixed vehicles and event counts; effect areas; zones and counts. Entries are locked first

read_extensions

The project's extensions with their data (for example the dzbot rules of a project mod), read-only

release

Let others edit objects the agent holds

set_status, request_review

Phase (waiting for work, working, waiting for review) and the status line everyone sees

world_info

World, data revisions, game version and export date for the session's map; place names near a point or by text

world_objects

Static map objects and project objects whose box touches a circle or rectangle, with transform, distance and size or "box unknown"

ground_at

Terrain height, material, water, roads and building floors at up to 1000 points; the highest surface below a height

object_ground

How project objects or a hypothetical placement stand: "floats ‹x› m", "‹x› m in the ground", or the corner distances

check_overlap

Which map and project objects intersect, as rotated boxes with penetration depth; with precise, the collision rasters confirm each intersection (pairs without a raster are compared as boxes and say so); objects without a known box are named

class_info

Size, clipping and collision box, radius, flags and raster of classes or models

Some rules the MCP keeps for the agent: it joins only servers that announce the agents capability, so nobody sees it as a human; it changes an existing object or layer entry only while holding its lock; it never saves, invites, removes anyone or ends a session; it does not edit loot (loot entries pass through unchanged), the entries a project carries over unchanged, or the project's extensions; after 30 minutes without work it leaves a session and joins again on the next task.

Layers. The agent edits the Spawns, Effects and Territories layers with the same operations dzStudio sends for the same edit, numbers written the way the editor writes them (new effect areas are named as in the English editor, e.g. DzsGeyser1). What it can do there is what the session's state tells: own spawn points and fixed vehicles, own effect areas, own zones, and changes the project already makes to the mission's spawn points, areas, zones and counts (move again, remove, change a count back or on). Everything that needs the mission's own files — moving a base spawn point, area or zone the project does not touch yet, changing a count for the first time, a new zone of an animal or infected kind — dzStudio reads from the game's mission folder, so the agent leaves it to a person in dzStudio. Entries made outside dzStudio that no layer writes back as they are (dzbot's workbench, its AI, another program) are carried over unchanged and shown read-only, as dzStudio shows them.

Restarts. The MCP keeps every session it is in, with its place in the session log and the project state there, in sessions/ of the config directory. When it stops it does not leave; when it starts again it returns to each session as the same participant and continues from that place, with what others did in the meantime. If the server cannot take it back that way (it was away too long, or the server no longer has the log from there), it joins anew. A session it would have left while idle meanwhile, or one that ended, is forgotten.

Opening a project nobody has open. When no session is running for a project on the server, open_project loads its files and builds the project state exactly as dzStudio does when it opens them — the same groups, objects, layer entries, ids form, companion data and order, byte for byte — then starts the session with it, as the only participant. For a project file of version 2 that includes what dzStudio's opening does after the load: each layer takes the blocks and changes it would write back as they are and restores its elements from them, everything else is carried over unchanged, and the project's extensions (such as the dzbot rules) go into the state. This needs the right to save the project (the server checks it) and the class data (for each object, dzStudio notes whether the game knows its class; the class data stand in for the game). Where dzStudio's result depends on the running game and not on the files, the MCP refuses instead of opening a different state: a group file that places a model by its path (the game places the model to learn its origin), a project with loot turned on, or extensions on object groups, objects or carried-over entries (dzStudio hands those to its model only once it has indexed the opened project, at a moment that depends on the game). A person then opens it in dzStudio, and the agent joins that session. Agents never create a new project.

Development

npm test           # unit tests, plus an integration test against the reference collaboration server if Go is installed
npm run typecheck
npm run format

The integration tests build the reference server from ../collab-server (or DZCOLLAB_SOURCE), or use the binary in DZCOLLAB_SERVER, and run it on a free port on 127.0.0.1. One of them drives the whole agent flow through an MCP client: login with a code, joining a person's session, status, a step, review, leaving. Without Go and without a binary they are skipped.

The world tools are tested on a tiny world in test/fixtures/world-data, made with the reference converter. An opt-in test compares every answer with the converter's JavaScript reader on a full converted world: it runs when DZSTUDIO_MCP_WORLD_DATA_REFERENCE (default /tmp/world-data-out) holds one and DZSTUDIO_MCP_WORLD_DATA_READER points to world_data_read.js; DZSTUDIO_MCP_WORLD_DATA_WORLD picks the world (default chernarusplus).

Directory

Content

src/scene

The project state outside the game: text form, numbers, chunks, ids, applying operations, building new ones, the layers' models and edits, opening a project from its files

src/protocol

The dzcollab 1 client: requests, the session with its poll and send channel

src/config

Servers, agent name, tokens and the world data source, configured once

src/world

Class and map data: file formats, loading and cache, and the geometry behind the world tools

src/mcp

The tools and the MCP wiring

Contributing

Issues and pull requests are welcome, see CONTRIBUTING.md.

License

AGPL-3.0, see LICENSE.

Available Tools

25 tools
add_serverB

Add a collaboration server under a name of your choice, e.g. "dzbot" or "local". It is kept across restarts.

Inputs: url (required), name (required).

check_overlapA

Which static map objects and project objects intersect project objects (ids) or a hypothetical placement, compared as rotated boxes (collision box, otherwise clipping box) with the penetration depth in m; objects without a known box are named, never treated as free. With precise, a box intersection counts only if the collision rasters (shape seen from above) confirm it, which handles L-shaped buildings, roofs and gaps; each pair says whether it was compared by rasters or, without one, as boxes only.

Inputs: ids, map, precise, session, +1 more.

class_infoA

Dimensions of classes or models: size [X, Y, Z] in m, clipping and collision box, radius, flags, whether a shape raster exists. By class name (case does not matter) or model path / model id; unknown classes say so.

Inputs: names (required).

create_objectsA

Create groups and objects as one step. New groups get a ref you can use as the group of objects in the same call; an object group may also be an existing group id or name. Position [x, y, z] in m, orientation [yaw, pitch, roll] in degrees, scale (default 1). The new objects are held by you until you release them or ask for review.

Inputs: groups, objects, session.

delete_objectsC

Delete objects or groups (with their objects) as one step. Objects are locked first.

Inputs: ids (required), session.

ground_atB

Ground at up to 1000 points (X, Z): terrain height (bilinear), material and water of the nearest grid point, sea level in the sea, walkable surface (road, bridge, floor) with height and model, walkable surfaces of buildings there; with y also the highest surface below y.

Inputs: points (required), map, session.

join_sessionA

Join a session by its id (from list_projects) or with an invitation code. The joined session becomes the current one.

Inputs: code, server, session_id.

leave_sessionB

Leave a session once every change has reached the server (waits up to 10 s). With confirm, leave even if changes are still unsent.

Inputs: confirm, session.

list_projectsB

Projects on a server the user may open (name, map, whether a session runs, whether they may save), and the sessions the agent may join.

Inputs: server.

list_serversB

The configured dzStudio collaboration servers: name, address, signed in, and whether they admit agents.

Inputs: no named parameters.

list_sessionsB

The sessions the agent is in, with server, project, phase, status and which one is current.

Inputs: no named parameters.

loginA

Sign in to a server with a code the user confirms in the browser. The first call returns the address and code to give to the user; call it again after they confirmed. The login is kept across restarts. For servers in a local network that only accept a name, pass name.

Inputs: name, server.

modify_objectsA

Change existing objects (position, orientation, scale, group, hidden, locked, persist, customString) or groups (name, color, hidden, locked) as one step. Objects are locked first; if someone else is editing one, nothing changes.

Inputs: changes (required), session.

object_groundB

How project objects (ids) or a hypothetical placement stand on the ground: the four lower corners of the box with the surface below and the distance; "floats m", " m in the ground", or the smallest and largest distance.

Inputs: ids, map, session, placement.

open_projectA

Open a project on the server: join its running session, or, when none is running, load its files and start one (only with the right to save it). Agents never create projects or save.

Inputs: project (required), server.

query_objectsB

Objects by ids, group (id or name), class, a circle (X, Z, radius in m) or a rectangle (X, Z), with id, class, group, position [x,y,z], orientation [yaw,pitch,roll], scale, hidden, locked and who holds it. Pages of 500.

Inputs: ids, near, page, rect, +3 more.

read_sceneB

Overview of the project: map, groups with name, object count, hidden, locked and the X/Z bounds of their objects; loot on or off.

Inputs: session.

releaseB

Release held objects so others can edit them: the named ones, or all.

Inputs: ids, session.

request_reviewA

Done: switch to "waiting for review" with an optional summary as status and release everything held. A person then saves or discards; agents never save.

Inputs: status, session.

session_eventsB

What happened since the last result: joins, leaves, saves, discards, removal, own steps dropped, locks taken or released, connection. Waits up to wait_seconds (at most 30) for an event.

Inputs: session, wait_seconds.

session_infoC

Participants (humans and agents, phase and status, location, held objects), own rights, and the save state.

Inputs: session.

set_statusA

Set the phase ("waiting" for work or "working") and a one-line status everyone in the session sees, e.g. "building a military camp at the airfield". At most 200 bytes.

Inputs: phase (required), status, session.

switch_sessionC

Make another session the current one.

Inputs: session (required).

world_infoB

Which map data exist for the session’s map: world, data revision, game version, export date, class data revision, size, sea level; place names near a point (near: X, Z, radius, default 2000 m) or matching a text (place).

Inputs: map, near, place, session.

world_objectsA

Static map objects (buildings, trees, rocks, walls) and project objects in a circle (X, Z, radius in m) or rectangle, optionally by class or flags (1 building, 2 tree, 4 bush, 8 rock, 256 house): id, source (map or project), class, model, position, orientation [yaw, pitch, roll], scale, distance, size [X, Y, Z] or "box unknown". An object counts if its box touches the area. Pages of 500.

Inputs: map, near, page, rect, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions, and the detailed descriptions help separate similar areas such as scene reading, object querying, and static-world querying. The main ambiguity is between open_project and join_session, plus some overlap among list_projects, list_sessions, and session_info, but these are mostly clarified by the descriptions.

    Naming Consistency4/5

    The tool set overwhelmingly uses readable snake_case names, with a predictable verb_noun or noun_detail style. There are a few deviations such as bare verbs (login, release) and noun-first names (session_info, world_objects), but the convention remains understandable throughout.

    Tool Count3/5

    Twenty-five tools is heavy for a single server, though the domain is broad: authentication, server configuration, sessions, world queries, object editing, and review workflow. The count is borderline rather than clearly excessive, but some session and world-query tools could likely be consolidated.

    Completeness4/5

    The surface covers the core lifecycle well: server login, session discovery and switching, scene inspection, object creation/modification/deletion, ground checks, overlap checks, and review handoff. Minor gaps exist, such as no explicit object-name search and some operations intentionally delegated to humans, but core agent workflows are well supported.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Connects MCP-aware AI clients to a live SketchUp session so users can create and modify 3D models, apply materials, perform booleans and joinery, and export scenes through natural-language prompts.
      22
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects AI agents to the DMI network so they can receive engineering challenge tasks, submit solutions, and have their progress spectated live.
      15 npm
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables an AI agent to host a shared folder or join an invite link as a participant in a collaborative editing session, reading, editing, and writing the files the room shares. Runs the same sync engine and wire protocol as editor clients, so an agent and a person or another agent converge on the same documents and see each other's changes.
      10
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to drive a live Blender session over stdio, inspecting the scene graph, searching and calling operators, reading and writing RNA properties, rendering viewable images, and checkpointing or restoring the file across a multi-turn conversation. It also exposes gallery and scene-reset helpers so the agent can check its own work and start over cleanly.
      21
      GPL 3.0