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.3.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 or supported resource file from a manifest input and verify the new archive copy. | Supported RPF7 files |
gta_rpf_add_entry |
Add a new file from a manifest input and verify its size and SHA-256 after reopening. | Supported RPF7 files |
gta_rpf_delete_entry |
Delete a file and verify that the reopened archive still has its parent and no longer has the file. | Supported RPF7 files |
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
In AMM with the standalone archive tool, first call prepare_gta_rpf_archive_job with the selected game_id and the game-relative path to the outer .rpf. For mods/update/update.rpf/common/data/dlclist.xml, pass archive_path: "mods/update/update.rpf". Use the returned jobId and archive with gta_rpf_read_entry, set entry: "common/data/dlclist.xml" and encoding: "utf8". If the mods copy is absent, explicitly select update/update.rpf to inspect the stock archive. For an edit, supply the optional source_paths when requesting the job and use the corresponding returned sourcePath as the payload. Installation jobs also expose their declared inputs through the same archive tools.
- Call
gta_rpf_describe_job({"jobId": …}). An archive input includesarchive: {path, name}with its canonical basename for decryption. Other manifest inputs have apathusable assourcePath. Use the returnednextOffsetto page through inputs. - Pass the returned
archivetogta_rpf_list_entries({jobId, archive}). Callgta_rpf_read_entry({jobId, archive, entry: "common/data/dlclist.xml", encoding: "utf8"})to read the DLC list as text. The default encoding isbase64. A read returns the entry size, SHA-256, encoding, data and next byte offset. - Call
gta_rpf_write_entry({jobId, archive, entry, sourcePath})to replace an existing file,gta_rpf_add_entry({jobId, archive, entry, sourcePath})to add a new file, orgta_rpf_delete_entry({jobId, archive, entry})to remove one. These tools accept paths at the root, in ordinary directories and through multiple existing nested archives, such asx64/packs.rpf/content/inner.rpf/common/data/dlclist.xml. Paths are case-insensitive. Add creates missing ordinary directories and returnsentry_existsfor an occupied path. Read, write and delete returnentry_not_foundfor a missing file. Add and write accept zero-byte ordinary files from a standalone archive job. - To build an archive, call
gta_rpf_create_archive({jobId, archiveName: "dlc.rpf", entries: [{entry: "setup2.xml", sourcePath}]}). Paths such asx64/models.rpf/example.xmlcreate a nested archive during creation. Pass thearchivereturned by any mutation to the next archive tool.
Archive mutations produce a private copy in the job workspace. The input archive stays available at its original reference. The file tools work inside existing nested archives, and deletion preserves ordinary directories and nested archive containers. Use the operation-specific preparation tool to stage an installation for AMM review.
Legacy and Enhanced jobs both support file edits for compatible PC RPF7 data, including XML such as common/data/dlclist.xml. Resource reads, adds and writes require a supported RSC7 version. Enhanced loose model installation and Menyoo remain outside the supported preparation 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. AMM installation preparation can be claimed once per job. No third-party task can request a DLL path, script, archive entry, output path, or native command.
Standalone file jobs use {schemaVersion: 1, jobId, kind, archiveInputs: [{name, source: FileRef}], payloadInputs: [FileRef, ...]}. The basename in name identifies the snapshot for NG decryption. gta_rpf_describe_job lists the archive and its payloads and returns an empty preparationTools list. File operations can be chained in the same job using the returned archive reference.
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 verifiessetup2.xmlnameHash, and changes only thedlclist.xmlentry list. Rust deploys the supplied DLC archive separately. - Gameconfig:
{"kind":"gameconfig","source":FileRef}. Onlycommon/data/gameconfig.xmlin 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.3.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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gta_rpf_mcp-1.3.0.tar.gz | 1.2 MB | With provenance | Details for gta_rpf_mcp-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gta_rpf_mcp-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for gta_rpf_mcp-1.3.0-py3-none-any.whl |
Total release size: 2.4 MB
Release files / gta_rpf_mcp-1.3.0.tar.gz
| Download URL | gta_rpf_mcp-1.3.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ec5cbf44de1d3d8dd4b00ab9fd32bfc4c6a4be1cb95ab24774480b446b44df2
|
|
BLAKE2b-256 checksum How to use checksums |
05e07945b8ef74d5e93ec767d43f8aade52384cd9eb8de483a006dd40ce4a9d3
|
| 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 logRelease files / gta_rpf_mcp-1.3.0-py3-none-any.whl
| Download URL | gta_rpf_mcp-1.3.0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25060a1e7ca229b0f781266b1549815cc4c83fabe78858bdb051e3331f640bc9
|
|
BLAKE2b-256 checksum How to use checksums |
f15fb1469425d80c879be46dcd67e15d03c95aae5f6d4c6843b445827df621cd
|
| 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 logSecurity for gta-rpf-mcp 1.3.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.
Attestation for gta_rpf_mcp-1.3.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 logA 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.