MCP server for ktx_claude_bridge, a FiveM development bridge for Claude Code
Strong tool definitions with consistent naming (verb_noun pattern), comprehensive descriptions (avg 180 chars), and explicit Zod schemas for all 20 tools. All parameters are typed and described. Output is JSON-structured. Key gaps: no error recovery guidance (e.g., 'if query fails, try...'), no pagination for list tools (nui_list_frames, get_players, get_resources, get_registered_commands could return large result sets), and missing output schema documentation in descriptions. Security-sensitive tools (nui_exec_js, write_resource_file, db_query) lack explicit permission/scope declarations. Error handling returns generic JSON success/error without actionable recovery steps.
Execute a read-only SQL query via oxmysql. Only SELECT, SHOW, DESCRIBE, and EXPLAIN are allowed. Use parameterized queries with ? placeholders. Examples: "SELECT * FROM players LIMIT 5", "DESCRIBE player_vehicles".
List all server-side entities (vehicles, peds, objects) with positions, models, health. Filter by type. Requires OneSync.
Get Qbox player data (job, gang, money, charinfo, metadata). Works for online and offline players. Requires qbx_core. Prefer this over manually calling exports. The export name is exports.qbx_core:GetPlayer(src), NOT GetPlayerData.
Get detailed list of all connected players including server ID, name, identifiers, ping, position, and current vehicle.
List ALL registered FiveM commands across all resources. Returns command name, owning resource, and arity. Use this to discover what commands are available before using run_command or run_client_command.
No pagination support for list tools. nui_list_frames, get_players, get_resources, get_registered_commands, get_entities, and get_server_console lack limit/offset or cursor parameters. Large result sets will blow context windows.
Error responses lack recovery guidance. All tools return generic {success: false, error: message} without actionable next steps. E.g., 'Element not found' should suggest 'Try nui_list_frames to discover available resources' or 'Try nui_query_dom with a broader selector'.
Security-sensitive tools lack explicit permission/scope declarations. nui_exec_js (arbitrary JS execution), write_resource_file (file write), and db_query (database access) do not declare required scopes (e.g., 'requires: write:nui, write:files, read:database'). No audit trail or permission gate visible.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | 2026-07-28+ | v2 |
Get detailed info about a specific resource: version, author, description, dependencies, scripts, exports, and state.
List all FiveM resources with their current state (started, stopped, etc).
Get recent server console output. Captured with RegisterConsoleListener, so it holds EVERYTHING the server console printed, script errors included, from every resource. Two limits: it is a 1000-line ring buffer, and it starts when ktx_bridge_helper starts, so anything older is gone. read_server_log has the full history from boot. Each line has a "resource" field (e.g. "script:ktx_garages", "citizen-server-impl") to filter on. Hitch warnings and server-list errors from "citizen-server-impl" are noise. This is the SERVER only: a resource that fails on the client leaves nothing here, see read_client_log.
Get server info and health check. Returns: hostname, player count, OneSync status, max clients, locale, framework detection (qbx_core, ox_lib, oxmysql, ox_inventory), resource counts (started/stopped), uptime, and connected player IDs. Use this first to check if the bridge is alive.
List all known files in a FiveM resource. Discovers files from the resource manifest (server_scripts, client_scripts, shared_scripts, files, ui_page). Also returns the resource's absolute filesystem path and manifest file name.
List the FiveM servers this bridge is configured for and show which one every other tool currently talks to. Worth a look before you trust an answer: two entries can point at the same URL, and then the name tells you nothing about which server replied.
Click a DOM element by CSS selector in any resource's NUI frame. This is the correct way to interact with NUI menus and buttons. Do NOT use game controls (SetControlNormal) for NUI interaction. By default uses synthetic click (el.click()). Set synthetic=false to use CDP mouse events at the element's center coordinates.
Execute JavaScript in any resource's NUI frame via Chrome DevTools Protocol. Can target specific resources by name (e.g. "ox_inventory", "qbx_hud"). Code runs in an async context, so use "return" for results. Supports await for Promises. Omit resourceName to run in the root NUI page.
Set the value of an input or textarea element in any resource's NUI frame and dispatch input/change events. Uses native property setter to work with React and other frameworks.
Get a serialized DOM tree from any resource's NUI page. Returns nested structure of tags, ids, classes, and children. Useful for understanding a NUI page's structure.
List all loaded NUI resource frames in FiveM's CEF browser. Returns frame IDs, resource names, and URLs. Use this to discover which resources have active NUI pages before using other nui_ tools.
Query DOM elements by CSS selector in any resource's NUI frame. Returns tag, id, classes, text content, bounding rect, visibility, and attributes for each match.
Read any file from any FiveM resource by name and path. Can read Lua source, configs, HTML, JSON, anything in the resource directory. Use list_resource_files first to discover available files.
Point every following tool call at a different FiveM server. Names come from list_servers. The choice holds until it is changed again, so say which server you are on when reporting a result.
Write a file into a FiveM resource directory. FiveM lets a resource write only into its own folder, so a write aimed at anything other than ktx_claude_bridge is carried out by the target resource itself and needs shared_script '@ktx_claude_bridge/exec_bridge.lua' in its fxmanifest. Without that line the call fails with a timeout naming the resource. Follow with run_command refresh and restart_resource to load what you wrote.
Output schemas not documented in tool descriptions. Descriptions state what tools do but not what fields they return. LLMs cannot plan downstream calls without knowing response structure. E.g., get_players should document it returns [{id, name, identifiers, ping, position, vehicle}].
Destructive operations lack confirmation/dry-run support. write_resource_file and db_query (if extended to writes) should support a dry_run parameter or require explicit confirmation. Agents can accidentally overwrite configs or corrupt databases.