Skip to main content
Glama

GTAV-Claude-MCP — Talk to Claude inside GTA V

Let Claude see and safely act in a live GTA V game — spawn vehicles, change weather/time, call any of ~6,700 game natives, and read/write vehicle memory (e.g. a wheel-fitment mod) — and chat with Claude from inside the game (press F10), with replies rendered in an in-game panel.

Single-player only. This is a memory-editing/modding tool; never use it in GTA Online.

Credit: if you use, fork, or build on this, please credit TabbedScamper and link back to this repo (https://github.com/TabbedScamper/GTAV-CLAUDE-MCP). See Credits.

⚡ Quick start

  1. Install ScriptHookV + ScriptHookVDotNet 3 (nightly) in your GTA V folder.

  2. Run install.bat (auto-finds your game folder, drops the bridge in scripts\).

  3. Launch GTA V (story mode). Press F11 for the Claude panel, F10 to chat.

  4. For autonomous replies, run the host: run_host.bat (or build ClaudeHost.exe via build_host_exe.bat so players need no Python). The host uses your claude login — no API key.

👉 Every command the bridge supports is documented in TOOLS.md.

Related MCP server: giants-editor-mcp

How it works

The in-game half is now a single C# SHVDN script (ClaudeBridge.dll) — works on GTA V Legacy and Enhanced, no PyLoaderV. The "brain" runs PC-side and talks to it over a socket.

        You (in-game, press F10)              F11 = chat panel (status: thinking / ready / offline)
                │  message
                ▼
   ClaudeBridge.dll  ───────────────►  ClaudeHost.exe / gtav_host.py  ──────►  Claude (Agent SDK)
   (C# SHVDN; Legacy + Enhanced)    long-poll await_user_message    owns the   │ game tools via MCP
   natives · memory r/w · patch ·                                    session   ▼
   decode · profiler · chat panel                                       mcp_server/server.py
                ▲   reply (chat_post → panel)                                  │ TCP :27015, JSON
                └─────────────────────────────────────────────────── ClaudeBridge.dll
  • gtav_host.py drives Claude via the Claude Agent SDK (reuses your claude login — no API key, no terminal, no focus stealing). It long-polls the bridge for your F10 messages, queries Claude, and streams replies into the in-game panel's shared memory. It's also crash-aware: as a separate process from GTA, it detects a game crash and reports the last operation from the on-disk write-ahead log.

  • mcp_server/server.py exposes the game as MCP tools to Claude.

  • pyscript/bridge.py runs inside GTA V (PyLoaderV) and does the actual memory access — with a verified-hash allowlist so Claude can call natives by name without crashing on a bad hash.

  • ui_companion/ is a ScriptHookVDotNet + LemonUI panel that renders the chat in-game.

Prerequisites

In your GTA V install:

On your PC (for the host):

  • Python 3.10+ (tested on 3.14)

  • A Claude subscription, logged in once via claude /login (the host reuses it)

Setup

Full step-by-step walkthrough: INSTALL.md. Quick version:

# 1. Python deps — put the venv OUTSIDE this folder (Dropbox/Git sync over a venv corrupts it)
python -m venv C:\Users\%USERNAME%\GTAV-Claude-MCP-venv
setx GTAV_MCP_PYTHON C:\Users\%USERNAME%\GTAV-Claude-MCP-venv\Scripts\python.exe
"C:\Users\%USERNAME%\GTAV-Claude-MCP-venv\Scripts\pip" install -r requirements.txt
#    (open a NEW terminal after setx so GTAV_MCP_PYTHON takes effect — .mcp.json reads it)

# 2. Log in to Claude once (no API key needed)
claude /login

# 3. Copy the runtime files into your GTA V install (auto-detects Steam/Epic/Rockstar)
powershell -ExecutionPolicy Bypass -File deploy.ps1
#    ...or: deploy.ps1 -GtaPath "X:\...\Grand Theft Auto V"

deploy.ps1 copies bridge.py + native_db.json into <GTA>\pyscript\ and the prebuilt ClaudeChatUI.dll + LemonUI.SHVDN3.dll into <GTA>\scripts\.

Run

  1. Launch GTA V (story mode), press F9 to load the Python bridge.

  2. Run run_host.bat — it prints "Connected to Claude. Ready." (the in-game panel, F11, shows the same).

  3. Press F10 in-game and chat. Try: spawn an adder · set thunder weather and midnight · god mode on, give me a minigun.

See TESTING.md for the full first-run checklist and smoke tests.

What Claude can do

  • Situational awareness: get_context reads a full live snapshot (location, vehicle + class/ plate/engine, speed, weapon + ammo, activity flags, time/weather, wanted level, health, game state) in one ~30ms call. The host pulls it on every message and trims to what's relevant to that message — e.g. "in a ADDER (112 mph), in VINEWOOD, 21:45, THUNDER, wanted 3★, weapon CARBINERIFLE x90, (sprinting, shooting)" for a combat message — so replies are aware without bloating the conversation. Claude can also call get_context(detail="full") on demand.

  • Convenience tools: spawn_vehicle, teleport, set_weather, set_time, give_weapon, repair_vehicle, get_player_ped, set_invincible, set_health, set_wanted_level.

  • Any native, safely: search_natives, native_info, and call_native (by name). The native is resolved to a verified hash for your edition (Legacy/Enhanced) and refused if not on the allowlist — so a wrong hash can't crash the game. Args are coerced to the declared types.

  • Memory / RE: read_memory, write_memory (validated + page-protection-safe + undoable, returns before/after + verified), snapshot/diff, watch, scan_pattern (AOB), resolve_rip_relative.

  • Debugging workbench (build/debug anything):

    • inspect(handle | address) — decode an entity or memory region into labeled, typed slots (float / int / pointer / zero / raw) with entity type + model; follow pointers to walk structs.

    • get_environment — ground truth: edition (Legacy/Enhanced), exe, module base/size, native-DB stats, and which offsets are verified for this build (so it never guesses the ground).

    • set_goal / note_finding / get_findings — a session memory of what you're building and the offsets/labels discovered, persisted across F9 reloads and auto-applied as inspect labels.

  • Vehicle wheels: get_wheel_values, set_wheel_value, continuous per-frame re-assert.

Safety / design

  • Measure, don't guess — verify offsets on the live game via the bridge.

  • Never crash the host — validate every address before deref, restore page protection after writes, single-step, snapshot + revert. A wrong native hash is refused, not called.

  • Single-player only — GTA Online with mods = ban.

  • Antivirus/EDR note: ScriptHookV/PyLoaderV inject into the game and edit memory, which AV/EDR (and especially enterprise EDR like SentinelOne) may quarantine or block. Use a personal machine and add the GTA folder to your AV exclusions if needed.

Known wheel offsets (Legacy, verified)

Field

Offset

Description

Y Rotation

0x008

Camber

Inv Y Rotation

0x010

Inverse camber

X Offset

0x030

Track width

Tyre Radius

0x110

Visual + collision size

Rim Radius

0x114

Visual rim

Tyre Width

0x118

Visual width

Crash diagnostics

  • Write-ahead log: each write is logged to pyscript/crash_logs/last_op.jsonl (fsync'd) before execution, so it survives a crash.

  • faulthandler dumps a Python traceback on hard crashes.

  • The host reads the WAL from disk on a detected crash and reports the last operation.

Project layout

gtav_host.py            # headless Claude host (Agent SDK) - the chat brain
mcp_server/server.py    # MCP server exposing the game as tools
pyscript/bridge.py      # in-game socket server + memory access (PyLoaderV)
pyscript/native_db.json # verified native-hash allowlist (~6,700 natives)
ui_companion/           # ScriptHookVDotNet + LemonUI in-game panel (prebuilt DLL included)
deploy.ps1              # copy runtime files into the GTA V install
run_host.bat            # launch the host
requirements.txt        # Python deps (claude-agent-sdk, mcp)
TESTING.md / CLAUDE.md  # first-run guide / project notes

Credits

Created by TabbedScamper — https://github.com/TabbedScamper/GTAV-CLAUDE-MCP

If you use, fork, or build on this project, please credit TabbedScamper and link back to this repo. The MIT license also requires retaining the copyright and license notice. A mention in your README/mod description or a link back is all I ask. 🙏

License

MIT — see LICENSE. © 2026 TabbedScamper.

Available Tools

52 tools
ask_in_gameA

Ask a question in-game and wait for the user's response.

Use this instead of terminal confirmations when the user is playing. Shows the question via notification, opens keyboard, waits for response.

Common pattern for confirmations: result = ask_in_game("Write camber=0.1 to wheel 0? Type yes/no") if "yes" in result.lower(): # proceed with write

Args: question: The question to display in-game timeout_seconds: How long to wait for response (default 60)

Returns: The user's typed response

Inputs: question (required), timeout_seconds. Returns: result

await_user_messageA

Block until the user types a message in the in-game chat.

This is how the user communicates from inside the game to Claude. Returns when user submits text, or times out.

Returns: The user's message text

Inputs: no named parameters. Returns: result

cache_visual_offsetsA

Cache discovered visual wheel offsets for later use.

After using find_wheel_visual_offsets or probe_drawhandler to discover the correct offsets, use this to cache them so set_visual_wheel_size/width can use them without re-specifying.

Args: dh_offset: DrawHandler offset from vehicle base srg_offset: StreamRenderGfx offset from DrawHandler size_offset: Wheel size offset in StreamRenderGfx width_offset: Wheel width offset in StreamRenderGfx

Inputs: dh_offset (required), srg_offset (required), size_offset (required), width_offset (required). Returns: result

call_nativeA

Call a GTA V native function BY NAME - the primary way to do ANYTHING in-game.

Resolves the name to its verified canonical hash and refuses unknown/guessed hashes (a wrong hash crashes the game). ~6700 natives available; works on Legacy + Enhanced. Discover names with search_natives(); check args with native_info().

Args: name: Native name, e.g. "CREATE_VEHICLE", "SET_ENTITY_INVINCIBLE", "ADD_EXPLOSION", "SET_PED_MOVE_RATE_OVERRIDE". args: Arguments in order (see native_info for order/types). Entity/ped/vehicle args are handles (ints). Get the player ped via PLAYER_PED_ID first. return_type: Optional override ("int","float","bool","string","void"); omit to use the native's declared return type.

Inputs: name (required), args, return_type. Returns: result

call_native_by_hashA

Call a native by raw hash (power-user escape hatch). ALLOWLIST-GATED: refuses any hash not in the verified DB. Prefer call_native(name) instead.

Inputs: hash (required), args, return_type. Returns: result

chat_postA

Post a message to the in-game chat panel (Claude -> User).

Use this to ask questions, report findings, or request actions.

Args: message: Text to display in the in-game chat

Inputs: message (required). Returns: result

clear_continuousB

Clear all continuous wheel writes.

Inputs: no named parameters. Returns: result

clear_snapshotsA

Clear all stored snapshots.

Inputs: no named parameters. Returns: result

diffA

Compare two snapshots and report differences.

This is the core discovery tool: take snapshot A, user performs action, take snapshot B, diff shows which bytes changed.

Args: label_a: First snapshot label (e.g., "before") label_b: Second snapshot label (e.g., "after")

Returns: List of changed offsets with old/new values, interpreted as various types

Inputs: label_a (required), label_b (required). Returns: result

find_wheel_visual_offsetsA

Find visual wheel size/width offsets by matching CWheel values.

Compares values from the physics CWheel structure (tyre_radius, etc.) with values found in potential StreamRenderGfx structures to identify the correct visual wheel offsets.

Inputs: no named parameters. Returns: result

get_chat_historyB

Get recent chat history between Claude and the user in-game.

Args: limit: Maximum number of messages to return (default 20)

Returns: List of messages with sender, text, and timestamp

Inputs: limit. Returns: result

get_crash_logsA

Get recent crash logs from the bridge.

If the game crashed after a write operation, this shows:

  • The last operation before crash (from write-ahead log)

  • Crash timestamp and context

  • Python traceback if available

Use this to diagnose what caused a crash.

Inputs: no named parameters. Returns: result

get_pending_messagesA

Check for any messages the user typed in-game (non-blocking).

The user can press F10 anytime to send a message. Use this to check if they've sent anything without blocking/waiting.

Returns: List of pending messages (empty if none)

Inputs: no named parameters. Returns: result

get_player_pedA

Get the player's ped handle (PLAYER_PED_ID). Most native chains start here.

Inputs: no named parameters. Returns: result

get_undo_stackA

View the bridge's undo stack of recent writes (single source of truth).

Inputs: no named parameters. Returns: result

get_vehicle_infoB

Get detailed info about the current vehicle.

Returns: Model hash, display name, plate text, wheel count, wheel pointers, and current offset values for known fields

Inputs: no named parameters. Returns: result

get_wheel_valuesA

Read current values from a specific wheel using known Legacy offsets.

This uses the verified offsets from FiveM/IKT:

  • 0x008: Y rotation (camber)

  • 0x010: Inverse Y rotation

  • 0x030: X offset (track width)

  • 0x110: Tyre radius

  • 0x114: Rim radius

  • 0x118: Tyre width

Args: wheel_index: Which wheel (0=FL, 1=FR, 2=RL, 3=RR typically)

Returns: Current values for all known wheel fields

Inputs: wheel_index. Returns: result

give_weaponB

Give the player a weapon: e.g. WEAPON_PISTOL, WEAPON_MINIGUN, WEAPON_RPG, WEAPON_RAILGUN, WEAPON_STICKYBOMB, WEAPON_COMBATMG. "WEAPON_" optional.

Inputs: weapon (required), ammo. Returns: result

has_pending_messagesA

Quick check if user has sent any messages in-game (non-blocking).

Returns: True/False and count

Inputs: no named parameters. Returns: result

is_in_vehicleA

Check if the player is currently in a vehicle.

Returns: True/False and basic vehicle info if in one

Inputs: no named parameters. Returns: result

list_continuousA

List all active continuous wheel writes.

Inputs: no named parameters. Returns: result

list_namespacesA

List the native namespaces available (for use with search_natives's namespace filter).

Inputs: no named parameters. Returns: result

list_snapshotsA

List all stored snapshots with their metadata.

Inputs: no named parameters. Returns: result

markA

User-triggered capture point. Call this when user says "go" or "done".

Captures current vehicle/wheel state with the given label. This is the sync signal in the action-prompted model.

Args: label: Descriptive label (e.g., "user_ready", "shift_complete")

Inputs: label (required). Returns: result

native_db_statusA

Native DB status: edition (legacy/enhanced), how many natives are callable, known-bad list.

Inputs: no named parameters. Returns: result

native_infoA

Get a native's params (order + types), return type, namespace, flags, and doc comment.

Inputs: name (required). Returns: result

preload_modelA

Preload a model so a later spawn is instant (avoids the streaming lag). wait=False to fire-and-forget.

Inputs: model (required), wait. Returns: result

probe_drawhandlerA

Probe for DrawHandler -> StreamRenderGfx pointer chain.

FiveM uses this path for visual wheel size/width modifications. This scans vehicle memory looking for pointer chains that lead to float values in the wheel dimension range (0.1 - 2.0).

Inputs: no named parameters. Returns: result

probe_wheelsA

Probe vehicle memory to find wheel array offset.

Different game versions use different offsets for the wheel array. This scans a range of offsets to find where the wheel pointers are.

Inputs: no named parameters. Returns: result

read_memoryA

Read typed value(s) from a memory address.

Args: address: Hex address (e.g., "0x1A2B3C4D") or expression (e.g., "vehicle+0x110") type: Data type - "byte", "int16", "int32", "int64", "float", "double", "ptr" count: Number of consecutive values to read (default 1)

Returns: The value(s) read, or error if address is invalid/unreadable

Inputs: address (required), type, count. Returns: result

repair_vehicleB

Repair and clean the player's current vehicle.

Inputs: no named parameters. Returns: result

resolve_rip_relativeA

Resolve a RIP-relative address from an instruction.

Many GTA patterns use RIP-relative addressing. This reads the displacement at offset_position and computes the absolute address.

Formula: absolute = instruction_address + instruction_size + displacement

Args: address: Address of the instruction (hex) offset_position: Byte offset where the 4-byte displacement starts instruction_size: Total instruction length

Returns: The resolved absolute address

Inputs: address (required), offset_position (required), instruction_size (required). Returns: result

revert_last_writeA

Revert the last memory write. Routes to the bridge's single undo stack, which correctly reverts both raw writes and wheel-field writes.

Inputs: no named parameters. Returns: result

scan_patternB

Search for a byte pattern in game memory.

Pattern format: hex bytes with ?? wildcards (e.g., "48 8B 05 ?? ?? ?? ?? 45")

Args: pattern: AOB pattern to search for module: Module to search in (default "GTA5.exe")

Returns: List of matching addresses

Inputs: pattern (required), module. Returns: result

scan_structureA

Scan a memory structure for float values in a specified range.

Useful for exploring discovered pointer chains to find wheel visual offsets.

Args: address: Hex address to scan from size: Number of bytes to scan (default 512) min_val: Minimum float value to include (default 0.0) max_val: Maximum float value to include (default 10.0)

Returns: List of offsets and values within the range

Inputs: address (required), size, min_val, max_val. Returns: result

search_nativesA

Search the ~6700-native library to discover what you can do.

Args: query: substring in the native name OR its doc comment (e.g. "explosion", "wanted", "invincible", "vehicle_mod", "ptfx"). namespace: optional filter (e.g. "VEHICLE","PLAYER","PED","WEAPON","ENTITY","MISC","CAM","FIRE","GRAPHICS"). limit: max results (default 30).

Inputs: query, namespace, limit. Returns: result

set_continuousA

Set a wheel value to be applied continuously (every frame).

GTA V's physics can reset wheel values each tick, so for some modifications to persist visually, they need to be reapplied every frame.

Args: wheel_index: Which wheel (0-3) field: Field name - "camber", "track_width", etc. value: Value to continuously apply enabled: True to enable, False to disable

Returns: Confirmation of continuous write status

Inputs: wheel_index (required), field (required), value (required), enabled. Returns: result

set_healthA

Set the player's health (max ~200 by default). Fetches a fresh ped handle first.

Inputs: health. Returns: result

set_invincibleC

Toggle player invincibility (god mode). Fetches a fresh ped handle first.

Inputs: enabled. Returns: result

set_overlayA

Update the in-game overlay to show Claude's current status/intent.

This keeps the user informed without alt-tabbing.

Args: text: Status text to display (e.g., "Finding RPM offset...", "Found! RPM @ +0x824") state: Overlay state - "searching", "found", "waiting", "error"

Inputs: text (required), state. Returns: result

set_timeC

Set the in-game clock (24h).

Inputs: hour (required), minute, second. Returns: result

set_visual_wheel_sizeA

Set the visual wheel size using the FiveM-style StreamRenderGfx path.

This modifies the rendered wheel size, separate from the physics CWheel values. Offsets must be discovered first via find_wheel_visual_offsets.

Args: size: New wheel size (typically 0.3-1.5) dh_offset: Optional DrawHandler offset from vehicle (use cached if None) srg_offset: Optional StreamRenderGfx offset (use cached if None) size_offset: Optional size value offset (use cached if None)

Inputs: size (required), dh_offset, srg_offset, size_offset. Returns: result

set_visual_wheel_widthA

Set the visual wheel width using the FiveM-style StreamRenderGfx path.

This modifies the rendered wheel width, separate from the physics CWheel values. Offsets must be discovered first via find_wheel_visual_offsets.

Args: width: New wheel width (typically 0.1-0.5) dh_offset: Optional DrawHandler offset from vehicle (use cached if None) srg_offset: Optional StreamRenderGfx offset (use cached if None) width_offset: Optional width value offset (use cached if None)

Inputs: width (required), dh_offset, srg_offset, width_offset. Returns: result

set_wanted_levelA

Set the player's wanted level (0-5) and apply it. Use 0 to clear stars.

Inputs: level. Returns: result

set_weatherA

Set weather instantly: CLEAR, EXTRASUNNY, CLOUDS, OVERCAST, RAIN, THUNDER, CLEARING, SMOG, FOGGY, SNOW, BLIZZARD, XMAS, HALLOWEEN.

Inputs: weather (required). Returns: result

set_wheel_valueA

Set a wheel field value using known offsets.

Args: wheel_index: Which wheel (0-3) field: Field name - "camber", "track_width", "tyre_radius", "rim_radius", "tyre_width" value: New value (float)

Returns: Success/failure and old value for reference

Inputs: wheel_index (required), field (required), value (required). Returns: result

snapshotA

Capture a memory region for later comparison.

Args: label: Name for this snapshot (e.g., "before_shift", "in_1st_gear") address: Starting address (hex or expression) size: Number of bytes to capture (default 256)

Returns: Confirmation with snapshot metadata

Inputs: label (required), address (required), size. Returns: result

spawn_vehicleB

Spawn a vehicle in front of the player. model = e.g. "adder","hydra","rhino","insurgent2","buzzard". Preload big models first.

Inputs: model (required), distance. Returns: result

statusA

Check connection to the GTA V bridge and get game state.

Returns: Connection status, game version, current state (in menu, in world, etc.)

Inputs: no named parameters. Returns: result

teleportC

Teleport the player (and current vehicle) to coordinates.

Inputs: x (required), y (required), z (required), heading. Returns: result

watchA

Watch multiple addresses over time and report value changes.

Useful for finding which value tracks a behavior (e.g., which float ramps when you floor the throttle = RPM).

Args: addresses: List of addresses to watch (hex or expressions) duration_seconds: How long to watch (default 2s) interval_ms: Sample interval in milliseconds (default 100ms)

Returns: Per-address digest showing min/max/delta and change pattern

Inputs: addresses (required), duration_seconds, interval_ms. Returns: result

write_memoryA

Write a typed value to a memory address. Requires explicit consent.

CAUTION: Writing to wrong addresses can crash the game. The bridge validates addresses and snapshots before writing for revert.

Args: address: Hex address or expression value: Value to write (will be converted to specified type) type: Data type - "byte", "int16", "int32", "int64", "float", "double"

Returns: Success/failure, old value (for manual revert reference)

Inputs: address (required), value (required), type. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 52 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but there is some overlap among communication tools (ask_in_game, await_user_message, get_pending_messages, has_pending_messages) and wheel probing tools (probe_wheels, probe_drawhandler, find_wheel_visual_offsets). These could be confused by an agent, but descriptions help differentiate.

    Naming Consistency4/5

    Tool names consistently use lowercase with underscores and a verb_noun pattern (e.g., call_native, set_visual_wheel_size). A few tools use single verbs or short names (diff, status, watch), but overall the naming is predictable and readable.

    Tool Count2/5

    With 52 tools, the server is over-scoped for a typical MCP server. While each tool serves a specific purpose in GTA V modding, the high number can overwhelm agents and suggests some tools could be merged or omitted for a leaner interface.

    Completeness4/5

    The tool set covers a comprehensive range of GTA V modding tasks: native calls, memory manipulation, vehicle/wheel modification, player states, communication, and crash diagnostics. Minor gaps exist (e.g., no direct ped spawning beyond vehicle), but core workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Bridges Claude AI to a live Unreal Engine 5 editor session, enabling natural language control of scene inspection, modification, logging, source search, console commands, and C++ class scaffolding.
      10
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude to drive a live GIANTS Editor 10.x (FS25) session with 59 tools for terrain editing, field creation, asset placement, map audits, and more through natural language.
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Lets a coding agent drive a live GTA San Andreas 1.0 US process to read and write game state, spawn vehicles and peds, set up scenarios, capture screenshots, poke memory, and invoke any SCM opcode. It also hot-reloads ASI plugins under development without restarting the game, turning minute-long test cycles into seconds.
      1
      MIT