This guide takes you from zero to building FiveM/RedM resources with AI assistance. No prior experience with Cursor, Git, or Python is assumed -- every step is explained.
Table of contents
- What is this?
- Install the prerequisites
- Download the plugin
- Open the plugin in Cursor
- Set up the MCP server
- Verify everything works
- Build your first resource
- What to try next
- Troubleshooting
- Useful links
CFX Developer Tools is a plugin for the Cursor code editor that teaches its built-in AI assistant how to build FiveM and RedM resources. Once installed, you can ask the AI to:
- Scaffold a complete resource in Lua, JavaScript, or C#
- Look up GTA5 or RDR3 native functions by name or description
- Generate a correct
fxmanifest.luawith all the right directives - Write code that follows FiveM/RedM best practices automatically
The plugin includes 9 skills, 6 rules, 24 code snippets, 11 starter templates, and 6 MCP tools (including a searchable database of 12,000+ native functions, 101 events, and documentation search).
What is Cursor?
Cursor is a code editor with a built-in AI assistant. It looks and works like VS Code, but adds an AI chat panel where you can ask questions about your code, request changes, and have the AI write entire files for you. If you have used VS Code before, Cursor will feel familiar. If you haven't, don't worry -- this guide covers what you need.
What is FiveM / RedM?
FiveM is a modification framework for GTA V that lets you run custom multiplayer servers. RedM is the equivalent for Red Dead Redemption 2. Both use "resources" -- packages of scripts and assets that add features to your server. This plugin helps you build those resources.
You need three things installed before you can use the plugin. All steps below are for Windows.
2a. Install Git
Git is a tool for downloading and managing code. You need it to download the plugin.
- Go to git-scm.com/download/win
- Click the download link for the 64-bit installer -- it should start automatically
- Run the installer. Use all the default settings -- just click Next through each screen and then Install
- When it finishes, close the installer
Verify it works: Open PowerShell (press the Windows key, type powershell, and press Enter) and run:
git --version
You should see something like git version 2.53.0.windows.2. If you see an error like 'git' is not recognized, close PowerShell and reopen it -- the installer updated your system PATH and PowerShell needs to reload it.
2b. Install Python 3.10 or newer
Python runs the plugin's MCP server, which gives the AI access to tools like native function lookup.
- Go to python.org/downloads
- Click the big yellow "Download Python 3.x.x" button
- Run the installer
- IMPORTANT: Check the box that says "Add python.exe to PATH" at the bottom of the first screen. This is easy to miss and will cause problems later if you skip it.
- Click "Install Now"
- When it finishes, close the installer
Verify it works: Open a new PowerShell window and run:
python --version
You should see something like Python 3.13.2. Then verify pip (Python's package installer):
pip --version
You should see something like pip 24.3.1 from .... If either command gives a "not recognized" error, see the Troubleshooting section below.
2c. Install Cursor
Cursor is the code editor where you will use this plugin.
- Go to cursor.com/downloads
- Download the Windows installer
- Run the installer and follow the prompts
- When Cursor opens for the first time, it will ask you to create an account or sign in -- follow the on-screen instructions
- Cursor may offer to import settings from VS Code. Accept or skip as you prefer.
Once Cursor is open, you will see:
- Sidebar (left) -- file explorer, search, extensions
- Editor area (center) -- where you edit files
- AI chat panel (right, or press
Ctrl+L) -- where you talk to the AI assistant - Terminal (bottom, or press
Ctrl+`) -- where you run commands
If this is your first time using a code editor, spend a minute clicking around to get oriented. The Cursor documentation has more details.
2d. Optional -- set up a FiveM or RedM server
You need a running server to test resources, but you do not need one to build them. You can use the plugin to generate code and learn even without a server.
When you are ready to test, follow the official guide: Setting up a server (covers both FiveM and RedM).
There are two ways to get the plugin files onto your computer.
Method A -- Git clone (recommended)
This method is preferred because it makes updating easier later.
- Open PowerShell
- Navigate to where you want the plugin folder to live. For example, to put it on your Desktop:
cd ~/Desktop
- Clone (download) the repository:
git clone https://github.com/TMHSDigital/CFX-Developer-Tools.git
- Git will create a
CFX-Developer-Toolsfolder containing all the plugin files.
Method B -- ZIP download
If you don't want to use Git:
- Go to github.com/TMHSDigital/CFX-Developer-Tools
- Click the green Code button near the top right
- Click Download ZIP
- Extract the ZIP file somewhere convenient (right-click > "Extract All")
- The extracted folder may be named
CFX-Developer-Tools-main-- you can rename it toCFX-Developer-Toolsif you like
- Open Cursor
- Go to File > Open Folder (or press
Ctrl+KthenCtrl+O) - Navigate to the
CFX-Developer-Toolsfolder you just downloaded - Click Select Folder
You may see a prompt asking you to trust the workspace. Click Yes, I trust the authors -- this is needed for the plugin and terminal to work.
What happens automatically
When you open the folder, Cursor:
- Reads
.cursor-plugin/plugin.jsonand registers the plugin - Makes the 9 skills available to the AI assistant
- Activates the 6 coding rules based on file types you open
- Loads the MCP server configuration from
.cursor/mcp.json
You don't need to do anything to trigger these -- they happen on folder open.
The MCP (Model Context Protocol) server is a small Python program that gives the AI access to tools like native function lookup and resource scaffolding. You need to install its dependencies once.
What is a terminal?
A terminal is a text-based way to run commands on your computer. You type a command, press Enter, and it runs. Cursor has one built in so you don't have to open a separate window.
To open it: click Terminal > New Terminal in the menu bar, or press Ctrl+` (the backtick key, usually to the left of the 1 key).
Open the terminal and type these commands one at a time, pressing Enter after each:
cd mcp-server
pip install -r requirements.txt
The first command moves into the mcp-server folder. The second installs three Python packages the server needs. You will see some download progress and then a success message.
You do not need to manually start the MCP server. Cursor starts it automatically the first time the AI calls one of its tools. The configuration lives in .cursor/mcp.json.
Let's confirm the plugin is active and the MCP tools are responding.
Open the AI chat by clicking the chat icon in the right sidebar, or pressing Ctrl+L.
Test 1 -- ask about a native function
Type this prompt and press Enter:
What native function gets a player's current position?
The AI should respond with information about GetEntityCoords, including its parameters and return type. This confirms that the native functions skill is active. If the AI also mentions searching the native database, the MCP tools are working too.
Test 2 -- scaffold a resource
Type this prompt:
Scaffold a new standalone resource called test-resource in Lua, targeting both FiveM and RedM
The AI should create a test-resource/ directory containing:
fxmanifest.lua-- the resource manifestclient/main.lua-- client-side scriptserver/main.lua-- server-side scriptconfig.lua-- configuration file
If both tests worked, you are ready to go. If something went wrong, check the Troubleshooting section.
Let's build something real -- a simple resource that displays a welcome message when a player joins the server.
Step 1 -- ask the AI to build it
In the AI chat, type:
Create a new standalone resource called welcome-message in Lua, targeting both FiveM and RedM. When a player joins, show them a notification that says "Welcome to the server!" and print their name in the server console.
The AI will use its skills and tools to generate the complete resource.
Step 2 -- understand what was generated
Look at the files in the welcome-message/ folder:
| File | Purpose |
|---|---|
fxmanifest.lua |
Tells FiveM/RedM what scripts to load, the game target, and metadata. Every resource needs one. See the resource docs for details. |
client/main.lua |
Runs on each player's game. Handles things the player sees and interacts with. |
server/main.lua |
Runs on the server. Handles authoritative logic, database queries, and player management. |
config.lua |
Shared settings that both client and server scripts can read. |
Step 3 -- deploy to your server
If you have a FiveM or RedM server set up:
- Copy the entire
welcome-message/folder into your server'sresources/directory - Open your server's
server.cfgfile and add this line:
ensure welcome-message
- Restart your server (or run
ensure welcome-messagein the server console) - Join the server -- you should see the welcome notification
Step 4 -- iterate
Now ask the AI to modify it:
Add a config option for the welcome message text so server owners can change it without editing the script
The AI will update config.lua and the scripts to read from it. This is the core workflow: describe what you want, let the AI build it, test it, refine it.
Here are example prompts to explore the plugin's capabilities. Paste them into the AI chat.
Resource scaffolding prompts
- "Create a new QBCore resource called qb-shops in Lua with database support"
- "Scaffold a JavaScript resource called my-hud with NUI support for FiveM and RedM"
- "Generate a C# resource for RedM called rdr-horses"
Native function lookup prompts
- "What native function sets a vehicle's speed?"
- "List all VEHICLE category natives"
- "How do I teleport a player to specific coordinates?"
Manifest generation prompts
- "Generate an fxmanifest.lua for an ESX resource with NUI, targeting both FiveM and RedM"
- "What directives should I use for a resource that targets both FiveM and RedM?"
NUI (in-game web UI) prompts
- "Create a simple NUI menu for my resource using the NUI Vite template"
- "How do I send data from a Lua client script to a NUI panel?"
Database prompts
- "Show me how to create and query a MySQL table using oxmysql"
- "What's the best pattern for upsert queries in FiveM/RedM?"
State Bags prompts
- "How do I sync vehicle fuel across all clients using State Bags?"
- "Show me a player state bag pattern for syncing job data"
Learning more
- Browse the skills in
skills/to see the full reference material the AI uses - Read the Architecture doc to understand how all the pieces fit together
- Read the CFX scripting introduction for the official scripting guide
- Check the GTA5 native reference and RDR3 native reference for game functions
- Visit the Cfx.re forums for community help and examples
- See CONTRIBUTING.md if you want to help improve this plugin
Python or pip not recognized
Symptom: Running python --version or pip --version in PowerShell gives 'python' is not recognized as an internal or external command.
Cause: Python was installed without adding it to the system PATH.
Fix:
- Open the Python installer again (re-download it from python.org/downloads if needed)
- Click Modify
- Click Next on the first screen
- On the "Advanced Options" screen, check "Add Python to environment variables"
- Click Install
- Close and reopen PowerShell, then try again
Alternatively, you can use the full path. The default Python install location on Windows is:
C:\Users\<YourName>\AppData\Local\Programs\Python\Python3xx\python.exe
pip install fails with a permission error
Symptom: pip install -r requirements.txt fails with Permission denied or Access is denied.
Fix: Try adding the --user flag:
pip install --user -r requirements.txt
MCP tools not responding
Symptom: The AI answers general questions but doesn't seem to use the native lookup or scaffolding tools.
Checks:
- Make sure you opened the
CFX-Developer-Toolsfolder itself in Cursor (not a parent folder) - Verify that
.cursor/mcp.jsonexists in the project - Check that the Python dependencies installed successfully:
cd mcp-server
pip install -r requirements.txt
- Restart Cursor completely (close and reopen)
Cursor doesn't know about FiveM/RedM
Symptom: The AI gives generic coding answers without FiveM/RedM-specific knowledge.
Cause: The plugin is not loaded. This usually means you opened the wrong folder.
Fix: Make sure you opened the exact CFX-Developer-Tools folder in Cursor -- the folder that contains .cursor-plugin/plugin.json at its root. You can verify by checking if the file explorer sidebar shows skills/, rules/, templates/, etc. at the top level.
Resource won't start on the server
Symptom: You copied the resource to your server but it doesn't load, or you get errors in the server console.
Checks:
- Verify the resource folder is directly inside your server's
resources/directory - Make sure you added
ensure resource-nameto yourserver.cfg - Check that
fxmanifest.luaexists in the resource root and containsfx_version 'cerulean' - Look at the server console for error messages -- they usually tell you exactly what's wrong
- If using a framework (ESX, QBCore), make sure the framework resource is started first
Git clone fails
Symptom: git clone gives a network error or permission error.
Checks:
- Make sure you have an internet connection
- Try the URL in your browser to confirm the repo is accessible: github.com/TMHSDigital/CFX-Developer-Tools
- If you're behind a corporate firewall or VPN, try the ZIP download method instead
| Resource | URL |
|---|---|
| Cursor homepage | cursor.com |
| Cursor downloads | cursor.com/downloads |
| Cursor documentation | docs.cursor.com |
| Git for Windows | git-scm.com/download/win |
| Python downloads | python.org/downloads |
| FiveM/RedM documentation | docs.fivem.net |
| Server setup guide | docs.fivem.net/server-manual |
| Scripting introduction | docs.fivem.net/scripting-manual |
| GTA5 native reference | docs.fivem.net/natives |
| RDR3 native reference | rdr3natives.com |
| Cfx.re forums | forum.cfx.re |
| Plugin GitHub repo | github.com/TMHSDigital/CFX-Developer-Tools |
| Plugin documentation site | tmhsdigital.github.io/CFX-Developer-Tools |