Source visible · stdio MCP · 127.0.0.1 only

A real local Companion bridge, with almost nothing to collect.

Let Codex drive six Pet lifecycle states through a local MCP process. The optional browser overlay is draggable and pointer-aware, but the bridge has no field for prompts, code, paths, commands, tool arguments, logs, credentials, or arbitrary text.

v0.1.0 · 30.4 KB · 873da5c2f4588433e20f288cb51b609052246673310c1dc422fe5ee485e0462b

Local MCP companionPatchlet
127.0.0.1
Patchlet, an original folded-paper Codex Pet
Workingsequence 12 · agent_started
No prompts, code, paths, or logs
What is actually live

Local process, real MCP tools, narrow state.

Codex launches the bridge over standard input/output. The overlay stays on an ephemeral loopback port and requires a random 256-bit token that is never returned to the agent. Events stay in memory and expire back to idle.

  • Unknown fields and replayed sequences are rejected.
  • State and spritesheet endpoints require the private local token.
  • The browser validates the decoded v1/v2 atlas dimensions before display.
  • Stopping the MCP process removes its owned runtime record.
Three trust boundaries

No hidden desktop patching.

This is a review-first source package. It does not modify the Codex application bundle or promise automatic lifecycle calls.

01 · Agent transport

stdio MCP only

Three tools: set state, read state, reset to idle. No remote MCP URL and no open network tool.

02 · Visual transport

Loopback plus bearer token

Host, Origin, CSP, no-store, no-referrer, frame denial, and same-origin resource controls are enforced.

03 · Supply chain

Readable source and manifest

No postinstall script. The ZIP contains source, a pinned lockfile, security model, file hashes, and an external archive checksum.

Review-first setup

Nothing runs from the download button.

Extract the archive, inspect it, verify your Pet, then register the exact local command yourself.

1

Verify and install dependencies

npm ci --omit=dev --ignore-scripts
node ./bin/codextheme-companion.mjs doctor \
  --pet-dir /ABSOLUTE/PATH/TO/PET
2

Register the local stdio server

codex mcp add codextheme-companion \
  --env CODEXTHEME_COMPANION_PET_DIR=/ABSOLUTE/PATH/TO/PET \
  -- node /ABSOLUTE/PATH/TO/companion-bridge/bin/codextheme-companion.mjs serve
3

Open and later remove it explicitly

node ./bin/codextheme-companion.mjs open
codex mcp get codextheme-companion --json
codex mcp remove codextheme-companion

What this release does not claim

The overlay is a local browser window, not a signed always-on-top macOS or Windows application. MCP clients decide whether and when to call lifecycle tools, so registration alone does not prove automatic event coverage. This release does not install Pets, patch Codex, collect task content, or earn a cross-platform compatibility badge.

Use the Apply / Verify / Restore receipt for a device run. Signed native overlay packaging and Windows device evidence remain separate gates.