Skip to main content
MCP server CX Codex

FiveM MCP — Claude Code MCP server: setup

This MCP server lets an AI agent run and test FiveM through FXServer and a live client, with console access, logs, and game control.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env FIVEM_HOST=<FIVEM_HOST> --env FIVEM_CLIENT_DEVCON_PORT=<FIVEM_CLIENT_DEVCON_PORT> --env FIVEM_RCON_ADDRESS=<FIVEM_RCON_ADDRESS> --env FIVEM_RCON_PASSWORD=<FIVEM_RCON_PASSWORD> --env FIVEM_SERVER_LOG=<FIVEM_SERVER_LOG> --transport stdio fivem-mcp -- npx -y fivem-mcp-server
Open on GitHub

What FiveM MCP does

FiveM MCP connects an AI agent to FXServer over UDP RCON and to a Legacy FiveM client through devcon. The agent can inspect server details, send console commands, read client or server output, wait for a regex match, and launch the client at a chosen address.

The server requires Node 22+, an FXServer you administer, and FIVEM_RCON_PASSWORD matching rcon_password. Set FIVEM_SERVER_LOG to enable server-log reading; the mcpb bridge uses FIVEM_MCPB_TOKEN. Keyboard, mouse, and screenshot tools run on Windows only. Client-console tools depend on the Legacy client because Enhanced removed the client devcon ports.

What it helps with

  • test a resource in a live FiveM client
  • send FXServer commands over RCON
  • inspect the FiveM client console
  • wait for a matching log line
  • launch and quit FiveM from an agent

Example prompts for the agent

  • Check the server and client connections with status, then report which paths are ready.
  • Launch FiveM at host:port, run a client check, and wait for a matching line with wait_for_console.
  • Send a server console command through server_command and return its output.

How to install FiveM MCP

Platform CLI

claude mcp add --env FIVEM_HOST=<FIVEM_HOST> --env FIVEM_CLIENT_DEVCON_PORT=<FIVEM_CLIENT_DEVCON_PORT> --env FIVEM_RCON_ADDRESS=<FIVEM_RCON_ADDRESS> --env FIVEM_RCON_PASSWORD=<FIVEM_RCON_PASSWORD> --env FIVEM_SERVER_LOG=<FIVEM_SERVER_LOG> --transport stdio fivem-mcp -- npx -y fivem-mcp-server

Replace <…> with your own values. 6 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about FiveM MCP

How do I install FiveM MCP in Claude Code?

Run claude mcp add fivem-mcp -e FIVEM_RCON_PASSWORD=<FIVEM_RCON_PASSWORD> -e FIVEM_MCPB_TOKEN=<FIVEM_MCPB_TOKEN> -- npx -y fivem-mcp-server.

What does FiveM MCP do?

It gives an agent access to FXServer and a Legacy FiveM client. The available workflow covers RCON and devcon commands, console output, game launch, and output-based waits.

What does FiveM MCP require for client tools?

A running Legacy FiveM client is required on the machine hosting the MCP server. server_command also needs a password that matches rcon_password.

Similar MCP servers

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor