Skip to content

Codex CLI does not interpolate ${CLAUDE_PLUGIN_ROOT} in plugin .mcp.json args, breaking imessage MCP #19582

Description

@rexplx

Summary

The imessage plugin from anthropics/claude-plugins-official ships a .mcp.json that references ${CLAUDE_PLUGIN_ROOT} — a placeholder Claude Code interpolates with the plugin install dir. Codex CLI passes the literal string through to the spawned process, so bun run --cwd ${CLAUDE_PLUGIN_ROOT} ... fails with ENOENT: Could not change directory to "${CLAUDE_PLUGIN_ROOT}".

Reproduction

  1. codex plugin marketplace add claude-plugins-official https://github.com/anthropics/claude-plugins-official.git
  2. Enable imessage@claude-plugins-official
  3. Launch Codex — startup log shows: MCP client for \imessage` failed to start: MCP startup failed: handshaking with MCP server failed: connection closed: initialize response`

`codex mcp list` confirms the literal placeholder:

```
imessage bun run --cwd ${CLAUDE_PLUGIN_ROOT} --shell=bun --silent start
```

Expected

Codex CLI should interpolate `${CLAUDE_PLUGIN_ROOT}` (and likely `${CLAUDE_PLUGIN_DATA}`, etc.) in `.mcp.json` `args[]` and `command` per the Claude Code plugin spec, since plugins shared between marketplaces rely on this idiom.

Workaround

Register a custom MCP via `codex mcp add` with the absolute install path; or edit cache `.mcp.json` (reverts on plugin re-extract).

Affected versions

Codex CLI (current GA as of 2026-04-25), claude-plugins-official imessage 0.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversskillsIssues related to skills

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions