Devtools and message logs
A game that behaves strangely is hard to debug from the server log. A Minekube game records every message it handles, with the Model after it and the Commands it issued. The devtools show that message log live, and your coding agent reads the same log through MCP. You both look at the same facts.
What a message log holds
Section titled “What a message log holds”Each running bundle writes its log as Effect UI MessageLog entries, one per line of its recording. The devtools read the same entries.
| Entry | Means |
|---|---|
SessionStarted |
A revision started. Each start is one session. |
Mounted, Unmounted |
A component instance started or stopped, with its props, its first Model and the Commands of init. |
Update |
A message arrived. The entry has the message, its source (such as a Subscription or a Command), the Model after it and the Commands it issued. |
CommandStarted, CommandEnded, CommandInterrupted |
A Command ran. Each entry points to the Update that issued it. |
SubscriptionStarted |
A Subscription began to deliver messages, such as a Paper event. |
Failed |
A component failed in update, a Command, a Subscription or init. |
Every entry has a sequence number and points to the entry that caused it. That is how the devtools answer why something happened.
The devtools
Section titled “The devtools”mk server runs the Effect UI devtools and streams every recording the server writes into them as a session. Open http://127.0.0.1:4774 while you play:
- Timeline: every entry of the newest session, live: messages, Commands, Subscriptions, failures.
- Cause chains: why an entry happened, back to the event that started it.
- Model diffs: what each message changed in the Model.
The devtools are read-only: they observe the game, they do not play it. The dev network (mk server --network) sends its proxy’s and servers’ recordings to the same devtools; whichever of the two starts first serves port 4774 and the other feeds it. Clients started with mk client stream theirs there too.
MCP for coding agents
Section titled “MCP for coding agents”Agents read the same sessions through the effect-ui MCP server at http://. Here, yours explains why a friend’s score went back to zero after a save:
Every project has the server configured in .mcp.json:
{ "mcpServers": { "effect-ui": { "type": "http", "url": "http://127.0.0.1:4774/mcp" } }}| Tool | Answers |
|---|---|
list_sessions |
Which sessions exist. Start here. |
list_instances, list_entries |
The component instances in a session and their entries. |
get_chain |
Why something happened: the chain of causes behind an entry. |
get_state, diff_state |
The Model at any entry, and what changed between two. |
count_entries |
A summary of a session’s entries. |
get_entry returns one entry in full, as its Wire frame. list_entries lists entries oldest first, filtered by instance, message tag or field, and with or without Command runs.
dispatch is off: an agent can inspect the game, not send it messages. To act in the game, an agent starts a bot client, which plays like a person.
The skill and AGENTS.md
Section titled “The skill and AGENTS.md”Every project comes with AGENTS.md, the minekube-games skill and one strict check, so an agent knows the rules before it reads a session. See Build with a coding agent.
Runtime messages
Section titled “Runtime messages”The runtime also reports in the server log and, for operators, in chat with the prefix [games]. The runtime messages reference lists each message, what it means and what to do.
Real clients
Section titled “Real clients”Clients started with mk client stream their recordings into the same devtools, one session per bundle. A test or an agent can then read the server’s side and the player’s side of the same moment. See Test with bot clients.
Was this helpful?
Thanks for the feedback.