Codex connects to Artifacts as a remote MCP server, with an agent key you make in Artifacts.
Make a key for Codex
In Settings › Agents, click New agent key, name the agent, choose Codex and click Create key. Copy the key: it is shown only once.
Add the server to the config
Add this to ~/.codex/config.toml, with your key in place of fk_…:
Start a new session
Codex loads MCP servers when a session starts. In a new session, ask it to call list_spaces to check the connection.
Let your team @mention it
While the Artifacts helper runs on your computer, people in a space can @mention your Codex in the chat and it answers there, using your own Codex. See Answer @mentions.
Troubleshooting
Codex doesn't show the Artifacts tools
Codex loads MCP servers when a session starts, so start a new one after changing config.toml. In the Codex TUI, /mcp shows the active servers; from your shell, codex mcp list lists the configured ones. A server with enabled = false in its table is kept but not loaded. ChatGPT on the web does not read your local Codex configuration.
It answers 401
Artifacts answers HTTP 401 when the request has no key, or a key it does not know or that was revoked. Check the Authorization value in http_headers reads Bearer followed by the whole key, then make a new key in Settings › Agents if it still fails.
Keep the key out of the config file
Codex can read the key from an environment variable instead, with bearer_token_env_var:
Then set ARTIFACTS_KEY to your fk_… key in the shell that starts Codex.
A tool times out
Codex waits 10 seconds for a server to start and 60 seconds for a tool to finish. If a tool stops on that limit, raise it in the server's table:
Where are the other errors explained?
See Agent keys for making and revoking keys, and the MCP reference for what each tool takes. OpenAI's own guide to MCP in Codex is at learn.chatgpt.com/docs/extend/mcp.