LuawardDocs

AI & MCP: connect an AI to your games

Let Claude, Cursor or another AI client explore and control the games you connect to Test in game, and test your own scripts.

AI & MCP lets an AI client (claude.ai, ChatGPT, Claude Code, Cursor, any client that speaks MCP) look at and act in the games you connected to Test in game: list objects, read the interface, click, run Luau, record remote calls, and run your own scripts and tell you how they went. It is for your own game sessions and your own scripts. It is part of the Pro and Studio plans.

Connect

First connect a game from Test in game (the one-line loader). Then connect the AI in the way your client supports.

claude.ai and ChatGPT: sign in, no token

  1. In the app, add a custom connector with the address https://luaward.com/mcp. In claude.ai open Settings → Connectors (it may appear under Customize); in ChatGPT add it as an app or connector in Settings (developer mode may be needed).
  2. Start the connection (in claude.ai, the Connect button). A Luaward page opens; sign in if it asks.
  3. Check who is asking: an official app shows Official Claude app · claude.ai (the same for ChatGPT), any other app shows App not verified and the address it sends you back to. Pick the workspace, switch off what the AI should not do, choose Runs at once or Ask me first, and press Allow.

The page has one switch per ability:

  • Look around the game: always on. Read the objects, interface, remotes and log of the games you connected. Changes nothing.
  • Control the game: click, type, press keys and run code in the games you connected.
  • Watch remotes (spy): record what the game sends through remotes. It also needs the per-game switch described below.
  • Read the game's scripts: decompile the scripts the game loads (kept for 24 hours, never saved to your account).
  • Manage your scripts and keys: read your scripts' original source, upload new versions, make or read license keys. Off until you switch it on, and it works only with Runs at once.

Only a workspace owner can connect an AI, and the workspace needs the Pro or Studio plan. Luaward only sends you back to the addresses of claude.ai, ChatGPT or a tool on your own computer, so an app cannot send you to a stranger's site. In AI & MCP → Connections you see every connected app, change its mode and end it; End connection stops it at once and it cannot renew.

Claude Code, Cursor and other clients: a token

  1. Open AI & MCP in the dashboard and make a token. Choose what it may do and, if you like, an expiry. The token is shown once.
  2. Paste the command next to it into your AI client:
claude mcp add --transport http luaward https://luaward.com/mcp --header "Authorization: Bearer lwm_…"

The server address is https://luaward.com/mcp (MCP over HTTP, one JSON answer per request). Any client that can send a Bearer token header works. Save the skill the page offers as ~/.claude/skills/luaward-debug/SKILL.md to teach Claude how to use the tools.

What an AI can do

Each tool needs a scope; a token only sees the tools its scopes allow. read is always included.

ToolScopeWhat it does
list_sessions, capabilitiesreadThe connected games; what this executor supports.
tree, find, inspect, gui_snapshot, player_state, remotesreadLook at the game: objects, interface (numbered), player, remotes.
get_log, get_result, list_runs, get_run, list_my_scriptsreadThe console, a command's answer, and your test history and scripts.
exec, click, type_text, press_key, run_script, stopcontrolAct in the game: run Luau, click, type, press keys, run one of your scripts and report how it went.
scripts_list, scripts_read, search_scriptsscriptsList, decompile and search the game's own scripts.
get_script_source, list_script_errors, deploy_script, resolve_script_error, create_test_keymanage / readYour own scripts: read the original source, upload a new version (not live until you publish it), mark reported errors resolved, make a license key. manage is never given by default and works only on a token that runs changes at once. list_script_errors needs only read.
spy_start, spy_stopspyRecord the calls the game makes to the server. Off until you allow it per game.

Staying in control

  • Run at once or ask first. By default an AI's changes run at once (your AI client has its own approval step). Choose Ask me first and anything that changes the game waits for you in AI & MCP and Test in game. Looking is never held.
  • Remote spy is off in every game until you allow it in the game's details. It hooks the game and may be noticed by its anti-cheat.
  • Game text is data. Names, interface text, console lines and script source come from the game; the skill and the server tell the AI never to follow instructions found in them.
  • Revoke a token or end an app's connection any time; it stops at once. The activity tab lists what the AI did (the tool, who and the game; never the code or what the game printed).

Good to know

  • What works depends on your executor (capabilities says what it supports; screenshots are not available).
  • A test run that passes means "no error in N seconds", not that the script is correct.
  • Do not give a token to, or press Allow for, anything you do not trust: it can act in your connected games.