evasivedocs
Roblox scriptingLuau 0.748 · 24 guides · 385 API entries
Tutorials

Using an AI assistant

evasive has a small local server that AI coding tools can talk to over MCP (the Model Context Protocol). Once it is on, an assistant on your PC can write scripts into your scripts folder, run them, read the console and list the API names this build has. You describe what you want, it writes and tests the script against the game you have open.

Turn it on

  1. Open the menu and go to Scripts.
  2. In the AI assistants card, tick Local MCP server.
  3. The card shows the Port (8765 unless you change it) and a Server line that should say Listening.
  4. Press Copy server URL. You get http://127.0.0.1:8765/mcp.

The server only accepts connections from your own PC. It is off by default, and evasive remembers the setting.

If something else already uses port 8765, pick another port with the slider (click the number to type one). The server moves once the value has stayed put for a second.

Add it to your tool

Every MCP-capable coding tool has a place for servers. Add one named evasive with the URL you copied. The transport is plain HTTP (some tools call it "streamable HTTP"), and no key or login is needed.

Tools that keep their servers in a JSON file usually want an entry like "evasive": { "url": "http://127.0.0.1:8765/mcp" } inside their "mcpServers" list.

Some tools name the field serverUrl instead of url, or want "type": "http" next to it. Tools with a command line usually have an "mcp add" command that takes the name and the URL. Check your tool's docs for the exact spelling.

Restart the tool (or reload its servers) and it should list the evasive tools.

What the assistant can do

Tool What it does
list_scripts Lists the scripts in your folder and which ones are running
read_script Reads a script's source
write_script Creates or overwrites a script. It does not run it.
run_script Runs a saved script and returns what it printed in the first second or so
execute Runs a snippet without saving it (it runs as mcp_snippet.lua)
stop_script / stop_all Stops one script or all of them
get_console Reads the console, picking up where the last read stopped
clear_console Clears the console
list_api Lists every global and function name this build has

The server does not serve these docs. They live on this site: the guide pages and the API reference.

run_script and execute wait up to wait_ms milliseconds (1000 by default, 10000 at most) to collect output, and return sooner if the script ends. A snippet that loops keeps running until the assistant (or you) stops it.

Everything the assistant runs shows up in the Scripts tab like any other script. You can watch the Output card while it works, and stop anything it started.

Getting good results

Assistants know Roblox Luau well, but they do not know what this build can and cannot do. A few lines in your request help a lot:

  • Ask it to call list_api before writing code, so it uses names that exist here.
  • Paste in the parts of these docs it needs, such as the API reference for the library you want to use.
  • Tell it the game is read from outside: it cannot create objects with Instance.new, fire remotes or hook game functions. What isn't available has the full list.
  • Ask it to test with execute and read the console, then fix what fails.
  • For anything that draws, ask it to remove or hide its drawings when it is done testing, or stop the snippet afterwards.

A request that works well looks like this: "Use the evasive MCP server. Call list_api with the filter Drawing first. Write esp.lua that draws a box and the display name over every other player, test it with run_script, check the console for errors and fix them."

Safety

The assistant can only do what a script can do. It cannot reach files outside your scripts and workspace folders, and the memory functions still need Allow unsafe Luau.

Still, it runs code in your game. Read what it wrote before you leave it running, and turn the server off when you are not using it.