Skip to main content

gta-rpf-mcp

Windows stdio MCP server for staging GTA V story-mode mods in Agent Mod Manager (AMM). Starting with 1.1.0, the wheel includes a Python RPF7 reader and writer, the format tables, and the XML manifests for the GMM DLC template. An AMM job supplies an immutable archive baseline. The server edits its private copy and reopens the output for verification. AMM handles user approval, installation and rollback.

Run with uvx

uvx gta-rpf-mcp@latest

For an MCP client, select stdio, command uvx, and arguments ["gta-rpf-mcp@latest"]. Python 3.11+ is required. The server uses the Python standard library and Windows CNG for AES. All runtime assets ship in the wheel. The original 205014 ZIP, PowerShell and .NET are unnecessary.

MCP tools

Version 1.2.0 exposes the following operations through tools/list. Both AMM adapters start the same server and show the same catalog. The edition recorded in each job determines which operations it can run.

Tool Operation on the staged copy Editions
gta_rpf_inspect_dlc Read setup2.xml and return the DLC pack name. Legacy, Enhanced
gta_rpf_register_dlc Register an existing DLC in common/data/dlclist.xml. Legacy, Enhanced
gta_rpf_replace_gameconfig Replace common/data/gameconfig.xml. Legacy, Enhanced
gta_rpf_build_vehicle_pack Build a GMM DLC containing the selected loose vehicle resources. Legacy
gta_rpf_build_ped_pack Build a GMM DLC containing the selected Ped resources and metadata. Legacy
gta_rpf_update_menyoo Rebuild the Menyoo vehicle list from the job's models. Legacy
gta_rpf_prepare Run any supported job, including multi-target rebuilds and empty uninstall jobs. Legacy, Enhanced
gta_rpf_status Report backend readiness, version and supported operations. Legacy, Enhanced
gta_rpf_describe_job Discover input paths, archive references and the preparation tools applicable to this job. Legacy, Enhanced
gta_rpf_list_entries List paths in a staged RPF7, including nested archives. Supported RPF7 archives
gta_rpf_read_entry Read an entry by path, with paging and a whole-entry digest. Supported RPF7 entries
gta_rpf_write_entry Replace an existing binary entry from a manifest input and verify the new archive copy. Supported RPF7 binary entries
gta_rpf_create_archive Build an OPEN RPF7 from named input files, including nested archive directories. Supported RPF7 inputs

Use the mcpTool and jobId returned by AMM's prepare_gta_rpf_job. Each of the six operation-specific preparation tools takes only {"jobId":"…"}. A matching tool stages every target in the job in one call. For example, a Legacy vehicle job may also rebuild the DLC registration and Menyoo list. Calling a tool whose operation is absent returns tool_job_mismatch before it consumes the job. After success, use the receipt for that job. Older AMM clients can continue to use gta_rpf_prepare.

gta_rpf_status({}) returns backend, version, ready and separate legacyJobs and enhancedJobs lists. A mod still needs to match the edition and game build. For Enhanced DLC jobs, supply an existing Enhanced-compatible dlc.rpf and leave Menyoo off.

Calling the archive tools

  1. Call gta_rpf_describe_job({"jobId": …}). An archive input includes archive: {path, name} with its canonical basename for decryption. Other manifest inputs have a path usable as sourcePath. Use the returned nextOffset to page through inputs.
  2. Pass the returned archive to gta_rpf_list_entries({jobId, archive}). Pick an exact entry from entries and call gta_rpf_read_entry({jobId, archive, entry}). Use encoding: "utf8" to read XML as text. The default is base64. A read returns the entry size, SHA-256, encoding, data and next byte offset.
  3. For a standalone edit, call gta_rpf_write_entry({jobId, archive, entry, sourcePath}). To build an archive, call gta_rpf_create_archive({jobId, archiveName: "dlc.rpf", entries: [{entry: "setup2.xml", sourcePath}]}). Use the returned archive directly in another list, read or write call. Paths such as x64/models.rpf/example.xml request a nested archive during creation.

Archive tools use the existing job workspace. Write and create produce a private copy, independently of the single-use AMM preparation receipt. Use the operation-specific preparation tool to stage an installation for AMM review. The binary-entry writer handles existing files. Creation supports nested archives and supported resource versions. Enhanced loose model installation and Menyoo remain outside the supported job types.

The RPF7 layout and encryption follow Cryma/gta-toolkit. The read, write, create and recursive listing operations follow GlossMod/gmm-plug-in/rpf. Revisions, license notices and the template provenance are in THIRD-PARTY-NOTICES.txt.

Job protocol (schema 1)

gta_rpf_prepare({"jobId":"0123456789abcdef0123456789abcdef"}) uses exactly %LOCALAPPDATA%\GlossMod\AMM\gta-rpf-jobs\<jobId>. The caller creates input.json and copies all required bytes inside the task directory first. Task paths are relative; absolute paths, traversal, ADS, reserved names, symlinks, junctions, other reparse points and hard links are rejected. All references are size- and SHA-256-verified against securely opened copies. Jobs are one shot; interrupted or failed jobs should be replaced by fresh IDs. No third-party task can request a DLL path, script, archive entry, output path, or native command.

