Skip to main content
Glama
dmang-dev

mcp-retroarch

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
RETROARCH_HOSTNoUDP destination host for RetroArch127.0.0.1
RETROARCH_PORTNoUDP port for RetroArch network commands55355

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
retroarch_pingA

Verify connectivity to RetroArch's Network Control Interface. Returns the RetroArch version string if reachable.

retroarch_get_statusA

Get the current emulation status: playing/paused state, system identifier, game basename, and CRC32. Returns 'contentless' if no game is loaded.

retroarch_get_configA

Read a RetroArch configuration parameter by name. Useful values: savefile_directory, savestate_directory, system_directory, cache_directory, log_dir, runtime_log_directory, netplay_nickname, video_fullscreen. Note: screenshot_directory is NOT exposed via this command — RetroArch saves screenshots wherever it's configured but doesn't let the NCI report that path.

retroarch_read_memoryA

Read up to 4096 bytes from emulated memory via the loaded core's system memory map. Returns an array of byte values.

RetroArch exposes two distinct memory APIs:

  • READ_CORE_MEMORY / WRITE_CORE_MEMORY (used by retroarch_read/write_memory): Goes through the libretro core's system memory map. Most reliable when the core advertises a memory map (most cores do). Errors with "no memory map defined" if the loaded core doesn't.

  • READ_CORE_RAM / WRITE_CORE_RAM (used by retroarch_read/write_ram): Uses the achievement (CHEEVOS) address space. Works even when no core memory map is defined, but addresses follow CHEEVOS conventions, not the system bus. Use when read_memory returns "no memory map defined".

retroarch_write_memoryA

Write a byte sequence to emulated memory via the system memory map. Returns the number of bytes actually written (may be less than requested if a read-only descriptor is hit). Disables hardcore mode for the session.

RetroArch exposes two distinct memory APIs:

  • READ_CORE_MEMORY / WRITE_CORE_MEMORY (used by retroarch_read/write_memory): Goes through the libretro core's system memory map. Most reliable when the core advertises a memory map (most cores do). Errors with "no memory map defined" if the loaded core doesn't.

  • READ_CORE_RAM / WRITE_CORE_RAM (used by retroarch_read/write_ram): Uses the achievement (CHEEVOS) address space. Works even when no core memory map is defined, but addresses follow CHEEVOS conventions, not the system bus. Use when read_memory returns "no memory map defined".

retroarch_read_ramA

Read memory via the CHEEVOS (achievements) address space. Use this if retroarch_read_memory reports 'no memory map defined' — some libretro cores don't advertise a memory map but DO support the older CHEEVOS read API.

retroarch_write_ramA

Write to CHEEVOS memory address space. Fire-and-forget — RetroArch sends no acknowledgement for this command. Disables hardcore mode for the session.

retroarch_pause_toggleA

Toggle the pause state. There's no separate pause/unpause command in the NCI — this single command flips the current state. Check retroarch_get_status first to know the current state.

retroarch_frame_advanceA

Step exactly one frame forward. Only effective while paused; pause first with retroarch_pause_toggle.

retroarch_resetA

Hard-reset the running game (equivalent to pressing the console's reset button).

retroarch_screenshotA

Capture a screenshot of the current display. RetroArch saves it to its configured screenshot directory (which the NCI doesn't report — check RetroArch's settings). Fire-and-forget; returns immediately.

retroarch_show_messageA

Display a notification message overlaid on the RetroArch window. Useful for debugging or telling the user something during a long-running script.

retroarch_save_state_currentA

Save state to the currently-selected slot. RetroArch's NCI doesn't expose a 'save to slot N' command — you must walk the slot selector to N first using state_slot_plus/minus, then call this. The current slot is RetroArch's internal state and isn't reported back.

retroarch_load_state_currentA

Load state from the currently-selected slot. Use retroarch_load_state_slot if you want to load from an explicit numbered slot without changing the current slot pointer.

retroarch_load_state_slotA

Load state from an explicit numbered slot. Doesn't change the 'current slot' selector (unlike state_slot_plus/minus + load_state_current).

retroarch_state_slot_plusA

Increment the currently-selected save state slot. Combine with retroarch_save_state_current / retroarch_load_state_current to target a specific slot for SAVE.

retroarch_state_slot_minusA

Decrement the currently-selected save state slot.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmang-dev/mcp-retroarch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server