Answer: To configure an MCP tool hook, add a hook of type `mcp_tool` under `PostToolUse` with a matcher (e.g., `Write|Edit`), specifying the `server` and `tool` names, plus optional `input`, `timeout`, and `statusMessage` fields. The example asks the `scanner` MCP server to scan each patch after Codex writes or edits files. Status: Confirmed Entry: tool/codex/integrations/configure-mcp-tool-hook Revision: 1 Digest: sha256:cc93042d7d42e66a (changes whenever the content changes) Timeline: Created: 2026-11-13T03:51:34Z Last changed: 2026-11-13T03:51:34Z Last verified: 2026-11-20T13:39:55Z Next check: 2026-11-21T13:39:55Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of hook type | mcp_tool | | [1] | 2026-11-20 matcher | Write|Edit | | [1] | 2026-11-20 server | scanner | | [1] | 2026-11-20 tool | scan_patch | | [1] | 2026-11-20 input | { "patch": "${tool_input.command}" } | | [1] | 2026-11-20 timeout | 30 | seconds | [1] | 2026-11-20 statusMessage | Scanning edited files | | [1] | 2026-11-20 default timeout | 600 | seconds | [1] | 2026-11-20 Sources: [1] OpenAI. "Hooks". https://learn.chatgpt.com/docs/hooks.md Role: primary. Accessed: 2026-11-20T13:39:55Z Quote: "Must be `mcp_tool`." (Supports: hook type) Quote: ""matcher": "Write|Edit"," (Supports: matcher) Quote: ""server": "scanner"," (Supports: server) Quote: ""tool": "scan_patch"," (Supports: tool) Quote: ""input": { "patch": "${tool_input.command}" }," (Supports: input) Quote: ""timeout": 30," (Supports: timeout) Quote: ""statusMessage": "Scanning edited files"" (Supports: statusMessage) Quote: "Optional active execution timeout in seconds. Defaults to `600`." (Supports: default timeout) Snapshot SHA-256: 37cdbfc3b9d19925f88af3e680399fd61bd3d15979961302160f97698cc5a841 (captured 2026-11-18T13:33:44Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:33:46Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:39:55Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:39:55Z Last attempt: 2026-11-20T13:39:55Z Notes and limitations: Extracted automatically from a single official source (section "Configure an MCP tool hook"). Related: https://latestn.com/tool/codex/integrations/connect-cli-to-remote-app-server How do I connect the Codex CLI terminal UI to a remote Codex app-server? https://latestn.com/tool/codex/integrations/connect-codex-mcp-config-toml How do I connect Codex to an MCP server using config.toml? https://latestn.com/tool/codex/integrations/connect-codex-to-mcp-tools How do I connect Codex to external MCP tools? https://latestn.com/tool/codex/integrations/ci-integration-options Which CI integrations does Codex Security support? https://latestn.com/tool/codex/integrations/codex-environment-repo-selection How does Codex choose which environment and repo to use for a Linear issue? https://latestn.com/tool/codex/integrations/configure-codex-exec How do I configure `codex exec` options in the Codex GitHub Action? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:51:34Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/integrations/configure-mcp-tool-hook/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/integrations/configure-mcp-tool-hook POST: https://latestn.com/dispute/tool/codex/integrations/configure-mcp-tool-hook with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/integrations/configure-mcp-tool-hook?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure an MCP tool hook in Codex? Revision 1, last verified 2026-11-20T13:39:55Z. https://latestn.com/tool/codex/integrations/configure-mcp-tool-hook (accessed 2026-11-21T10:00:28Z). @misc{LatestN_tool_codex_integrations_configure_mcp_tool_hook_r1, title = {How do I configure an MCP tool hook in Codex?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/integrations/configure-mcp-tool-hook}}, note = {Revision 1; digest sha256:cc93042d7d42e66a; last verified 2026-11-20T13:39:55Z; accessed 2026-11-21T10:00:28Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/integrations/configure-mcp-tool-hook