Build, run and live-test FiveM servers with AI agents: RCON, DevCon, window control, mcpb bridge.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP (Model Context Protocol) server that lets AI agents β Claude, Qwen, or anything that speaks MCP β build, run and live-test FiveM servers from the same machine.
It is the missing test layer for the "did it actually work in-game?" question: the agent can run real console commands, watch both the server log and the live F8 console of a running FiveM client, wait for specific output, and react β without you touching the keyboard.
v0.5 drives the whole loop: server console (RCON), client F8 console (devcon), the game
window (launch, focus, screenshot, keyboard/mouse) and an in-game bridge (mcpb) for
natives, exports and NUI callbacks β plus ready-made test prompts. Tools answer with
structured content, carry MCP annotations, and stop as soon as the client cancels. All of it live-verified
against a real FXServer + FiveM Legacy client (see docs/plan.md and scripts/live-*.mjs).
| Channel | Address |
|---|---|
| npm | fivem-mcp-server β npx -y fivem-mcp-server |
| MCP Registry | io.github.ziyacivan/fivem-mcp (registry.modelcontextprotocol.io) |
| Source releases | GitHub Releases, tagged vX.Y.Z |
The repository's GitHub Packages sidebar is deliberately empty: the artifact lives on
npmjs.com, not GitHub Packages β the latter would force a scoped @ziyacivan/ package name
and a second registry for no benefit.
client_* tools since devcon binds to localhost by default).rcon_password set for server_command).Published on npm β no clone needed. Add it to Claude Code in one line:
(-s user = available in every project; drop it for a per-project entry. Verify with claude mcp get fivem β status should read β Connected. Remove with claude mcp remove fivem -s user.)
For a shared project config, put .mcp.json in the repo root and commit it β
Claude Code asks to approve it on first open, and env values can be interpolated
from your local .env-less shell via ${VAR} expansion:
For Claude Desktop (or any client with JSON config), add to
claude_desktop_config.json:
The server is also listed in the MCP Registry as
io.github.ziyacivan/fivem-mcp. Building from source (development):
| Variable | Default | Meaning |
|---|---|---|
FIVEM_HOST | 127.0.0.1 | Machine running the FiveM client (devcon host) |
FIVEM_EXECUTABLE | %LOCALAPPDATA%\FiveM\FiveM.exe | FiveM.exe for the launch tool |
FIVEM_CLIENT_DEVCON_PORT | 29200 then 29300 | Override the client devcon port |
FIVEM_RCON_ADDRESS | FIVEM_HOST:30120 | FXServer game port (UDP RCON + getinfo) |
FIVEM_RCON_PASSWORD | β | Matches rcon_password in server.cfg; needed by server_command |
FIVEM_SERVER_LOG | β | Path to FXServer's redirected stdout; enables server-side read_console / wait_for_console. Not needed by the bridge since v0.5 (results poll in-band) β it is the pre-0.5 fallback transport |
FIVEM_MCPB_TOKEN | β | Matches mcpb_token on the server; sent with every bridge request |
FIVEM_CONSOLE_CAPACITY | 5000 | Client console lines kept in the ring buffer |
FIVEM_QUIET_MS | 400 | Consider command output done after this quiet period |
FIVEM_COMMAND_TIMEOUT_MS | 5000 | Default max wait for client_command output |
FIVEM_MCP_DEBUG | β | 1 traces devcon frames and RCON round-trips on stderr |
| Tool | What it does |
|---|---|
status | Connection state: RCON, log file, client devcon. Call first. |
server_info | getinfo over UDP β hostname, players, max clients, protocol, game build. No credentials needed. |
server_command | Any server console command over UDP RCON; returns the captured output. |
client_command | Types into the F8 console of a running Legacy client over devcon (nothing steals focus). This is the local console command layer β connect, quit, tooling; RegisterCommand chat commands are a different system (use server_command, which runs with console privileges, or the input/bridge tools). Returns the console lines it printed. |
read_console | Recent lines: client = live devcon stream (with afterSeq paging), server = tail of FIVEM_SERVER_LOG. Filter by channel/contains/pattern. |
wait_for_console | Block until a line matching a regex appears β your assertion primitive. |
list_commands | Every command the client console knows (devcon handshake). |
launch | Start FiveM, optionally straight into host:port (default: the configured server). |
quit_game | Graceful quit over devcon; force kills the FiveM process tree. |
window_status | Game window existence, title, pid, rect, foreground state. |
focus_window / restore_focus | Bring the game forward / give focus back to your window. Input tools focus automatically. |
screenshot | PNG of the game window (PrintWindow, screen-BitBlt fallback). Downscaled β default 900, optional crop rect. Every shot costs transcript tokens all session: prefer text probes, shoot small. |
press_key / hold_key / release_key | Real scan-code input β GTA's DirectInput ignores VK-only injection. Held keys are released if the process dies. |
type_text | Literal Unicode events β the channel the F8 console and chat NUI read. |
mouse_move / click / scroll | Relative moves drive the camera; absolute coordinates position the cursor for NUI. |
wait | Pause between actions (loading screens, walk cycles). |
read_client_log | The newest CitizenFX_log_*.log from the FiveM install. |
bridge | Invoke the mcpb bridge resource: ping, players, poll, call_export, trigger_event (server half) and ping, position, teleport, freeze, call_native, send_nui, nui_callback (client half). op is validated against the chosen target. |
Two workflows are shipped as MCP prompts, distilled from the live-verified loops:
test_resource(resource, expectations?) β clean restart β console error scan β
client-half scan β in-game scenario (keys, screenshot, bridge state) β evidence-backed
PASS/FAIL report where anything unverifiable is said so out loud.smoke_check β one fast sweep: connections, which server, error tails on both sides,
window + screenshot, persisted client log. OK/WARN/DOWN per line.bridge/)Client-side testing (natives, NUI callbacks, position) is outside what devcon and RCON can reach β the small companion resource closes that gap and ships in this repo.
and point this server at it with FIVEM_MCPB_TOKEN. Then:
Client results come back through an in-band queue polled over RCON (~100 ms granularity since v0.5 β no log file needed; pre-0.5 resources still fall back to the log tail).
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/fivem-mcp)<a href="https://allmcps.com/mcp/fivem-mcp"><img src="https://allmcps.com/api/badge/fivem-mcp?style=directory" alt="FiveM MCP on AllMCPs" /></a>