ROM Converter/Organizer (CHD/RVZ) + MCP Server + A2A Agent
Project description
ROM Manager
CLI or API | MCP | Agent
Version: 1.0.0
Documentation — Installation, deployment, and usage across the API, CLI, and MCP interfaces, plus the integrated A2A agent server, are maintained in the official documentation.
⚠️ Back up your 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
- Agent
- Environment Variables
- Security & Governance
- External Binary Dependencies
- Installation
- Deployment (agent_server.py)
- Documentation
- Contributing
- License
Overview
ROM Manager is a production-grade ROM converter/organizer with an integrated
Model Context Protocol (MCP) server and Agent-to-Agent (A2A) agent. It extracts
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.
Unlike network connectors, ROM Manager is a local tool: there is no service URL and no credentials.
Key Features
- Real conversion pipeline: parallel extract → rename → convert (CHD/RVZ) → cleanup.
- Consolidated Action-Routed MCP Tools: two togglable domains (
conversion,game-codes) minimize token overhead and IDE tool bloat. - Integrated Graph Agent: built-in Pydantic-AI agent (AG-UI / ACP).
- Native Telemetry & Tracing: OpenTelemetry exports out of the box.
- 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
(CLI, MCP server, A2A agent). The orchestrator (RomManager) composes focused
responsibility layers and shells out to external conversion binaries:
flowchart LR
subgraph Entry["Entry Surfaces"]
CLI["CLI<br/>rom-manager"]
MCP["MCP Server<br/>rom-manager-mcp<br/>(CONCEPT:ROM-001/002)"]
AGENT["A2A Agent<br/>rom-manager-agent"]
end
CLI --> RM
MCP --> API["api_client.Api<br/>(facade)"]
AGENT --> MCP
API --> RM
subgraph Pipeline["RomManager orchestrator"]
RM["RomManager"] --> ARCH["archives.py<br/>extract + cue"]
RM --> NAME["naming.py<br/>game-code rename"]
RM --> CONV["conversion.py<br/>command + runner seam"]
end
ARCH --> P7Z["7z / patool"]
CONV --> CHDMAN["chdman (CHD)"]
CONV --> DOLPHIN["dolphin-tool (RVZ)"]
NAME --> CODES["game_codes.py<br/>(PSX registry, DATA)"]
| 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.
MCP
This server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
Available MCP Tools
| Tool Module | Toggle Env Var | Enabled by Default | Description & Actions |
|---|---|---|---|
| Conversion | CONVERSIONTOOL |
True |
Manage ROM conversion operations (CONCEPT:ROM-001). Actions: convert, process_directory, process_file, generate_cue, list_files. |
| Game Codes | GAMECODESTOOL |
True |
Manage game code lookup and naming (CONCEPT:ROM-002). Actions: lookup, list, rename. |
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
stdio client config
{
"mcpServers": {
"rom-manager": {
"command": "uv",
"args": ["run", "rom-manager-mcp"],
"env": { "ROM_DIRECTORY": "/games", "CONVERSIONTOOL": "True", "GAMECODESTOOL": "True" }
}
}
}
Docker
docker run --rm -it -v /games:/games -e ROM_DIRECTORY=/games \
-p 8000:8000 -e TRANSPORT=streamable-http knucklessg1/rom-manager:latest
Agent
ROM Manager ships a Pydantic-AI agent (rom-manager-agent) that calls the MCP
tool surface and exposes an AG-UI web interface. Its identity lives in
rom_manager/agent_data/IDENTITY.md.
rom-manager-agent --web
Environment Variables
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:ROM-001). |
GAMECODESTOOL |
True |
Toggle registration of the game-codes MCP tool domain (CONCEPT:ROM-002). |
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.
MCP / Framework Variables (agent-utilities)
| 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; you do not normally set them yourself.
| 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-utilitiesmiddleware (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
pip install rom-manager # core CLI + Api
pip install "rom-manager[mcp]" # + MCP server
pip install "rom-manager[agent]" # + A2A agent
pip install "rom-manager[native]" # + patool (archive extraction)
pip install "rom-manager[all]" # everything
Deployment (agent_server.py)
rom-manager-agent (entry point rom_manager.agent_server:agent_server) starts a
Pydantic-AI A2A agent that auto-discovers the MCP tool surface from
mcp_config.json and can expose an AG-UI web interface.
# Local: web UI on the default host/port, OTEL enabled
rom-manager-agent --web --otel \
--provider openai --model-id gpt-4o-mini \
--host 0.0.0.0 --port 8080
Container deployment (compose):
# docker/agent.compose.yml (excerpt)
services:
rom-manager-agent:
image: knucklessg1/rom-manager:latest
command: ["rom-manager-agent", "--web"]
environment:
ROM_DIRECTORY: /games
TRANSPORT: streamable-http
HOST: 0.0.0.0
PORT: 8080
ENABLE_OTEL: "True"
AUTH_TYPE: none
volumes:
- /srv/roms:/games
ports:
- "8080:8080"
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rom_manager-1.0.0.tar.gz.
File metadata
- Download URL: rom_manager-1.0.0.tar.gz
- Upload date:
- Size: 83.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf09539634c5fddcc963d87d72cd52413a84f22f3b6210bc56346612afa685f
|
|
| MD5 |
c140003198a6ec87683e69d6ac7c3a4c
|
|
| BLAKE2b-256 |
77288eeb2f0287148ead275be7d607192361f604e09f26e62baaa6191f67f17f
|
File details
Details for the file rom_manager-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rom_manager-1.0.0-py3-none-any.whl
- Upload date:
- Size: 81.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55b22862f16af5185c637b480487ca7d399172ec293dd32871422b885ff89c89
|
|
| MD5 |
4dd676b3a47cb1284e5d1e80351d5107
|
|
| BLAKE2b-256 |
87d457895858cb3427e954cf6c67f70be0473787ee76b9bbd88f8adab46f358a
|