Skip to content
← All posts

Connecting an AI assistant to FiveM replay data

Integrations · · 4 min

An AI assistant is only useful if it can see the thing you are asking about. For a FiveM community that usually means timestamps, players and incident notes, not a copy-pasted ticket thread.

What a FiveM MCP server does for server owners and admins

The Model Context Protocol is an open standard that lets AI clients read structured context from external services. Instead of copying timestamps, player details, and notes into a chat window by hand, an MCP client talks to an endpoint that exposes approved data.

In FiveM, MCP servers split into two categories. Development MCP servers help scripters look up CitizenFX natives, scaffold fxmanifest.lua files, or send commands to a local FXServer. Operations and moderation MCP servers, like FiveReplay's new opt-in endpoint, help staff work with recorded gameplay data.

Because FiveReplay records your server continuously on the server side, players install no client mods. It is not a bodycam or CCTV resource. It captures players, NPCs, vehicles, combat, explosions, animations, sound, and voice. Staff can re-watch any moment from any angle in-game with /replay or in a web browser, with plan-based retention of up to a week.

How FiveReplay's MCP integration works

FiveReplay's MCP integration is a new, opt-in feature built for multi-staff roleplay communities. You do not need to run a local script or expose your FXServer RCON port to an AI agent. Instead, staff connect any MCP-compatible client, such as Claude, Cursor, or VS Code, to the hosted endpoint at https://fivereplay.dev/mcp.

Nothing turns on automatically. Access requires explicit consent, and every connection stays tied to role-based permissions inside your community.

Consent and authorization flow

When a staff member adds https://fivereplay.dev/mcp to their MCP client, the client starts an authorization flow rather than asking for a shared admin key. The process follows three steps:

  • The staff member signs in and selects the FiveReplay community they want to connect.
  • FiveReplay verifies the user's role-based permissions for that specific community.
  • The user reviews and approves a scoped, opt-in grant that defines what the AI client can access.

Admins and staff can revoke a grant at any time. Because every grant belongs to an individual account, you never have to share a static token across your moderation team.

Why per-community access matters

Many FiveM admins run more than one server or help moderate multiple roleplay communities. Without per-community scoping, an AI client linked to a global account could pull data from the wrong server or expose records to someone who only moderates a separate test environment.

Per-community access keeps every server's replay data isolated. A moderator with permissions on Community A can only authorize and access Community A through MCP. That boundary protects player privacy and keeps staff workflows predictable across multi-server networks.

Practical example: reviewing a contested shootout

Picture a standard roleplay ticket. A player reports they were killed without initiation near Legion Square twenty minutes ago, and they were not recording their screen. The accused player insists they gave a verbal warning and fired only after the other player drew a weapon.

Without server-side replay, staff have to guess from text logs or wait for one-sided clips. With FiveReplay, the entire encounter is already recorded on the server side, including players, vehicles, combat, animations, sound, and voice. A moderator who has authorized their MCP client at https://fivereplay.dev/mcp for that community can use their AI assistant inside their existing workflow, then jump straight into the replay viewer in-game with /replay or in a browser.

Inside the viewer, the moderator watches the scene from any angle and listens to the recorded audio. Within minutes, staff can see who drew a weapon first and whether a warning was spoken, relying on recorded server state instead of conflicting stories.

Connecting Claude, Cursor, or VS Code to an MCP endpoint

MCP clients support two main transport types: remote HTTP endpoints (used by hosted services like FiveReplay and Kings of Los Santos) and local stdio child processes (used by npm-based dev tools). Because FiveReplay is hosted, your staff do not need to install Node.js or maintain local bridge scripts.

In an MCP client that supports remote HTTP servers, add https://fivereplay.dev/mcp in your client's MCP settings and complete the browser authorization prompt. For local development tools that use stdio, add a JSON entry to your editor's MCP configuration file pointing to npx, such as npx -y fivem-mcp (Node 20+) or npx -y fivem-mcp-server (Node 22+).

Security checklist for running MCP tools with FiveM

Connecting an AI client to game infrastructure requires clear boundaries. Live-execution bridges and hosted replay endpoints carry very different risks, so apply the right controls to each:

  • Keep live-testing MCP bridges on local development machines only. Tools that use UDP RCON (port 30120) or FiveM Legacy client TCP devcon (ports 29200 and 29300) should never be exposed to the public internet or aimed at a live roleplay server.
  • Bind local MCP servers to loopback (127.0.0.1) so other machines on your network cannot send commands to your test FXServer.
  • Use scoped, per-user authorization for staff tools. With FiveReplay's MCP integration, rely on role-based permissions and per-community grants so staff only access the servers they actively moderate.
  • Audit grants regularly. Review active staff roles and revoke MCP access immediately when a moderator steps down.

Access is per community and per role, and the owner can revoke it. That boundary matters more than the list of tools an assistant can call.

Where to start