c64-mcp
Small C64-specific MCP tools layered over GhidraMCP-next and the separately installed Ghidra VICE connector. The server uses stdio and never opens VICE's binary-monitor socket.
Tools
Static analysis
apply_c64_symbolscreates the bundled C64 hardware and KERNAL labels in one idempotent Ghidra batch. Symbols use nestedC64::...namespaces, and the result reportslabels_created,labels_skipped, andlabels_failed.decode_c64_textdecodes inline bytes or a bounded Ghidra read as upper or lower PETSCII or screen codes. Input may use a fixed length, a terminator, or a one/two-byte little-endian length prefix. Token keys are decimal unless prefixed with0x.decode_c64_hires_bitmapanddecode_c64_multicolor_bitmaprender bitmap memory.decode_c64_charset,decode_c64_char_screen, anddecode_c64_spritesrender character and sprite data.
Graphics inputs explicitly name their source:
{"kind": "inline", "bytes": "00ff"}
{"kind": "ghidra", "program": "game", "start": "RAM:2000"}
Renderers return an indexed PNG and a compact summary. output_path is optional; an existing file is replaced only when overwrite=true. Static rendering uses the Pepto PAL palette.
Live VICE
Call vice_connect after the VICE connector has established its TraceRMI session. The remaining vice_* tools cover:
- status, registers, banks, and bank-aware memory;
- checkpoints, step/next/finish, resume, interrupt, and stop waits;
- deterministic keyboard and joystick input;
- reset and snapshot save/load;
- capture of VICE's composited display;
- copying one verified VICE memory range into Ghidra.
vice_disconnect drops only this process's binding. It does not close VICE, the connector, or the trace.
Binary-monitor reads require VICE to be stopped. A normal sequence is vice_interrupt, read or capture, then vice_resume. Display capture is optional: other VICE tools remain usable when the connector lacks it. Capture requires the display methods and a VICE build with the safe display-command fix.
copy_vice_memory_to_ghidra reads the complete range once, verifies its length and SHA-256, then makes one Ghidra write request. It defaults to dry_run=true.
vice_set_joyport injects one raw active-low joystick-line byte on public port 1 or 2. The value remains in effect until another input, reset, or emulator shutdown changes it.
vice_set_keyboard_matrix presses or releases one physical matrix position (row and column 0–7). A press remains held until explicitly released or the keyboard is cleared. It requires a VICE build containing binary-monitor command 0xa3 from the companion patch; stock builds reject it cleanly.
Limits and behavior
- Text and graphics sources are capped at 64 KiB.
- VICE memory calls transfer at most 16 KiB; a verified copy into Ghidra may span 64 KiB.
- Keyboard input is capped at 255 bytes.
- Graphics geometry is bounded before remote reads.
- Requests are never retried automatically. A timed-out mutation may already have changed VICE or Ghidra, so inspect state before repeating it.
- The Ghidra and connector boundaries are local and unauthenticated.
Configuration
GHIDRA_MCP_URLdefaults tohttp://127.0.0.1:8089.GHIDRA_MCP_TIMEOUTdefaults to 30 seconds.
Run with:
uv run c64-mcp
The package contains the immutable text tables and C64 symbol data used by the tools.
Ghidra integration baseline
The companion extensions target Ghidra 12.2 and JDK 25. Older Ghidra releases and older trace databases are not supported. c64-mcp remains a separate MCP process.
With sibling checkouts, run the disposable integration test using
python ../ghidra-mcp-next/tools/test_debugger_stacks.py --stack vice --ghidra "$GHIDRA_INSTALL_DIR".
Metadata
Release files for c64-mcp 0.103.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 | |
|---|---|---|---|---|
| c64_mcp-0.103.0.tar.gz | 154.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| c64_mcp-0.103.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 209.2 kB
Release files / c64_mcp-0.103.0.tar.gz
| Download URL | c64_mcp-0.103.0.tar.gz |
|---|---|
| Size | 154.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7326ec4b8fd48e481b2c35e47ed2830fdbc3548bd73bb374a1f531c732316a91
|
|
BLAKE2b-256 checksum How to use checksums |
c7c84617b40513b2b9cb6604ebdaf4d9e1fd0b5d42c1a408bc1383657456876f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / c64_mcp-0.103.0-py3-none-any.whl
| Download URL | c64_mcp-0.103.0-py3-none-any.whl |
|---|---|
| Size | 55.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daefb964443e6af4e58b72e3c03ac331d6e8e85fb3dcc73085b339b893fa6aae
|
|
BLAKE2b-256 checksum How to use checksums |
2c0c02a477552f70eb7dd3fb13abe84cf125745362dde0b06b6a0bbec475d7ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for c64-mcp 0.103.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.