# K3 Studio > A native Windows editor for FiveM servers. It starts FXServer, restarts the resource you save, shows runtime SCRIPT ERRORs on the line they came from, and runs Claude Code with an MCP server that can read the console, query the database and drive the game. K3 Studio is written in Odin with SDL3 + OpenGL and is GPL-3.0. Source and releases: https://github.com/Kr3mu/k3studio ## Docs - [Getting started](/getting-started.md): Requirements, Build and run, First run, What do you want to make?, Layout, Settings and keybindings, Installing, Updates, Releasing - [Editor](/editor.md): K3 Studio draws everything itself: a single GL draw call with SDF rounded rects, its own glyph atlas with kerning, and a rope text buffer. It only redraws when something changes, so it sits at about 0% CPU when idle. - [Language servers](/language-servers.md): The web servers are installed once with bun and pinned to fixed versions. You can see each server's state (starting / idle) in the Web panel. - [Live](/live.md): This is what makes K3 Studio different from other editors: it's connected to the server it started. - [Agent & MCP](/agent.md): K3 Studio drives Claude Code (the claude CLI) in its stream-JSON mode. Ctrl+L toggles the panel. - [Server](/server.md): Running FXServer, Console, New project wizard, server.cfg as a form, server.cfg as text - [Resources](/resources.md): fxmanifest.lua as a form, What runs where, Resources panel and details, Focus on a resource, New resource, Generate documentation - [Core workspace](/core-workspace.md): Support for TypeScript monorepos that ship as one core resource: apps/*, lib/, configs//.json, built with tsdown and vite. - [Database](/database.md): Connection, What you can do, SQL everywhere - [Git](/git.md): K3 Studio uses the git CLI (porcelain v2). Status and every git action run on worker threads, so the UI never waits on git. - [Web & NUI](/web-nui.md): Packages, Scripts, ui_page dev / build, Chrome 103 compatibility - [Vehicle handling](/handling.md): Open it from the Game rail item. K3 Studio lists every vehicle it finds in the handling.meta files of your workspace. - [Releasing K3 Studio](/releasing.md): A release is a git tag. Pushing a v* tag runs the release workflow. The workflow builds K3 Studio with that version, packs the installer and publishes it as a GitHub release. Installed copies of K3 Studio see the new release the next time they start and update themselves (see Updates). ## MCP server K3 Studio runs an MCP server (JSON-RPC over HTTP POST on 127.0.0.1, random port, bearer token) and attaches it to Claude Code with --mcp-config. Game tools act on the first connected player through the fed-bridge dev resource. db_execute asks the user first. - `server_status`(): Whether K3 Studio's FXServer is running, its endpoint, and how many runtime errors are open. - `server_console`(`lines`?: integer): The latest server and client console lines (FXServer output and the FiveM client log). - `server_command`(`command`: string): Runs a command in the FXServer console, e.g. 'ensure inventory' or 'refresh'. - `runtime_errors`(): SCRIPT ERRORs the server and client consoles reported since each resource last restarted, with file, line, count and stack. - `diagnostics`(`path`?: string): Language server diagnostics (qbx-lua-ls: wrong-side natives, undefined globals, ...) for one file or all open files. - `open_file`(`path`: string, `line`?: integer): Opens a file in K3 Studio's editor, optionally at a 1-based line, so the user sees it. - `playtests_run`(`filter`?: string): Runs the playtests (Lua files in each resource's playtests/ folder, in the game or with '-- side: server' on the server) and returns PASS/FAIL per test with the failure's message and line. filter: only tests whose name contains it. - `db_query`(`sql`: string): Runs a read-only SQL statement (SELECT, SHOW, DESCRIBE, EXPLAIN) on the server's database; returns tab-separated rows. - `db_execute`(`sql`: string): Runs a SQL statement that changes data on the server's database; K3 Studio asks the user first. - `game_state`(): The player's position, heading, street, zone, vehicle and interior in the running game. - `game_players`(): Every connected player: id, name, ping and position. - `game_teleport`(`x`: number, `y`: number, `z`: number, `heading`?: number): Moves the player (and their vehicle) to x, y, z, optionally facing heading. - `game_spawn_vehicle`(`model`: string): Spawns a vehicle by model name (e.g. 'adder') and puts the player in it. - `game_walk_to`(`x`: number, `y`: number, `z`: number, `run`?: boolean): Sends the player to x, y, z like a person would: on foot along the navmesh (run: running) or driving when in a vehicle, so zones and markers on the way trigger (game_teleport skips them). Returns at once with the distance; check arrival with game_wait_for or game_state. - `game_press`(`control`: string, `ms`?: integer): Holds a game control down for ms (default 100, max 5000), as if the player pressed it: an id (38) or name (INPUT_PICKUP) from FiveM's controls list. - `game_screenshot`(): Saves what FiveM's window shows as a PNG and returns its path (open it to see the game). The game must be on screen. - `game_wait_for`(`code`: string, `side`?: "game" | "server", `timeout_ms`?: integer): Re-evaluates a Lua condition in the game (side 'server': on the server) every 100 ms until it's truthy, up to timeout_ms (max 7000). Returns its value or 'timed out'. - `game_eval`(`code`: string, `side`?: "game" | "server"): Runs Lua and returns its value: side 'game' runs in the player's client, 'server' on the server. An expression or statements. ## Optional - [Everything in one file](/llms-full.txt)