FiveM MCP
Allows creating and managing FiveM resources, scaffolding NUI templates with multiple variants and themes, and performing safe file operations for FiveM server development.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FiveM MCP scaffold a dashboard resource named 'admin-panel' with violet theme"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FiveM MCP
A focused MCP server for FiveM teams who want faster scaffolding, safer file edits, and stronger UI/NUI starting points.
Why This Exists
FiveM MCP was built to make AI agents actually useful inside a FiveM workflow.
Instead of giving a generic assistant a pile of loose files and hoping for the best, this server exposes a practical toolkit for:
creating new FiveM resources
adding or scaffolding NUI quickly
generating UI templates with multiple variants and themes
editing files more safely with hash-aware and line-based operations
giving MCP clients enough structured context to act with fewer mistakes
It is especially opinionated around UI work, where most FiveM projects end up needing consistency, speed, and visual quality at the same time.
Related MCP server: MCP TS Toolkit
Quick Start
1. Install
npm install2. Build
npm run build3. Point the MCP host to the compiled server
This project runs as a local stdio MCP server.
Use:
command:nodeargs:["./dist/index.js"]in repo-local configs, or["${workspaceFolder}/dist/index.js"]in hosts that support workspace interpolationenv.FIVEM_MCP_ALLOWED_DIRS: the resource folders the server is allowed to read/write
Example allowed dirs:
D:\FiveM\server-data\resources
D:\FiveM\server-data\resources\[local]If you want more than one root, separate them with ;.
D:\FiveM\server-data\resources;D:\FiveM\server-data\resources\[local]First-Time User Layer
If you are new to MCP or new to this repo, this is the minimum you need to understand:
Your IDE starts this server locally through
stdio.The server exposes tools, resources, and prompts.
The agent can then inspect, scaffold, and edit FiveM resources for you.
File access is intentionally restricted to the directories declared in
FIVEM_MCP_ALLOWED_DIRS.
What it is good at
FiveM resource scaffolding
NUI bootstrap and visual template generation
safe local file reads/writes
line-based edits for more controlled patching
quick starting points for dashboards, HUDs, inventories, and modal UIs
What it is not trying to be
a hosted multi-user MCP platform
a generic backend automation server
a remote HTTP MCP service
This repo is optimized for local dev flow, especially for AI IDEs working directly on a FiveM codebase.
Template System
This project currently ships with UI variants and visual themes so new resources can start from something that already feels intentional.
UI Variants
Variant | Best for |
| menus, shops, dialogues, forms |
| status bars, needs, overlay widgets |
| slot grids, item panels, loot/shop layouts |
| tablets, admin panels, dispatcher/ops interfaces |
UI Themes
Theme | Visual direction |
| futuristic, flexible, general-purpose |
| institutional, tactical, cold |
| commerce, crafting, marketplace, garage |
| clean ops, admin, support, health-style flows |
Example idea combinations
dashboard+policefor a police tabletinventory+amberfor a premium garage/shophud+emeraldfor clean status overlaysmodal+violetfor general roleplay menus
Tooling Layer
Filesystem Tools
Tool | Purpose |
| list directories inside allowed roots |
| read text files with SHA256 |
| write text files with optional hash validation |
| apply line-range edits |
| create directories recursively |
FiveM Tools
Tool | Purpose |
| create a new FiveM resource with optional UI |
| inspect |
| attach NUI scaffolding to an existing resource |
| infer |
| audit resource/NUI structure |
| generate or replace the UI bundle |
MCP Resources
Resource | Purpose |
| core FiveM + NUI reminders |
| quick UI variant/theme guidance |
MCP Prompts
Prompt | Purpose |
| guide an agent toward the right template and visual direction |
Stack
Layer | Choice |
Language | TypeScript |
Runtime | Node.js |
MCP SDK |
|
Validation |
|
Transport |
|
Build |
|
Dev runner |
|
Project scripts:
npm run dev
npm run build
npm run startFor Repository Scanners
The block below is intentionally compact and machine-friendly.
name: fivem-mcp
category: model-context-protocol-server
domain: fivem
focus:
- fivem-resource-scaffolding
- nui-ui-templates
- safe-local-filesystem-edits
transport: stdio
runtime: node
language: typescript
entrypoint: dist/index.js
source_entrypoint: src/index.ts
capabilities:
tools: true
resources: true
prompts: true
hosts:
- cursor
- trae
- claude-desktop
framework_detection:
- standalone
- qb-core
- esx
ui_variants:
- modal
- hud
- inventory
- dashboard
ui_themes:
- violet
- police
- amber
- emerald
env:
required:
- FIVEM_MCP_ALLOWED_DIRS
license: MIT
author: Luan Silva
studio: TektonProject Structure
FivemMcp/
├─ src/
│ ├─ index.ts
│ ├─ fivem-tools.ts
│ ├─ fs-tools.ts
│ ├─ security.ts
│ └─ templates.ts
├─ dist/
├─ package.json
├─ tsconfig.json
└─ README.mdSource map
src/index.ts: MCP server registrationsrc/fivem-tools.ts: FiveM-oriented actionssrc/fs-tools.ts: safe file operationssrc/security.ts: directory boundary enforcementsrc/templates.ts: UI variants and themes
Add to Cursor
You can add this server either globally or per project.
Suggested project config
Create:
.cursor/mcp.json{
"mcpServers": {
"fivem-mcp": {
"command": "node",
"args": [
"${workspaceFolder}/dist/index.js"
],
"env": {
"FIVEM_MCP_ALLOWED_DIRS": "D:\\FiveM\\server-data\\resources;D:\\FiveM\\server-data\\resources\\[local]"
}
}
}
}Good to know
Cursor also supports a global
mcp.json.If Cursor does not detect the server immediately, reload MCP from Settings.
Using
${workspaceFolder}/dist/index.jskeeps the config portable across machines.
Add to Trae
Prefer a project-level config so the server path stays relative to the repo instead of pointing to one machine.
Create:
.trae/mcp.jsonSuggested config
{
"mcpServers": {
"fivem-mcp": {
"command": "node",
"args": [
"./dist/index.js"
],
"env": {
"FIVEM_MCP_ALLOWED_DIRS": "D:\\FiveM\\server-data\\resources;D:\\FiveM\\server-data\\resources\\[local]",
"START_MCP_TIMEOUT_MS": "60000",
"RUN_MCP_TIMEOUT_MS": "60000"
}
}
}
}Notes
In Trae,
commandshould be a clean executable name or full executable path.Put file paths in
args, not insidecommand.For portability, keep the config inside the repo and keep
argsrelative to the repo build output.
Add to Claude
For a repo-portable setup, prefer Claude Code with a project-level .mcp.json.
Create:
.mcp.json{
"mcpServers": {
"fivem-mcp": {
"command": "node",
"args": [
"./dist/index.js"
],
"env": {
"FIVEM_MCP_ALLOWED_DIRS": "D:\\FiveM\\server-data\\resources;D:\\FiveM\\server-data\\resources\\[local]"
}
}
}
}Why this version is preferred
it lives inside the repo
it does not leak one developer's machine path
it stays portable when the repository moves
Claude Desktop note
Claude Desktop uses a global config file, so repo-relative paths are not as clean there. If you must use Desktop, prefer a tiny launcher or env-based wrapper instead of hardcoding one developer's home directory into docs or committed config.
Example Calls
Create a new resource
{
"tool": "fivem.resource_create",
"arguments": {
"resourceName": "police-tablet",
"withUi": true,
"framework": "qb-core",
"uiVariant": "dashboard",
"uiTheme": "police",
"title": "Police Operations"
}
}Scaffold a UI into an existing resource
{
"tool": "fivem.ui_scaffold",
"arguments": {
"resourceDir": "garage-ui",
"uiVariant": "inventory",
"uiTheme": "amber",
"overwrite": true,
"title": "Premium Garage"
}
}Audit a resource
{
"tool": "fivem.resource_audit",
"arguments": {
"resourceDir": "police-tablet"
}
}Security Model
This server does not expose unrestricted filesystem access.
It resolves all user-supplied paths against the directories listed in:
FIVEM_MCP_ALLOWED_DIRSThat means:
no arbitrary disk traversal by default
no writes outside approved FiveM roots
safer agent behavior when multiple resources exist on the same machine
If you want broader access, expand the allowed roots deliberately.
Development
Run in dev mode
npm run devBuild for IDE use
npm run buildRun the compiled server
node dist/index.jsRoadmap Direction
This repo is already useful as a local FiveM MCP server, but its natural evolution is clear:
stronger template catalog for real FiveM products
richer UI families like banking, garage, MDT/tablet, dispatch, shops
more polished visual systems around the current variant/theme model
tighter onboarding for teams adopting MCP in game scripting workflows
License
This project is open source under the MIT License.
Produced by Luan Silva at Tekton.
Credits
Created for builders who want AI assistance to feel native inside a FiveM workflow, not bolted on after the fact.
Available Tools
11 toolsfivem.framework_detectDetectar framework do resourceA
Faz heurística para identificar se o resource usa qb-core, esx ou standalone.
Inputs: resourceDir (required).
fivem.resource_auditAuditar resource FiveMA
Inspeciona manifest, arquivos NUI e callbacks client-side para apontar problemas e sugestões.
Inputs: resourceDir (required).
fivem.resource_createCriar resource FiveMB
Cria um resource base em Lua com fxmanifest, client/server e scaffold opcional de NUI.
Inputs: resourceName (required), title, withUi, uiTheme, +4 more.
fivem.resource_inspectInspecionar resource FiveMC
Analisa o fxmanifest.lua e retorna client scripts, server scripts e ui_page.
Inputs: resourceDir (required).
fivem.ui_addAdicionar NUI ao resourceC
Garante ui_page e files no fxmanifest e pode criar a pasta html com scaffold funcional.
Inputs: resourceDir (required), title, uiPage, htmlDir, +3 more.
fivem.ui_scaffoldGerar scaffold de UIC
Gera ou sobrescreve o bundle de UI do resource com variantes modal, hud ou inventory.
Inputs: resourceDir (required), title, uiPage, htmlDir, +3 more.
fs.edit_linesEditar por linhasC
Aplica mudanças por intervalo de linhas, ideal para alterações mais assertivas em resources.
Inputs: edits (required), filePath (required), dryRun, expectedSha256.
fs.listListar diretórioA
Lista arquivos e pastas dentro das roots permitidas por FIVEM_MCP_ALLOWED_DIRS.
Inputs: dirPath (required).
fs.mkdirpCriar diretórioA
Cria diretórios recursivamente dentro das roots permitidas.
Inputs: dirPath (required).
fs.read_textLer arquivo textoB
Lê um arquivo de texto e retorna conteúdo, tamanho e hash SHA256.
Inputs: filePath (required), maxBytes.
fs.write_textEscrever arquivo textoA
Escreve um arquivo de texto com validação opcional de hash para edição assertiva.
Inputs: content (required), filePath (required), createDirs, expectedSha256.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The fs.* tools are clearly distinct, but fivem.resource_inspect and fivem.resource_audit both analyze resources, and fivem.ui_add and fivem.ui_scaffold both deal with UI scaffolding, creating potential confusion.
All tools use snake_case, but the word order is inconsistent: fs.* tools use verb_noun (read_text, write_text), while fivem.* tools use noun_verb (resource_create, ui_add). The prefix grouping helps, but the mixed conventions are noticeable.
11 tools is well within the ideal 3-15 range. Each tool serves a distinct purpose in the FiveM resource development workflow, from file operations to resource creation and analysis.
The set provides good lifecycle coverage: file operations, resource creation, inspection, UI management, framework detection, and auditing. Minor gaps like file deletion or resource removal are not critical for the core workflow.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
An MCP server for deep research or task groups
Official MCP server for Lovable, the AI-powered full-stack app builder.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA unified MCP server with composable tools for GitHub operations, file management, shell execution, kanban boards, Discord messaging, and package management. Features role-based security, HTTP/stdio transports, and a web-based development UI.GPL 3.0
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server providing secure tools for filesystem operations, Git management, web search, document conversion, npm/.NET project management, and AI generative capabilities (image/video/audio generation and processing) via PiAPI.ai integration.Apache 2.0
- AlicenseAqualityDmaintenanceA unified MCP server for scaffolding project structures across multiple frameworks including Spring Boot, React, Vue, Next.js, FastAPI, Django, Flask, Express, and more.28 npm1MIT
- AlicenseBqualityCmaintenanceA comprehensive MCP server for developers providing file operations, shell execution, git integration, and smart caching to enhance AI-assisted development.1122 npmMIT