RPScripts FiveM Developer
FiveM dev tools: find resources, check compatibility, validate Lua and server.cfg, generate jobs
我該用這個嗎
品質與安全性
發現項目(5)
- HIGH
- MEDIUM在 validate_server_cfg 中
- LOW在 list_categories 中
- LOW在 get_download_url 中
- INFO在 validate_server_cfg 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"fivem": {
"url": "https://rpscripts.net/mcp"
}
}
}遠端端點
https://rpscripts.net/mcpstreamable-http它能做什麼
工具清單
工具(12)
🟢search_products(query, frameworks, category, min_price_usd, max_price_usd, ...)
Search the RPScripts catalogue of FiveM scripts, MLOs, server packs, vehicles and assets. Filter by framework, category and USD price; results are ranked by relevance when a query is given, otherwise by popularity. Only published, listed products. 24 results per page. price is the list price; checkout_price is what one copy costs after the discount Checkout applies automatically (absent when there is none).
輸入結構描述
{
"type": "object",
"properties": {
"query": {
"description": "Search terms, e.g. \"qbcore police job\" or \"mechanic mlo\"",
"type": "string",
"maxLength": 200
},
"frameworks": {
"description": "Only products listed for any of these frameworks",
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"enum": [
"esx",
"qbcore",
"qbox",
"standalone",
"vrp"
]
}
},
"category": {
"description": "Category path from list_categories, e.g. \"fivem-job-scripts/police-scripts\"",
"type": "string",
"maxLength": 200
},
"min_price_usd": {
"type": "number",
"minimum": 0,
"maximum": 100000
},
"max_price_usd": {
"type": "number",
"minimum": 0,
"maximum": 100000
},
"buyable_only": {
"default": false,
"description": "Only products that can be bought right now",
"type": "boolean"
},
"sort": {
"description": "Default: relevance with a query, popular without",
"type": "string",
"enum": [
"relevance",
"new",
"popular",
"price-asc",
"price-desc"
]
},
"page": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 500
},
"limit": {
"default": 10,
"description": "Results to return from the page (max 24)",
"type": "integer",
"minimum": 1,
"maximum": 24
},
"locale": {
"default": "en",
"description": "Language of names, descriptions and URLs (en, de, fr, pt, es)",
"type": "string",
"enum": [
"en",
"de",
"fr",
"pt",
"es"
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_product(slug, locale)
Details of one RPScripts product by slug (from search_products): description (Markdown), frameworks, version, categories, list price and checkout_price (after the discount Checkout applies automatically, absent when there is none), whether it can be bought, and install requirements from RPScripts Lab's static check of the download (dependencies, start order).
輸入結構描述
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"locale": {
"default": "en",
"description": "Language of names, descriptions and URLs (en, de, fr, pt, es)",
"type": "string",
"enum": [
"en",
"de",
"fr",
"pt",
"es"
]
}
},
"required": [
"slug"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢list_categories(locale)
All RPScripts shop categories (scripts by framework and job, MLOs, vehicles, clothing, server packs …) with their paths and URLs.
輸入結構描述
{
"type": "object",
"properties": {
"locale": {
"default": "en",
"description": "Language of names, descriptions and URLs (en, de, fr, pt, es)",
"type": "string",
"enum": [
"en",
"de",
"fr",
"pt",
"es"
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢check_compatibility(product, files, framework, server_resources, server_build, ...)
Checks whether an RPScripts product (by slug) or your own resource files fit a server: framework (QBCore, Qbox, ESX, vRP, standalone), required resources such as ox_lib, ox_inventory, ox_target or oxmysql, FXServer artifact and game build minimums, OneSync, and conflicts in your resource list. Each check is supported, unsupported or unknown with its evidence; nothing is assumed without a source.
輸入結構描述
{
"type": "object",
"properties": {
"product": {
"description": "Product slug from search_products",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"files": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"content": {
"type": "string",
"maxLength": 512000
}
},
"required": [
"path",
"content"
]
},
"description": "The resource's text files (fxmanifest.lua, Lua, JS, HTML, JSON …) with paths relative to the resource folder. Nothing is executed."
},
"framework": {
"description": "Your server's framework",
"type": "string",
"enum": [
"esx",
"qbcore",
"qbox",
"vrp",
"standalone"
]
},
"server_resources": {
"description": "Resources your server starts (names from server.cfg ensure lines)",
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"pattern": "^[\\w.-]{1,64}$"
}
},
"server_build": {
"description": "FXServer artifact number, e.g. 17000",
"type": "integer",
"minimum": 1,
"maximum": 100000
},
"game_build": {
"description": "Enforced GTA V game build, e.g. 3258",
"type": "integer",
"minimum": 1,
"maximum": 100000
},
"onesync": {
"type": "boolean"
},
"check": {
"description": "Resources to check support for, e.g. [\"ox_inventory\", \"ox_target\"]",
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[\\w.-]{1,64}$"
}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢validate_resource(files, resource_name, framework)
Statically checks a FiveM resource: Lua syntax, fxmanifest.lua directives and referenced files, resource structure, undeclared dependencies, framework API calls against pinned QBCore/Qbox/ESX versions, unknown natives, net-event security and backdoor patterns. Returns diagnostics with severity, rule code, file and line and a fix. Code is parsed, never run.
輸入結構描述
{
"type": "object",
"properties": {
"files": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"content": {
"type": "string",
"maxLength": 512000
}
},
"required": [
"path",
"content"
]
},
"description": "The resource's text files (fxmanifest.lua, Lua, JS, HTML, JSON …) with paths relative to the resource folder. Nothing is executed."
},
"resource_name": {
"description": "Folder name of the resource (used for self-references)",
"type": "string",
"pattern": "^[\\w.-]{1,64}$"
},
"framework": {
"description": "Framework to check API calls against; detected from the code when omitted",
"type": "string",
"enum": [
"qbcore",
"qbox",
"esx",
"standalone"
]
}
},
"required": [
"files"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢search_docs(query, page, scope, framework, limit)
Searches RPScripts documentation (installation, downloads, server packs, updates, QBCore/Qbox/ESX guides, compatibility, troubleshooting) and the framework API reference RPScripts reads from pinned QBCore, Qbox, ESX, ox_lib, ox_inventory, ox_target and oxmysql sources. Returns matching sections with source URLs. Pass page to read one docs page in full.
輸入結構描述
{
"type": "object",
"properties": {
"query": {
"description": "e.g. \"install a server pack\", \"GetPlayer\", \"AddItem\"",
"type": "string",
"minLength": 2,
"maxLength": 200
},
"page": {
"description": "Docs page path from a result, e.g. \"getting-started/downloads\"",
"type": "string",
"maxLength": 200
},
"scope": {
"default": "all",
"type": "string",
"enum": [
"all",
"docs",
"api"
]
},
"framework": {
"default": "qbcore",
"description": "Framework whose API reference to search",
"type": "string",
"enum": [
"qbcore",
"qbox",
"esx",
"standalone"
]
},
"limit": {
"default": 5,
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢validate_server_cfg(config)
Parses and checks an FXServer server.cfg: syntax, argument counts and values, duplicate or conflicting settings, repeated resource starts, framework and ox resource start order, missing dependencies, OneSync/slot conflicts, secrets exposed with set/sets, weak RCON passwords, plain-text database passwords and placeholder values. Returns issues with line numbers and a suggested fix. The config is processed in memory and never stored; secret values are never echoed.
輸入結構描述
{
"type": "object",
"properties": {
"config": {
"type": "string",
"minLength": 1,
"maxLength": 262144,
"description": "server.cfg text (max 256 KiB)"
}
},
"required": [
"config"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢generate_fxmanifest(preset, author, description, version, shared_scripts, ...)
Generates a valid fxmanifest.lua (fx_version 'cerulean', game 'gta5') for client/server/shared Lua or JS scripts, NUI pages, maps, vehicle data files and dependencies, then validates it with the RPScripts manifest rules. Lua 5.4 is the default runtime, so no lua54 line is written.
輸入結構描述
{
"type": "object",
"properties": {
"preset": {
"default": "basic",
"type": "string",
"enum": [
"basic",
"nui",
"map",
"vehicle"
]
},
"author": {
"type": "string",
"maxLength": 100
},
"description": {
"type": "string",
"maxLength": 300
},
"version": {
"type": "string",
"maxLength": 30
},
"shared_scripts": {
"description": "e.g. [\"@ox_lib/init.lua\", \"config.lua\"]",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"client_scripts": {
"description": "e.g. [\"client/*.lua\"] or [\"client.js\"]",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"server_scripts": {
"description": "e.g. [\"@oxmysql/lib/MySQL.lua\", \"server/*.lua\"]",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"files": {
"description": "Files sent to clients (NUI assets, data files)",
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"dependencies": {
"description": "Resources or constraints, e.g. [\"ox_lib\", \"/onesync\"]",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"ui_page": {
"description": "NUI page (preset nui), default html/index.html",
"type": "string",
"maxLength": 200
},
"data_files": {
"description": "e.g. [{\"type\": \"HANDLING_FILE\", \"path\": \"data/handling.meta\"}]",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"pattern": "^[A-Z0-9_]{1,64}$"
},
"path": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"type",
"path"
]
}
},
"node_version": {
"description": "Set for server-side JavaScript using Node 22 features",
"type": "string",
"enum": [
"22"
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢create_job(framework, preset, name, label, spec)
Generates a complete job resource with the RPScripts Jobs Creator for QBCore, Qbox or ESX: job definition and grades with salaries and boss flags, duty, stash, garage, armory, shop, crafting, harvest/process/sell, boss office, wardrobe, teleports, billing, dispatch, player and vehicle actions, plus the framework install entries (shared jobs entry or ESX SQL) and a README. Start from a template (preset) and/or pass a full spec. The output is checked statically with RPScripts Lab before it is returned. Templates: police, sheriff, ambulance, fire, security, mechanic, cardealer, taxi, delivery, trucking, business, restaurant, fishing, mining, gang.
輸入結構描述
{
"type": "object",
"properties": {
"framework": {
"type": "string",
"enum": [
"qbcore",
"qbox",
"esx"
]
},
"preset": {
"description": "Template to start from",
"type": "string",
"enum": [
"police",
"sheriff",
"ambulance",
"fire",
"security",
"mechanic",
"cardealer",
"taxi",
"delivery",
"trucking",
"business",
"restaurant",
"fishing",
"mining",
"gang"
]
},
"name": {
"description": "Job id (overrides the template's), e.g. police",
"type": "string",
"pattern": "^[a-z][a-z0-9_]{1,31}$"
},
"label": {
"description": "Display name (overrides the template's)",
"type": "string",
"minLength": 1,
"maxLength": 50
},
"spec": {
"description": "A full Jobs Creator spec; replaces the template. Its shape is rpcrate.job.json from any create_job result: generate a preset, edit that file, pass it here.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": true
}
},
"required": [
"framework"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢lookup_server(server)
Looks up a public FiveM server by cfx.re join code/link (e.g. cfx.re/join/abc123) or public host:port. Returns what the server or the Cfx server list publishes: hostname, player count, slots, artifact/build, OneSync, tags, public variables and resources. Private and local addresses are refused; offline servers are reported as unreachable. Player names and identifiers are not returned. shop_products lists up to six RPScripts products whose resource name the server runs (exact name; frameworks, libraries and packs excluded).
輸入結構描述
{
"type": "object",
"properties": {
"server": {
"type": "string",
"minLength": 5,
"maxLength": 300,
"description": "Join code, cfx.re/join link or \"host:port\""
}
},
"required": [
"server"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢list_purchases(page, limit, locale)
Lists the RPScripts products the signed-in customer owns (active purchases, including bundle items): product id, name, product page, files with their index for get_download_url, download availability and install requirements. Requires signing in to RPScripts.
輸入結構描述
{
"type": "object",
"properties": {
"page": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 100
},
"limit": {
"default": 25,
"type": "integer",
"minimum": 1,
"maximum": 50
},
"locale": {
"default": "en",
"description": "Language of names, descriptions and URLs (en, de, fr, pt, es)",
"type": "string",
"enum": [
"en",
"de",
"fr",
"pt",
"es"
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢get_download_url(product_id, file_index)
Creates a signed download link for one file of a product the signed-in customer owns (from list_purchases). The link is personal, works for at least 5 minutes (longer for large files, see expires_at) and counts toward the limit of 20 downloads per product per day. Requires signing in.
輸入結構描述
{
"type": "object",
"properties": {
"product_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"file_index": {
"default": 0,
"type": "integer",
"minimum": 0,
"maximum": 999
}
},
"required": [
"product_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據