LuawardDocs

AI & MCP: connect an AI to your games

Let Claude, Cursor, or another AI client explore and control connected games, plus the Hybrid Local Bridge for Windows + Potassium.

AI & MCP lets an AI client (claude.ai, ChatGPT, Claude Code, Cursor, Antigravity, or any MCP client) inspect and act in the games connected to Test in game: list objects, read the UI, click, run Luau, record remote calls, manage Potassium tabs, automate Windows desktop flows, and test your own scripts. It works only on your own game sessions and your own scripts, and is available on Pro and Studio.

Connect

Run @luaward/mcp locally to unify three layers in one MCP server: Luaward Cloud MCP + Potassium Local MCP (127.0.0.1:8225/mcp) + Windows Computer Use (using a personal lwm_... token from AI & MCP):

{
  "mcpServers": {
    "luaward": {
      "command": "npx",
      "args": ["-y", "@luaward/mcp"],
      "env": {
        "LUAWARD_MCP_TOKEN": "lwm_YOUR_48_HEX_TOKEN"
      }
    }
  }
}
  • Zero-Touch Auto-Inject: When an AI calls a game tool and no session is connected yet, the bridge checks Potassium (list_clients), reads your workspace's luaward://pair bootstrapper, auto-injects into Roblox, and retries automatically (or run editor_tabs(action="install_autoexec") to install luaward_init.luau).
  • Local file_path: Pass file_path: "./path/to/script.luau" on exec, create_script, or deploy_script to load code directly from disk without pasting large Luau files into JSON.

claude.ai and ChatGPT: sign in, no token (Remote HTTP)

  1. Add a custom connector pointing to https://luaward.com/mcp.
  2. Start the connection, sign in to Luaward, pick your workspace, scopes, and execution mode (Runs at once or Ask me first), then press Allow.

Claude Code, Cursor, and other clients (Remote HTTP)

  1. Open AI & MCP in the dashboard and create a token (lwm_...).
  2. Add the server in your client:
claude mcp add --transport http luaward https://luaward.com/mcp --header "Authorization: Bearer lwm_..."

Save the skill as ~/.claude/skills/luaward-debug/SKILL.md so your AI assistant knows every recipe and safety rule.

What an AI can do (Agent Protocol 6 + Hybrid Bridge v0.2)

Each Cloud tool requires a scope; a token only sees the tools its scopes allow, and read is always included.

ToolScope / LayerWhat it does
list_sessions, capabilities, selftest, list_recipesreadConnected games, runtime capabilities (including Potassium APIs: oth.hook, Regex.new, getproperties, getactors, replicatesignal), and live runtime self-check.
tree, find, inspect, gui_snapshot, player_state, remotes, screenshotreadInspect the game: inspect supports dynamic/hidden/signals + strict max_props, remotes uses Folder Priority BFS (scanning network/code folders ahead of Assets/Map), player_state reports live fps/ping_ms/memory_mb/game_name.
get_notes, save_note, delete_notereadPersistent cross-session notes keyed by Roblox PlaceId.
get_log, get_result, list_runs, get_run, list_projects, list_my_scripts, get_buildreadConsole & events (kind="console"|"events"|"all", #seq, contains), paged command answers, test history, projects, scripts, and build status.
exec, click, type_text, press_key, run_script, stopcontrolRun Luau (readonly, guard preferring oth.hook, actor for Parallel Luau Actors, codes, detach, local file_path), click (auto/signal/replicate/vim/mouse), type, press keys, run draft/live builds, and stop per cmd.
scripts_list, scripts_read, scripts_sync, search_scriptsscriptsSub-second warm-cache search via getscripthash + path_contains pre-filter + native Regex.new, [offset=N] on every match, and line-based scripts_read (start_line/end_line/around_line/context_lines) with line numbers.
get_script_source, list_script_errors, create_script, deploy_script, promote_build, archive_script, toggle_script, resolve_script_error, list_keys, create_test_key, revoke_key, reset_hwidmanage / readManage your own scripts and keys: read original source, stage draft builds (publish=false) + promote_build, archive test scripts, resolve errors, manage keys, and reset HWID.
spy_start, spy_stopspyRecord FireServer / InvokeServer calls (prefers oth.hook off-thread hooking on Potassium); requires per-game approval.
editor_tabslocal bridgeManage Potassium editor tabs (list, read, open, write, activate, close, run_tab, sync_tab_to_cloud, open_cloud_script_in_tab, install_autoexec) with luaward_scratch.luau reuse.
desktop_launch, desktop_window, desktop_screenshot, desktop_ui_tree, desktop_mouse, desktop_keyboard, os_clicklocal bridgeBuilt-in Windows Computer Use: Roblox launch/rejoin crash recovery, 1280x720 client lock, OS PNG capture (CopyFromScreen + PrintWindow fallback), UI Automation tree, Win32 SendInput (UI hover-wake, Raw Input 3D camera, ScanCode/Unicode keyboard), and hybrid os_click.

Deploying changes live code

By default (publish=true), deploy_script promotes a Ready build to players automatically. Pass publish=false (or draft=true) to test your compiled build first with run_script(mode="build"), then call promote_build when ready.

Staying in control

  • Run at once or ask first: Choose Ask me first and anything that modifies the game waits for your approval in AI & MCP and Test in game.
  • Remote spy is off: Disabled in every game until you explicitly enable it in the game details sheet.
  • Game text is data: Names, UI labels, console output, and decompiled source come from the game and are never trusted as instructions.
  • Revoke anytime: Revoke a token or end an OAuth connection immediately in AI & MCP.