A FileRef is {"path":"inputs/<sha256>","sha256":"<64 lowercase hex>","size":123}. A normal input.json is {"schemaVersion":1,"jobId":"...","kind":"legacy","targets":[...]}; targets are unique and each has id, baseline (FileRef or null), and contributions. Contributions describe the entire active set for that target, in manager order:

Target Baseline Contribution objects Fixed artifact
update selected immutable update.rpf snapshot, mandatory dlc, gameconfig, vehicle, ped output/update.rpf
gmm null: use the bundled Legacy template vehicle, ped output/gmm.rpf (install name dlc.rpf)
menyoo previous unmanaged XML snapshot, or null dlc, vehicle output/menyoo.xml
  • DLC: {"kind":"dlc","packName":"example","source":FileRef}. The service verifies setup2.xml nameHash, and changes only the dlclist.xml entry list. Rust deploys the supplied DLC archive separately.
  • Gameconfig: {"kind":"gameconfig","source":FileRef}. Only common/data/gameconfig.xml in the selected copy is replaced. Multiple distinct replacements fail.
  • Vehicle: {"kind":"vehicle","files":[{"name":"example.yft","source":FileRef},...]}.
  • Ped: {"kind":"ped","modelName":"example","sex":"Female","streamed":true,"files":[{"name":"example.ymt","source":FileRef},{"name":"example/hand_000_u.ydd","source":FileRef}]}. Only known GTA resource extensions are accepted; streamed components must belong to the named model. The service creates the fixed Ped metadata from the selected sex/streaming options.

The manager restores the selected baseline or removes its installed output when a target loses its last contributor. An empty targets list is valid, with an empty output directory. inspectDlc:FileRef is an optional, mutually exclusive operation with non-empty targets: it probes the RPF7 copy, produces no artifact and returns {"schemaVersion":1,"jobId":"...","status":"inspected","packName":"example"}. NG directory encryption depends on the archive basename and length, so staged files use the canonical archive name; gmm.rpf is only a transport filename.

On success, result.json is published after output, with {"schemaVersion":1,"jobId":"...","status":"ok","outputs":[{"id":"update","sha256":"...","size":123}]}. Failures normally produce status:"error", code and a pathless message; a rejected/used workspace or interrupted publish need not get a result. An output without a matching successful result is not authoritative. Readback verifies edited XML, the produced GMM inventory and metadata, and artifact hashes; it does not certify that third-party binary models render or work in-game. New Menyoo rows come from a matching base YFT/YTD pair and use the model name as their label.

Verification

$env:PYTHONPATH = 'src'
py -3.11 -m unittest discover -s tests -v
uv build --wheel --out-dir dist

Windows acceptance also exercised full copies of the retail Legacy 1.0.3889.0 and Enhanced 1.0.1158.16 archives. The 205014 C# reader independently reopened the resulting update.rpf and dlc.rpf files and matched Python for gameconfig, dlclist and setup2 XML. A Legacy GMM job using jester2 and u_m_y_smugmech_01 round-tripped six model files byte-for-byte. In-game loading was not tested.

The automatic suite uses disposable jobs, independent RPF7 fixtures and real readback of generated archives. To run the same checks against a wheel, install that wheel into a clean environment and leave PYTHONPATH unset. See the edition table above for the operations enabled by AMM.

Publishing a release

Configure a PyPI Trusted Publisher for project gta-rpf-mcp, owner GlossMod, repository gta-rpf-mcp, workflow publish.yml, environment pypi. For the first release, use PyPI pending publishers. The publisher exchanges GitHub's release-job identity for a short-lived PyPI credential.

Set the version in src/gta_rpf_mcp/__init__.py, commit it to main, and publish a GitHub Release with the matching tag, such as v1.1.0. The workflow builds the sdist and wheel, installs and tests the wheel on Windows, then publishes both tested distributions to PyPI. If the first run reaches PyPI before authorization is configured, configure the publisher and rerun the failed job for that release.

Metadata

Release files for gta-rpf-mcp 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gta-rpf-mcp 1.2.0
File Size Uploaded Provenance Actions
gta_rpf_mcp-1.2.0.tar.gz 1.2 MB With provenance Details for gta_rpf_mcp-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gta-rpf-mcp 1.2.0
File Interpreter ABI Platform Actions
gta_rpf_mcp-1.2.0-py3-none-any.whl Python 3 none any Details for gta_rpf_mcp-1.2.0-py3-none-any.whl

Total release size: 2.4 MB

Release files / gta_rpf_mcp-1.2.0.tar.gz

Download URL gta_rpf_mcp-1.2.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
1165c417ffa57e89cfc9ee29f337277483a79d82ed2f11d4cd6152d2e55ceaa2
BLAKE2b-256 checksum
How to use checksums
6d97383cff25887c274183203f48cfb58a045448aba4f145d00e01c557f253c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / gta_rpf_mcp-1.2.0-py3-none-any.whl

Download URL gta_rpf_mcp-1.2.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f9172c32b0d38ec8c5cdfafa82402b7e30e39a0ddb788282351f1d620c18ead8
BLAKE2b-256 checksum
How to use checksums
1527263d8096e459bcd5fbf33f2e033d7753cccfaf114a7345c9edb219b8c436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for gta-rpf-mcp 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gta_rpf_mcp-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page