K3 studio WSk3studio
studio.kr3mu.dev Get started

Agent & MCP

K3 Studio runs a coding agent in a panel: Claude Code (the claude CLI), Codex, Antigravity or OpenCode. Ctrl+L toggles the panel.

Agent panel

  • Chat, with each step shown as it happens (Read, Edited…). Code blocks are colored by their language, and markdown tables show as tables.
  • Edits are hunks you accept or reject, or you can turn on Always accept edits
  • The composer wraps and grows and takes the mouse like the editor (click, drag, double-click a word, Shift+click). You can attach images, and the open file and the console come along as context chips. While the server runs, every message also carries the game's state: your position as vec4(x, y, z, heading), street and zone, vehicle, health (or that you're dead), god / noclip / invisible, the last inspected entity and your saved places, so the agent can use "here" or "the garage" without asking.
  • Model and effort pickers (changing them resumes the same conversation), and an Ask / Auto chip: Auto approves every tool in that conversation. Settings has the default for new sessions.
  • Tokens and cost for each conversation, and for Claude Code and Codex the % left of the 5-hour and weekly subscription windows
  • Sessions you can switch between and resume. /new codex (or another backend's name) starts one with that agent.
  • Claude Code starts warming up while you're still typing
  • Messages you send while the agent is working wait in a queue and go out when the turn ends. Click one to take it back and edit it. Ctrl+Enter stops the turn and sends your message right away. Esc (or the stop button) stops the turn and puts anything queued back in the composer.

Type / to get suggestions for the agent's own commands and skills, plus K3 Studio's:

Command What it does
/new [agent] A new conversation, optionally with another backend
/model, /effort Pick the model or effort by name
/ask, /auto Ask before tools, or approve them, in this conversation
/split Show a second conversation live beside this one
/game Show the game beside the conversation in the Agents layout
/memory Notes shared by every agent in this folder
/skill Install the k3studio skill into Claude Code and Codex (run it again after an update)
/cost, /export, /stop, /clear Token use, copy as Markdown, stop the turn, start over

Agents layout

Ctrl+Alt+L (or the agent button in the title bar) swaps the editor for a list of every session beside a full-width conversation. The bottom panel keeps its own strip under it. Ctrl+click a session to split it in beside the one shown. When an agent opens a file, a 3D view or a page, the layout steps aside so you see it.

Agents working in the same folder know what the others are doing and which files they changed. With Follow the agent on (Settings), auto-approved edits open in the editor at the change. Agents never move your view while you're in the Agents layout, while more than one conversation is open, or while you're typing: edits don't open, and open_file and preview tell the agent to name the file instead.

Agents look at and change props, shells, maps, interiors, liveries and textures without taking over your screen: K3 Studio opens the file for the call, draws it offscreen for the agent's pictures, then puts your tab, page or Agents layout back and closes the tab it opened. If you have unsaved changes in the same kind of editor, the agent is told to wait. In the Agents layout, game_screenshot shows the game beside the conversation for a moment instead of switching to the FiveM tab.

Permissions

When the agent wants to use a tool, you get a card in the panel: Ask each time, or Always allow for the rest of the session.

K3 Studio as an MCP server

K3 Studio runs an MCP server over HTTP on 127.0.0.1, protected by a token, and attaches it to Claude Code. Your own MCP servers still load as usual. Game tools act on the first connected player through the k3studio dev resource; press Esc to take control back. The site lists every tool with its parameters.

Server & editor

Tool What it does
server_status Is the server running, and from which folder
server_console Recent server and client console lines
server_command Run a console command
runtime_errors Errors the error lens has collected
diagnostics Problems from the language servers
playtests_run Run each resource's playtests/ and get PASS/FAIL per test
open_file Open a file in K3 Studio
preview Show you what it made: pages in the browser, other files in K3 Studio
k3studio_screenshot See K3 Studio: the window, the open editor or the 3D view
request_image Ask you for a picture through a card (choose a file or paste one)

Agents fix the problems K3 Studio flags. When one of K3 Studio's own checks is wrong about the code (a dev-only NUI mock, say), they may silence it with a k3-ignore comment that says why, as you can (Silencing a check). Search for k3-ignore to review what was silenced.

Database

Tool What it does
db_query Read-only SQL
db_execute SQL that changes data or schema; asks you first unless you approve automatically

Game

Tool What it does
game_state, game_players Where the player is, their health and whether they're dead, and who's connected
game_do The Game panel's buttons: heal (revives), god mode, invisible, noclip, fix or max out the vehicle, get in the nearest vehicle (walking to its door) or out, give a weapon, change ped, time, weather. While the player is dead, moving, pressing, spawning and changing ped are refused until they're revived; a ped change only takes ped models and keeps health and armour
game_teleport, game_walk_to, game_press Move the player (walking or driving triggers zones on the way) and press controls
game_spawn_vehicle Spawn a car and put the player in it
game_aim Aim the weapon the player holds at a point for a while, or fire at it
game_collision Does a prop collide: rays through the nearest one of a model (or the aimed one), and how many hit it
game_entities, game_delete List what's nearby, delete an entity before it crashes the game
game_eval, game_wait_for Run Lua in the client or on the server, wait for a condition. Code running 2 s without a Wait is stopped; timeout_ms waits up to 60 s
game_screenshot What the game shows; brings it up beside the conversation in the Agents layout, else in the FiveM tab
game_restart Close a crashed or hung FiveM and join again 20 s later
session_take, session_release Agents take turns on the server and game: the first in line holds them (K3 Studio starts the server and FiveM joins when they're down), the rest wait and their game and server tools are refused. The last release stops a server an agent started; a turn that ends or a closed session leaves the line too

Stream assets

See Stream assets for the editors these drive. Each kind has a _reference tool the agent reads first and a _look tool to check its work.

Tool What it does
creator_reference, creator_inspect, creator_edit, creator_look Props (.k3prop) and shells (.k3shell): parts, modifiers, materials, rooms
creator_export, creator_spawn Export to .ydr/.ytyp in the resource, and put one in front of the player
map_reference, map_inspect, map_edit, map_look Maps (.ymap): props and parked cars, in rows, grids, circles or scattered
interior_reference, interior_inspect, interior_edit, interior_look Interiors (.ytyp): rooms, portals, props, entity sets
interior_from_building An enterable interior for a building that stands in the game
livery_reference, livery_inspect, livery_edit, livery_look, livery_export Paint a livery layer by layer and see it on the car
texture_inspect, texture_edit, texture_look A .ytd's textures: add, replace, resize, adjust, normal maps, formats
k3studio › README.md Fun factIdles at about 0% CPU: it only draws when something changes Markdown qbx-lua-ls

Click or press Esc to close