mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
--mcp-stdio serves MCP on stdin and stdout as newline-delimited JSON-RPC, for a client that starts RetroArch itself; no token is asked. It takes the stdout descriptor for the protocol at option parsing and points stdout at stderr, so RetroArch's log and a core's prints never reach the client's stream. Reads and writes never wait: a line is handled once whole, answers are queued and written as the pipe takes them, and both outlive the server across a content load. It offers logging: after logging/setLevel, new lines from the GET_LOG ring at that level and above go out as notifications/message from the poll, so the threads that log do no more than before. Closing stdin quits.