Connect Codex to Figma
Published Jul 16, 2026 · Checked against the official docs
Follow Figma's install command on a recent Windows build and OAuth registration dies with a 400 invalid_redirect_uri error — downgrading to Codex 0.129.0 clears it. That command only shows up on the general developer docs; the Codex-branded help article skips straight to a plugin click-through with no CLI at all. Rather than fight OAuth, the desktop app runs a local MCP endpoint with zero login, minus the write and search tools.
What you get
Figma runs two MCP servers, and Codex can talk to either one. The hosted server lives at https://mcp.figma.com/mcp. The other one is built into the Figma desktop app and listens at http://127.0.0.1:3845/mcp. Both speak Streamable HTTP, so both go into ~/.codex/config.toml as a url entry.
The remote server carries the longer tool list. From Figma’s tool reference, the ones you’ll reach for from Codex:
get_design_contextreturns the design context for a layer or selectionget_variable_defsreturns the variables and styles used in your selectionget_screenshottakes a screenshot of your selectionget_metadatareturns a sparse XML representation of your selectionget_code_connect_mapandget_code_connect_suggestionsmap Figma instances to code components in your reposearch_design_systemsearches connected libraries for componentsuse_figma, which Figma calls a general-purpose tool for writing to Figma fileswhoamireturns which Figma account is authenticated
Figma marks use_figma, search_design_system, whoami, download_assets, and generate_figma_design as remote only. Connect the desktop server and those don’t appear at all. The four inspection tools at the top of that list work on both.
The desktop server gives up those tools in exchange for no authentication. It answers only while the Figma desktop app is open, you’re in Dev Mode (Shift+D), and you’ve turned on “Enable desktop MCP server” in the inspect panel.
Setup
-
Pick a server. The remote one is what Figma’s install docs lead with, and it’s the only one that serves the write and search tools. The desktop one skips OAuth but runs only while Figma is open on your machine.
-
Add it. Figma’s install docs give Codex users this command:
codex mcp add figma --url https://mcp.figma.com/mcpThat writes the following into
~/.codex/config.toml:[mcp_servers.figma] url = "https://mcp.figma.com/mcp"Worth knowing where that command comes from: Codex’s own MCP docs spell out
codex mcp add <name> -- <command>for stdio servers and don’t document a--urlflag. Figma publishes it, and openai/codex #23804 shows a user running that exact command and getting as far as OAuth registration, which is two independent confirmations that the flag works. You can also skip the command and write the block by hand.For the desktop server, the block looks like this:
[mcp_servers.figma-desktop] url = "http://127.0.0.1:3845/mcp"Both entries use
urlrather thancommand, including the desktop one. A loopback address is still an HTTP endpoint, and an entry takescommandorurlbut never both. -
Authenticate. Only the remote server needs this. Figma’s install docs say to authenticate the server when prompted, and they don’t name a Codex command for it. The OAuth command on the Codex side is:
codex mcp login figmaCodex opens a browser and catches the callback locally, and the token lands in Codex’s credential store instead of
config.toml. Figma publishes no bearer token or personal access token path for this server, sobearer_token_env_varhas nothing to point at here. Figma’s docs also don’t name any OAuth scopes, so there’s nothing to put inscopeseither.The desktop server skips this step, because being reachable at all is the access control.
-
Confirm it initialized.
codex mcp listLook for
figma(orfigma-desktop) with a non-zero tool count. A remote server that connects but reports zero tools is a known Streamable HTTP failure shape rather than a problem with your config, and it’s covered on Connect an MCP server.
Gotchas
Figma’s own two docs sites disagree about Codex. The Codex article on help.figma.com walks through an in-app plugin flow for the remote server: click Plugins in the Codex app, click + next to Figma, click Install Figma, then click Allow access. It never gives you a CLI command, a URL, or a TOML block. The install docs on developers.figma.com, which cover VS Code, Cursor, Claude Code, and Codex together, are the ones carrying codex mcp add figma --url https://mcp.figma.com/mcp. Land on the Codex-branded page first and you’d reasonably conclude the CLI path doesn’t exist.
The remote command is broken on at least one recent Windows build. openai/codex #23804, filed May 21 2026, reports codex mcp add figma --url https://mcp.figma.com/mcp failing OAuth registration with HTTP 400 {"error":"invalid_redirect_uri"} on Codex 0.132.0 from Windows PowerShell. The reporter says downgrading to 0.129.0 clears it. The issue is open with no maintainer response as of this writing, so check which version you’re on before filing a duplicate.
Don’t set FIGMA_OAUTH_TOKEN. Some third-party writeups pair [features].rmcp_client = true with bearer_token_env_var = "FIGMA_OAUTH_TOKEN". No Figma page names that variable, and the hosted server is OAuth only, so the bearer half of that block points at nothing. The flag half is real but has nothing to do with Figma: openai/codex #6995 (closed) renamed experimental_use_rmcp_client to [features].rmcp_client, and the docs quoted in that issue gate OAuth login flows on it. If codex mcp login never opens a browser, that flag is the thing to go read about. The env var is not.
Old builds reject url-only entries. openai/codex #4526, filed September 30 2025 against codex-cli 0.42.0, is a user getting “missing field command in mcp_servers.figma” from a Figma config example. That build wouldn’t accept a remote entry without a command. The reporter set one anyway and the connection then timed out. If you see that error today, update Codex before you debug anything else.
Related
- Connect an MCP server: the general stdio-vs-remote shape and the reliability keys
mcp_servers.<id>.url: the remote endpoint and its auth keysmcp_servers.<id>.startup_timeout_sec: the launch window if a server is slow to answer- How to install Codex: if you’re setting this up before Codex itself is installed
Sources
- Figma — Set up the remote MCP server (official docs)
- Figma — Set up the desktop MCP server (official docs)
- Figma — MCP server tools and prompts (tool list, remote-only flags)
- Figma Help Center — Codex and Figma: Set up the MCP server
- openai/codex #23804 — Add figma mcp meet 400 error (open)
- openai/codex #4526 — Figma MCP server error (closed)