ROM Manager
CLI or API | MCP
Version: 3.2.1
Documentation — Installation, deployment, and usage across the API, CLI, and official documentation.
⚠️ Back up the operator's ROMs before working with this tool. Conversion and the
--delete/clean_origin_filesoptions are destructive to source files.
Table of Contents
- Overview
- Key Features
- Architecture
- Usage (CLI or API)
- MCP
- Environment Variables
- Security & Governance
- External Binary Dependencies
- Installation
- Documentation
- Contributing
- License
Overview
ROM Manager is a production-grade ROM converter/organizer with an integrated
archives, auto-renames ROMs via a known game-code registry, converts ISO/WBFS
images to CHD (chdman) or RVZ (dolphin-tool), generates missing .cue
sheets, and cleans up source files — in parallel.
It also speaks to RomM (CONCEPT:RO-OS.state.api-base-one-mixin) — a self-hosted
ROM library server — through a full REST client, so one rom-manager tool
manages both the files on disk (local conversion) and the web library (RomM).
The local conversion pipeline needs no service URL or credentials; the RomM
client is configured via ROMM_* environment variables.
Key Features
- Real conversion pipeline: parallel extract → rename → convert (CHD/RVZ) → cleanup.
- Full RomM REST client (
CONCEPT:RO-OS.state.api-base-one-mixin): complete coverage of the RomM API (roms, platforms, collections, saves, states, firmware, users, tasks, search, config, feeds, devices, …) with Basic/OAuth2 auth — one unified CLI and one action-routed MCP tool per resource group. - Consolidated Action-Routed MCP Tools: togglable domains (
conversion,game-codes,romm-*) minimize token overhead and IDE tool bloat. - Native Telemetry & Tracing: OpenTelemetry exports by default.
- Lazy native deps: archive backends are optional extras, imported only when used.
Architecture
ROM Manager keeps a single, well-factored pipeline behind three entry surfaces responsibility layers and shells out to external conversion binaries:
| Layer | Module | Responsibility |
|---|---|---|
| Orchestrator | rom_manager/rom_manager.py |
Pipeline composition + CLI (RomManager, rom_manager()). |
| Archives | rom_manager/archives.py |
Archive detection, extraction, .cue generation. |
| Conversion | rom_manager/conversion.py |
chdman/dolphin-tool command building + runner seam. |
| Naming | rom_manager/naming.py |
Game-code lookup + in-place rename. |
| Data | rom_manager/game_codes.py |
Verbatim PSX serial→title registry (DATA). |
| Facade | rom_manager/api_client.py |
Api wrapper consumed by MCP tools/agent. |
Usage (CLI or API)
This package wraps a local ROM conversion pipeline (rom_manager.rom_manager.RomManager).
Use it via the CLI or the rom_manager.api_client.Api facade.
rom-manager --directory "/games/PSX/" --iso chd --verbose
| Flag | Long | Description |
|---|---|---|
-c |
--cpu-count |
Limit max CPUs for parallel processing |
-d |
--directory |
Directory to process ROMs |
-i |
--iso |
Conversion target: rvz or chd |
-f |
--force |
Force overwrite of existing .chd files |
-v |
--verbose |
Display all output messages |
-x |
--delete |
Delete original files after processing |
Detailed API usage is in docs/usage.md.
RomM web library (CONCEPT:RO-OS.state.api-base-one-mixin)
The same rom-manager command manages a running RomM server. Set ROMM_URL and
credentials (ROMM_USERNAME/ROMM_PASSWORD or ROMM_TOKEN), then use
rom-manager <resource> <action> [positionals] [--flag value …]:
rom-manager roms list --platform_ids 7 --limit 50 # list/search ROMs
rom-manager roms get 123 # positional id
rom-manager platforms list
rom-manager saves add --rom_id 5 --file_path ./game.srm
rom-manager tasks run scan # trigger a library scan
rom-manager stats # server statistics
Resources map 1:1 to RommApi methods. The on-disk converter is reachable as
before (bare flags) or via the explicit rom-manager convert … alias. From
Python, use rom_manager.get_romm_client() → RommApi.
MCP
This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
Available MCP Tools
The table below is auto-generated from the MCP server — do not edit by hand.
Condensed action-routed tools (default — MCP_TOOL_MODE=condensed)
| MCP Tool | Toggle Env Var | Description |
|---|---|---|
rom_conversion |
CONVERSIONTOOL |
Manage ROM conversion operations (CONCEPT:RO-OS.identity.verifies-chdman-dolphin-tool). |
rom_game_codes |
GAME_CODESTOOL |
Manage ROM game code lookup and naming operations (CONCEPT:RO-OS.governance.game-codes-naming-resolves). |
romm_collections |
ROMMTOOL |
|
romm_config |
ROMMTOOL |
|
romm_devices |
ROMMTOOL |
|
romm_feeds |
ROMMTOOL |
|
romm_firmware |
ROMMTOOL |
|
romm_platforms |
ROMMTOOL |
|
romm_roms |
ROMMTOOL |
|
romm_saves |
ROMMTOOL |
|
romm_screenshots |
ROMMTOOL |
|
romm_search |
ROMMTOOL |
|
romm_states |
ROMMTOOL |
|
romm_system |
ROMMTOOL |
|
romm_tasks |
ROMMTOOL |
|
romm_users |
ROMMTOOL |
Verbose 1:1 API-mapped tools (MCP_TOOL_MODE=verbose or both)
8 per-operation tools — one per public API method (click to expand)
| MCP Tool | Toggle Env Var | Description |
|---|---|---|
rom_manager_convert |
APITOOL |
Run the full parallel conversion pipeline over a directory (CONCEPT:RO-OS.identity.verifies-chdman-dolphin-tool). |
rom_manager_generate_cue |
APITOOL |
Generate a missing .cue sheet for .bin tracks in a directory. |
rom_manager_list_files |
APITOOL |
List ROM/archive files under a directory matching extensions. |
rom_manager_list_game_codes |
APITOOL |
List known game codes, optionally filtered by a code prefix. |
rom_manager_lookup_game_code |
APITOOL |
Look up a single game code -> name in the PSX code registry. |
rom_manager_process_directory |
APITOOL |
Run the full parallel conversion pipeline over a directory (CONCEPT:RO-OS.identity.verifies-chdman-dolphin-tool). |
rom_manager_process_file |
APITOOL |
Process a single ROM file through the conversion pipeline (CONCEPT:RO-OS.identity.verifies-chdman-dolphin-tool). |
rom_manager_rename_by_game_code |
APITOOL |
Rename a file in-place using the embedded game code, if recognised. |
16 action-routed tool(s) (default) · 8 verbose 1:1 tool(s). Each is enabled unless its <DOMAIN>TOOL toggle is set false; MCP_TOOL_MODE selects the surface (condensed default · verbose 1:1 · both). Auto-generated — do not edit.
Dynamic Tool Selection
Each domain is gated by an environment toggle (default True). Set a toggle to
False to omit that tool from the registered surface.
Running the MCP server
# stdio (default)
rom-manager-mcp
# Streamable HTTP
rom-manager-mcp --transport streamable-http --host 0.0.0.0 --port 8000
Install the connector-focused
[mcp]extra. Examples userom-manager[mcp]to add FastMCP / FastAPI throughagent-connector-sdk; the required Agent Connector SDK core enables model orchestration.
stdio client config
{
"mcpServers": {
"rom-manager": {
"command": "uvx",
"args": ["--from", "rom-manager[mcp]", "rom-manager-mcp"],
"env": { "ROM_DIRECTORY": "/games", "CONVERSIONTOOL": "True", "GAME_CODESTOOL": "True" }
}
}
}
Docker
docker run --rm -it -v /games:/games -e ROM_DIRECTORY=/games \
-p 8000:8000 -e TRANSPORT=streamable-http example/rom-manager:mcp
The
:mcptag is the MCP-serving image (built fromdocker/Dockerfile --target mcp, installingrom-manager[mcp]). The default when the operator runrom-manager-agent(the agent), not just the MCP server. See Container images.
Additional Deployment Options
rom-manager can run as a local stdio process or container, or behind a remote
network boundary. The
Deployment guide carries
the detailed transport contract.
- Local container — launch a reviewed immutable image as a least-privilege stdio child with no listener or published port.
- Remote URL — connect through an operator-supplied authenticated HTTPS
ingress. Keep its URL, outbound identity references, trust profile, and exact
MCP_ALLOWED_HOSTSinAgentConfig.
Agent
rom_manager/agent_data/IDENTITY.md.
Environment Variables
Package environment variables
| Variable | Example | Description |
|---|---|---|
HOST |
0.0.0.0 |
|
PORT |
8000 |
|
TRANSPORT |
stdio |
options: stdio, streamable-http, sse |
AUTH_TYPE |
none |
Authentication mode for the MCP server (none for this local tool). |
FASTMCP_LOG_LEVEL |
ERROR |
FastMCP internal log verbosity (the server pins this to ERROR at startup). |
NO_COLOR |
1 |
Disable ANSI colour output in child tooling. |
TERM |
dumb |
Force a dumb terminal so progress bars / colour codes do not corrupt stdio. |
ENABLE_OTEL |
True |
|
OTEL_EXPORTER_OTLP_ENDPOINT |
http://localhost:8080/api/public/otel |
|
OTEL_EXPORTER_OTLP_PUBLIC_KEY |
secret-injected | |
OTEL_EXPORTER_OTLP_SECRET_KEY |
secret-injected | |
OTEL_EXPORTER_OTLP_PROTOCOL |
http/protobuf |
|
EUNOMIA_TYPE |
none |
options: none, embedded, remote |
EUNOMIA_POLICY_FILE |
mcp_policies.json |
|
EUNOMIA_REMOTE_URL |
http://eunomia-server:8000 |
|
ROM_DIRECTORY |
./roms |
Default directory of ROMs to process when none is supplied. |
ROM_ISO_TYPE |
chd |
Conversion target: chd (chdman) or rvz (dolphin-tool) |
ROM_VERBOSE |
False |
|
ROM_FORCE |
False |
|
ROMM_URL |
http://localhost:3000 |
Base URL of the running RomM instance (e.g. http://host:3000). Required for any RomM (roms, platforms, ...) command or MCP tool. |
ROMM_USERNAME |
admin |
Credentials: Basic/OAuth username+password, or a pre-minted bearer token. |
ROMM_PASSWORD |
secret-injected | |
ROMM_TOKEN |
secret-injected | |
ROMM_AUTH_MODE |
basic |
Auth mode: basic (default, no expiry) or oauth (password grant via /api/token). |
ROMM_SCOPES |
roms.read roms.write platforms.read |
Space-separated OAuth scopes (defaults to RomM's full read+write set). |
ROMM_TLS_PROFILE |
— | Optional named TLS profile or secret reference; peer and hostname verification are mandatory. |
ROMM_TLS_PROFILE_REF |
— | |
AUDIENCE |
http://localhost:3000 |
Optional OIDC delegation (RFC 8693 token exchange) — used only when delegated auth is enabled and no ROMM_TOKEN is supplied. Target audience for the exchanged token (defaults to ROMM_URL). |
DELEGATED_SCOPES |
roms.read |
Scopes requested for the delegated token. |
CONVERSIONTOOL |
True |
These names match the authoritative "Toggle Env Var" column in the README MCP tools table (condensed action-routed surface). |
GAME_CODESTOOL |
True |
|
ROMMTOOL |
True |
Master switch for the RomM remote-library tools. |
Inherited agent-connector-sdk variables (apply to every connector)
| Variable | Example | Description |
|---|---|---|
MCP_TOOL_MODE |
intent |
Tool surface: intent | condensed | verbose | both |
MCP_ENABLED_TOOLS |
— | Comma-separated tool allow-list |
MCP_DISABLED_TOOLS |
— | Comma-separated tool deny-list |
MCP_ENABLED_TAGS |
— | Comma-separated tag allow-list |
MCP_DISABLED_TAGS |
— | Comma-separated tag deny-list |
MCP_CLIENT_AUTH |
— | Outbound MCP child auth: oidc-client-credentials | basic | none |
OIDC_CLIENT_ID |
— | OIDC client id (service-account auth) |
OIDC_CLIENT_SECRET_REF |
secret://identity/oidc-client-secret |
Runtime secret reference for the OIDC service account |
MCP_BASIC_AUTH_USERNAME |
— | HTTP Basic username (MCP_CLIENT_AUTH=basic) |
MCP_BASIC_AUTH_PASSWORD_REF |
secret://identity/mcp-basic-password |
Runtime secret reference for HTTP Basic auth (MCP_CLIENT_AUTH=basic) |
DEBUG |
False |
Verbose logging |
PYTHONUNBUFFERED |
1 |
Unbuffered stdout (recommended in containers) |
MCP_URL |
http://localhost:8000/mcp |
URL of the MCP server the agent connects to |
PROVIDER |
openai |
LLM provider for the agent |
MODEL_ID |
gpt-4o |
Model id for the agent |
32 package + 16 inherited variable(s). Auto-generated from .env.example + the shared agent-connector-sdk set — do not edit.
All settings are optional — ROM Manager runs with sensible defaults and requires
no credentials. Copy .env.example to .env to override.
Application Variables
| Variable | Default | Description |
|---|---|---|
ROM_DIRECTORY |
. (cwd) |
Default directory of ROMs to process when none is supplied. |
ROM_ISO_TYPE |
chd |
Conversion target: chd (chdman) or rvz (dolphin-tool). |
ROM_VERBOSE |
False |
Emit verbose conversion output. |
ROM_FORCE |
False |
Force overwrite of existing converted files. |
CONVERSIONTOOL |
True |
Toggle registration of the conversion MCP tool domain (CONCEPT:RO-OS.identity.verifies-chdman-dolphin-tool). |
GAME_CODESTOOL |
True |
Toggle registration of the game-codes MCP tool domain (CONCEPT:RO-OS.governance.game-codes-naming-resolves). |
ROMMTOOL |
True |
Toggle registration of the RomM MCP tool domains (CONCEPT:RO-OS.state.api-base-one-mixin). |
CPU count and "delete originals" are exposed as CLI flags (
--cpu-count/--delete) and MCP action params (cpu_count/clean_origin_files) rather than environment variables.
RomM Variables (CONCEPT:RO-OS.state.api-base-one-mixin)
Required only when using RomM (roms, platforms, … commands / romm_* tools).
| Variable | Default | Description |
|---|---|---|
ROMM_URL |
— | Base URL of the RomM instance (e.g. http://host:3000). Required for RomM. |
ROMM_USERNAME / ROMM_PASSWORD |
— | Basic or OAuth password-grant credentials. |
ROMM_TOKEN |
— | Pre-minted OAuth2 bearer token (takes precedence over username/password). |
ROMM_AUTH_MODE |
basic |
basic (no expiry) or oauth (password grant via /api/token, auto-refresh). |
ROMM_SCOPES |
RomM full set | Space-separated OAuth scopes requested when minting a token. |
ROMM_TLS_PROFILE |
— | Named TLS profile for private PKI, mTLS, or proxy policy. |
ROMM_TLS_PROFILE_REF |
— | Secret reference containing the TLS profile. |
MCP / Framework Variables (agent-connector-sdk)
| Variable | Default | Description |
|---|---|---|
HOST |
0.0.0.0 |
Bind host for HTTP/SSE transports. |
PORT |
8000 |
Bind port for HTTP/SSE transports. |
TRANSPORT |
stdio |
MCP transport: stdio, streamable-http, or sse. |
AUTH_TYPE |
none |
MCP authentication mode (this local tool needs none). |
FASTMCP_LOG_LEVEL |
ERROR |
FastMCP internal log verbosity (pinned at startup). |
ENABLE_OTEL |
True |
Enable OpenTelemetry export of traces/metrics. |
EUNOMIA_TYPE |
none |
Eunomia authorization mode: none, embedded, or remote. |
EUNOMIA_POLICY_FILE |
mcp_policies.json |
Path to the Eunomia policy file when embedded. |
Terminal Variables
These are set automatically by the server to keep stdio transport clean; the operator do not normally set them the operator.
| Variable | Default | Description |
|---|---|---|
NO_COLOR |
1 |
Disable ANSI colour codes in child tooling output. |
TERM |
dumb |
Force a dumb terminal so progress output does not corrupt the stdio channel. |
Security & Governance
- No credentials: ROM Manager is a local tool with no service URL/token.
- Eunomia policies & OpenTelemetry: inherited from the
agent-connector-sdkmiddleware (see.env.example). - Destructive-op safety: the agent recommends backing up ROMs before
clean_origin_files/delete operations.
External Binary Dependencies
Conversion actions shell out to native tools (the Python package installs fine without them):
chdman(CHD) —apt install mame-tools(Ubuntu) or MAME tools on Windows.dolphin-tool(RVZ) — see the Dolphin emulator docs.7z/ archive backends (extraction) —apt install p7zip-full; pair with therom-manager[native]extra (patool).
Installation
Pick the extra that matches what the operator want to run:
| Extra | Installs | Use when |
|---|---|---|
rom-manager (core) |
CLI converter + Api facade (no server tooling) |
The operator only use the CLI / Python API |
rom-manager[mcp] |
Connector-focused MCP server (agent-connector-sdk — FastMCP/FastAPI + epistemic-graph[full]) |
The operator run the MCP server (smallest server install / image) |
rom-manager[native] |
+ patool (archive extraction backends) |
The operator convert archived ROMs locally |
rom-manager[all] |
Everything (mcp + agent + native + otel) |
Development / all surfaces |
pip install rom-manager # core CLI + Api
pip install "rom-manager[mcp]" # + MCP server
pip install "rom-manager[native]" # + patool (archive extraction)
pip install "rom-manager[all]" # everything
Container images (:mcp)
One multi-stage docker/Dockerfile builds the MCP-only image (--target mcp):
| Image tag | Build target | Contents | Entrypoint |
|---|---|---|---|
example/rom-manager:mcp |
--target mcp |
rom-manager[mcp] — connector-focused, includes epistemic-graph[full]; no model-orchestration stack |
rom-manager-mcp |
docker build --target mcp -t example/rom-manager:mcp docker/ # connector-focused MCP server
agent (immutable agent digest) with a co-located :mcp sidecar.
Knowledge-graph database (epistemic-graph)
Agent Connector SDK core dependency (epistemic-graph[full]). The [mcp] extra keeps
deployments can use the bundled engine. For production or shared state, run
epistemic-graph as a dedicated database service and configure the runtime to use it.
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
diagrams are documented in the
epistemic-graph deployment guide.
Deployment (agent_server.py)
Container deployment (compose):
The MCP server (rom-manager-mcp) deploys the same way; see
docs/deployment.md for the full compose/Swarm recipes.
Documentation
Contributing
Contributions are welcome. Run pre-commit run --all-files before opening a PR.
Preserve the real conversion pipeline — wrap RomManager, do not break it.
License
MIT © Knuckles-Team
Deploy with agent-connector-sdk-deployment
Provision this package with the consolidated agent-connector-sdk-deployment
workflow. It selects an installed-package, editable-source, or immutable-container
path; records only runtime secret and TLS-profile references in AgentConfig; and
runs doctor, registration, policy, observability, and rollback gates. Ask your agent
to "deploy rom-manager with agent-connector-sdk-deployment".
| Install mode | Command |
|---|---|
| Installed package | uv tool install "rom-manager[mcp]", then run rom-manager-mcp |
| Immutable container | deploy registry.example.invalid/rom-manager@sha256:<digest> through the operator-selected orchestrator |
The repository embeds no deployment profile, credential value, certificate path, or
environment-specific endpoint. Supply those at runtime through AgentConfig and the
configured secret provider.
Governed capability contract
This package ships a compact canonical skill surface with specialist procedures
kept as referenced workflows. The current MCP tools, skill metadata,
connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations,
tool-schema fingerprints, and certification metadata form one versioned
capability contract. Validate them together; do not rely on stale tool names or
historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
Metadata
Release files for rom-manager 3.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rom_manager-3.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / rom_manager-3.2.1-py3-none-any.whl
| Download URL | rom_manager-3.2.1-py3-none-any.whl |
|---|---|
| Size | 160.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e796eab83c422ce10c1cd335c5b6c20330c6e2767cd482a3b322c7d46f4ac9f
|
|
BLAKE2b-256 checksum How to use checksums |
8046257a5c52b38806255e0a0beb186b351f71a2cbd87203caed18bd6f8709f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|