这是一个 Codex 插件:figma-mcp-doctor。 它专门修复 Codex 里 Figma MCP、figma-desktop、use_figma 经常失效的问题。 特别适合 “get_metadata 能用,但 use_figma 不出现” 的情况,因为这代表本地读链路通了,但远程写入链路没暴露。 插件会自动诊断本地 Figma Desktop MCP、远程 Figma MCP OAuth、figma@openai-curated 插件、ChatGPT 登录态、IPv4 代理和 Codex 旧会话缓存。
Figma MCP Doctor
A Codex plugin that diagnoses and repairs Figma MCP, figma-desktop, and use_figma issues in Codex Desktop.
Prerequisite
This plugin is installed with the Codex CLI. If Terminal says zsh: command not found: codex, install Codex first:
npm install -g @openai/codex
codex --login
If npm is missing on macOS, install Node.js first:
brew install node
Then verify:
codex --version
Install
Run these commands in Terminal:
codex plugin marketplace add daydreampp/figma-mcp-doctor
codex plugin add figma-mcp-doctor@figma-mcp-doctor
Then fully quit and reopen Codex Desktop.
Use in Codex
After installing, ask Codex:
My Figma MCP works for get_metadata, but use_figma is missing. Use figma-mcp-doctor to diagnose and repair it.
Or:
Use figma-mcp-doctor to run a diagnosis first. Do not change config until you explain the findings.
What it fixes
This plugin helps with these common cases:
figma-desktopis missing from Codex.- Figma Desktop MCP is not reachable at
127.0.0.1:3845/mcp. get_metadata,get_design_context, orget_screenshotworks, butuse_figmais missing.figma@openai-curatedis not installed or enabled.- Remote Figma MCP OAuth is missing.
- Codex Desktop has stale tools after config changes.
- Remote plugin sync is unstable because of network / IPv6 issues.
Key idea
figma-desktop and use_figma are different chains:
figma-desktopis the local Figma Desktop MCP server. It usually provides read tools.use_figmacomes from the remote Figma plugin chain:figma@openai-curated, remote Figma MCP OAuth, Codex / ChatGPT login state, remote plugin sync, and network reachability.
So: local Figma MCP working does not prove use_figma is available.
Scripts
The plugin includes:
plugins/figma-mcp-doctor/scripts/doctor.sh
plugins/figma-mcp-doctor/scripts/repair.sh
plugins/figma-mcp-doctor/scripts/repair-use-figma.sh --login
plugins/figma-mcp-doctor/scripts/install-ipv4-proxy.sh
plugins/figma-mcp-doctor/scripts/uninstall-ipv4-proxy.sh
Recommended order:
- Run diagnosis first.
- Use safe repair for normal config issues.
- Use
repair-use-figmawhen read tools work butuse_figmais missing. - Use IPv4 proxy repair only when remote plugin sync/network is unstable.
- Fully quit and reopen Codex Desktop after any repair.
Safety
- The scripts back up
~/.codex/config.tomlbefore patching. - The scripts do not print tokens, cookies, or OAuth secrets.
- The IPv4 proxy is opt-in and can be removed.