OpenAI Codex Integration

Updated today

โ€ข

2 min read

Perfect Wiki is an official plugin in the plugin directory that ChatGPT and Codex share. Install it once, and every Codex surface gets it: the CLI, the IDE extension and the Codex app. Codex looks up your specs, decisions and runbooks before it touches the code, and writes back what it learned.

๐Ÿ‘‰ OPEN THE PERFECTWIKI PLUGIN

Install the plugin

  1. In the Codex CLI, type /plugins and search for PerfectWiki. In the Codex app, open Plugins, or use the link above.
  2. Install it. Codex opens a browser window: sign in to Perfect Wiki, choose the knowledge bases and the access level, then click Allow access.
  3. Ask, for example "Implement the CSV export from the Reports v2 spec in Perfect Wiki."
  4. If the session expires, run codex mcp login perfect-wiki to sign in again.

Without the plugin: codex mcp add

Prefer plain MCP config? Run:

codex mcp add perfect-wiki --url https://api.perfectwiki.xyz/mcp

Codex detects that the server uses OAuth and opens your browser to sign in. The entry lands in ~/.codex/config.toml, which the CLI, the IDE extension and the app share. In the Codex app you can also go to Settings โ†’ MCP servers โ†’ Add server; in the IDE extension use the gear menu โ†’ MCP servers.

With an API token (CI and sandboxes)

[mcp_servers.perfect-wiki]
url = "https://api.perfectwiki.xyz/mcp"
bearer_token_env_var = "PERFECT_WIKI_TOKEN"

Export PERFECT_WIKI_TOKEN with a token from your knowledge base settings. Codex reads it from the environment, so the secret never sits in config.toml. The CLI equivalent is codex mcp add perfect-wiki --url โ€ฆ --bearer-token-env-var PERFECT_WIKI_TOKEN. Each token covers one knowledge base and has read & write access.

Move your old wiki in one message

Open Codex in a folder on your computer and say:

Import our old wiki into Perfect Wiki. The Confluence export is in ~/Downloads/confluence-export. Put every page in my "Engineering" knowledge base, keep the page tree, and show me the plan before you start.

Codex reads the export, plans the page tree, creates each page in Perfect Wiki and asks before anything important. Hundreds of pages are fine. Swap in your export folder (from Confluence, Notion, Guru, Slab or any other wiki) and your knowledge base. For a folder of Markdown, Word or PDF files:

Turn everything in ./docs into Perfect Wiki pages in my "Engineering" knowledge base: one page per file, folders as parent pages, and skip anything that is already there.

More prompts: ๐Ÿค– Import with an AI agent (ChatGPT, Claude, Codexโ€ฆ)

FAQ

Is the Codex plugin the same as the ChatGPT one?
Yes. ChatGPT and Codex share one plugin directory, and PerfectWiki is the same plugin in both. See ChatGPT Integration.

Do I need to set it up separately for the CLI, IDE extension and app?
No. They share your Codex configuration, so you install and sign in once.

More: ๐Ÿ”Œ Perfect Wiki MCP Server ยท Codex MCP docs

Was this page helpful?