Out of the box, an AI coding assistant knows surprisingly little about FiveM. It has never seen the 6,400+ game natives, it confuses ESX and QBCore APIs, and it can't read your server's logs or database. The Model Context Protocol (MCP) fixes this by letting your AI client connect to external tool servers. This guide walks through connecting your assistant to FiveClaw so it gains real FiveM expertise.
What is MCP?
MCP is an open standard for connecting AI clients to external tools and context. An MCP server exposes a set of tools (functions the AI can call) over a simple protocol. When you add a server to your client's config, every tool it exposes becomes available to the model mid-conversation — so the AI can look up a native, scan a resource for bugs, or query your database without you copy-pasting anything.
fivem-mcp (docs & natives, free with any API key) and ai-fivem-dev-mcp (code intelligence, Pro) — plus a free open-source local agent that connects the AI directly to your own server.Prerequisites
- An MCP-compatible AI client: Cursor, Claude Desktop, VS Code (Cline or Copilot Chat), or Windsurf.
- A FiveClaw account and an API key (the free plan is enough to start).
- Your FiveM resources on the same machine if you want the local agent's file/log/database tools.
Step 1 — Get your API key
Create a free account and open Dashboard → API Keys. Generate a key (it starts with fc_live_) and copy it. Treat it like a password — it authorizes requests against your plan's rate limits.
Step 2 — Add the MCP server to your client
Most clients read a JSON config file. Add the FiveClaw server under mcpServers. For Claude Desktop, edit claude_desktop_config.json; for Cursor, use ~/.cursor/mcp.json:
{
"mcpServers": {
"fivem-mcp": {
"url": "https://mcp.fiveclaw.xyz/sse",
"headers": {
"Authorization": "Bearer fc_live_YOUR_KEY_HERE"
}
}
}
}Restart your client so it picks up the new config. You should see the FiveClaw tools listed as connected — for example, 2 MCP servers connected · 69 tools available.
Step 3 — (Optional) Run the local agent
To let your AI read files, tail logs, run MySQL queries, and control your server, install the open-source fiveclaw-agent on the machine that hosts your FiveM server. It runs locally and only forwards tool requests — your credentials and code never leave your machine. The agent is free and requires no subscription.
Step 4 — Verify it works
Ask your assistant something only a FiveM-aware tool could answer, such as “What does GetEntityCoords return and what are its parameters?” or “Scan my esx_banking resource for SQL injection.” If the model calls a FiveClaw tool and returns a precise answer, you're connected.