Codex
Use OpenKnowledge with OpenAI Codex.
OpenKnowledge plugs into Codex through MCP.
Install
There are two ways to connect Codex, depending on how you run OpenKnowledge:
- macOS desktop app. The first time you open a project, a consent dialog detects Codex and configures it for you. To re-trigger the dialog, choose File → Set up OpenKnowledge integrations….
- Web app / terminal (Linux, Windows, Intel Mac — see the web app guide). Run
ok initin your project: it registers the OpenKnowledge MCP server with Codex and the other editors it detects. Everyok startrepairs the entry if it has drifted (it never adds one you removed).
Open with AI
From the editor, Open with AI ▸ Codex dispatches the current file, folder, or project to Codex in one click. Entry points include the sidebar's right-click menu (file / folder / empty space), the macOS File → Open with AI menu, and the Command Palette. You can also hand the current doc to Codex from the bottom Ask AI composer.
Codex receives a short prompt asking it to open the target in OpenKnowledge's web preview. The agent then grounds the rest of the conversation through MCP. See Editor → Open with AI for the full UX.
Verify
Open the project in Codex and ask:
The agent should call the OpenKnowledge exec tool and respond with some of your documents.
If you don't see the tool, restart Codex. If it's still missing and ok init reported your config was left unchanged, the reason in parentheses says why ~/.codex/config.toml (or $CODEX_HOME/config.toml if set) was left untouched. For config problems, fix the file and re-run ok init; for no format-preserving writer available, your config isn't the problem — OpenKnowledge can't rewrite the file safely on this platform, so add an open-knowledge entry to mcp_servers by hand (command: ok mcp).