For API key servers, the command adds --bearer-token-env-var MCPCORE_API_KEY. Codex then reads the key from the MCPCORE_API_KEY environment variable every time it connects, and the key is never written to config.toml:
For OAuth servers, run codex mcp login my_server after adding it.
Add the server by hand
Open ~/.codex/config.toml (create it if it doesn’t exist) and add a block for your server. Copy the ready-made snippet from the Integration tab of your server in the dashboard, or write it by hand:
The table name after mcp_servers. is the server name Codex shows. Use letters, numbers, _ or -.
Verify
Restart Codex and run:
codex mcp list
Your server should be listed. Ask Codex to use one of your tools to confirm it works.
Keep API keys out of version control. If you share config.toml across machines, store the key in an environment variable and reference it with bearer_token_env_var = "MCPCORE_API_KEY" instead of http_headers.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MCPCore","colors":{"primary":"#4d6600","light":"#d2fa00","dark":"#c8ee00"},"logo":{"light":"https://mintcdn.com/mcpcore-a1467608/EiSN2eTWCBXeHqVn/logo/light.svg?fit=max\u0026auto=format\u0026n=EiSN2eTWCBXeHqVn\u0026q=85\u0026s=02b77af04a782445ce5c8506922010f2","dark":"https://mintcdn.com/mcpcore-a1467608/EiSN2eTWCBXeHqVn/logo/dark.svg?fit=max\u0026auto=format\u0026n=EiSN2eTWCBXeHqVn\u0026q=85\u0026s=666a08bbef85c2058fd3a29608bf0b1d","href":"https://mcpcore.io"},"favicon":"https://mintcdn.com/mcpcore-a1467608/EiSN2eTWCBXeHqVn/favicon.svg?fit=max\u0026auto=format\u0026n=EiSN2eTWCBXeHqVn\u0026q=85\u0026s=3dea75db83dfc8abd611242fa7eae509","appearance":{"default":"system"},"background":{"decoration":"grid","color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[],"primary":{"type":"button","label":"Get started free","href":"https://app.mcpcore.io/register"}},"footer":{"socials":{"x":"https://x.com/mcpcore","linkedin":"https://linkedin.com/company/mcpcore","instagram":"https://instagram.com/mcpcore"}},"fonts":{"family":"Inter"},"contextual":{"options":["copy","view","claude","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.mcpcore.io"},{"anchor":"Blog","icon":"newspaper","href":"https://mcpcore.io/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mcpcore-a1467608","hasAudioNarration":false,"actualSubdomain":"mcpcore-a1467608","customDomains":["docs.mcpcore.io"],"gitSource":{"type":"github","owner":"mcpcoreio","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6aed0440a8f9517d5403832c","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Documentation","count":44},{"language":"default","tag":"Tools","count":16},{"language":"default","tag":"MCP Servers","count":13},{"language":"default","tag":"Connect AI Clients","count":10},{"language":"default","tag":"Security Modes","count":6},{"language":"default","tag":"Workflow Builder","count":6},{"language":"default","tag":"Enterprise SSO","count":4},{"language":"default","tag":"Observability","count":3},{"language":"default","tag":"Getting Started","count":2}],"searchSettings":{"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"#topbar-cta-button .text-white,#topbar-cta-button svg,a.bg-primary-dark,a.bg-primary-dark .text-white,button.bg-primary-dark,button.bg-primary-dark .text-white{color:#0b0f00!important}"}],"page":{"pagePath":"connect/codex","slug":"/connect/codex","pageMetadata":{"title":"Codex","description":"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.","href":"/connect/codex"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Tabs,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Codex supports remote MCP servers over Streamable HTTP natively, so no proxy or `,_jsx(_components.code,{children:`npx`}),` command is needed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`quick-install`,children:`Quick install`}),`\n`,_jsxs(_components.p,{children:[`On the server’s `,_jsx(_components.strong,{children:`Integration`}),` tab, select `,_jsx(_components.strong,{children:`Codex`}),` and copy the command from `,_jsx(_components.strong,{children:`Quick install`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` mcp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my_server`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://my-server.mcpcore.io/mcp`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.strong,{children:`API key`}),` servers, the command adds `,_jsx(_components.code,{children:`--bearer-token-env-var MCPCORE_API_KEY`}),`. Codex then reads the key from the `,_jsx(_components.code,{children:`MCPCORE_API_KEY`}),` environment variable every time it connects, and the key is never written to `,_jsx(_components.code,{children:`config.toml`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` MCPCORE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cyour-api-key>\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` mcp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my_server`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://my-server.mcpcore.io/mcp`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bearer-token-env-var`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` MCPCORE_API_KEY`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For OAuth servers, run `,_jsx(_components.code,{children:`codex mcp login my_server`}),` after adding it.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`add-the-server-by-hand`,children:`Add the server by hand`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.code,{children:`~/.codex/config.toml`}),` (create it if it doesn’t exist) and add a block for your server. Copy the ready-made snippet from the `,_jsx(_components.strong,{children:`Integration`}),` tab of your server in the dashboard, or write it by hand:`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Public`,id:`public`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_servers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`my_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://my-server.mcpcore.io/mcp\"`})]}),`\n`]})})})}),_jsx(Tab,{title:`Unlisted`,id:`unlisted`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_servers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`my_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://my-server.mcpcore.io/mcp/\u003csecret-key>\"`})]}),`\n`]})})})}),_jsx(Tab,{title:`API Key`,id:`api-key`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_servers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`my_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://my-server.mcpcore.io/mcp\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`http_headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer \u003cyour-api-key>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})})}),_jsxs(Tab,{title:`OAuth 2.0`,id:`oauth-2-0`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_servers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`my_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://my-server.mcpcore.io/mcp\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`Then sign in once:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` mcp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my_server`})]}),`\n`]})})})]})]}),`\n`,_jsxs(_components.p,{children:[`The table name after `,_jsx(_components.code,{children:`mcp_servers.`}),` is the server name Codex shows. Use letters, numbers, `,_jsx(_components.code,{children:`_`}),` or `,_jsx(_components.code,{children:`-`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`verify`,children:`Verify`}),`\n`,_jsx(_components.p,{children:`Restart Codex and run:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` mcp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Your server should be listed. Ask Codex to use one of your tools to confirm it works.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Keep API keys out of version control. If you share `,_jsx(_components.code,{children:`config.toml`}),` across machines, store the key in an environment variable and reference it with `,_jsx(_components.code,{children:`bearer_token_env_var = \"MCPCORE_API_KEY\"`}),` instead of `,_jsx(_components.code,{children:`http_headers`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Codex","description":"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.","href":"/connect/codex"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick install","slug":"quick-install","depth":2,"children":[]},{"title":"Add the server by hand","slug":"add-the-server-by-hand","depth":2,"children":[]},{"title":"Verify","slug":"verify","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"mcpcore-a1467608","siteName":"MCPCore","title":"Codex - MCPCore","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T19:47:40.568Z","originalFileLocation":"connect/codex.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MCPCore\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Codex - MCPCore\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MCPCore\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mcpcore.io/connect/codex\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mcpcore-a1467608.mintlify.site/_mintlify/api/og/v2?division=Connect+AI+Clients\u0026amp;title=Codex\u0026amp;description=Connect+your+MCPCore+server+to+OpenAI+Codex+CLI+and+the+Codex+IDE+extension.\u0026amp;theme=665e3e37035163387f315c3a\u0026amp;signature=d675f501ec0d13ca2f33158ae924e5e161e6686fa1467dd21507d5ebc6d33e02\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Codex - MCPCore\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mcpcore-a1467608.mintlify.site/_mintlify/api/og/v2?division=Connect+AI+Clients\u0026amp;title=Codex\u0026amp;description=Connect+your+MCPCore+server+to+OpenAI+Codex+CLI+and+the+Codex+IDE+extension.\u0026amp;theme=665e3e37035163387f315c3a\u0026amp;signature=d675f501ec0d13ca2f33158ae924e5e161e6686fa1467dd21507d5ebc6d33e02\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/mcpcore-a1467608/aVmnGlmbAxsT0pX1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MCPCore\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4d6600\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mcpcore.io/connect/codex\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/connect/codex.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mcpcore.io/#organization\",\"name\":\"MCPCore\",\"url\":\"https://docs.mcpcore.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mcpcore-a1467608/EiSN2eTWCBXeHqVn/logo/light.svg?fit=max\u0026auto=format\u0026n=EiSN2eTWCBXeHqVn\u0026q=85\u0026s=02b77af04a782445ce5c8506922010f2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mcpcore.io#website\",\"name\":\"MCPCore\",\"url\":\"https://docs.mcpcore.io\",\"publisher\":{\"@id\":\"https://docs.mcpcore.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mcpcore.io/connect/codex#webpage\",\"url\":\"https://docs.mcpcore.io/connect/codex\",\"name\":\"Codex\",\"description\":\"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.\",\"dateModified\":\"2026-10-29T19:47:40.568Z\",\"isPartOf\":{\"@id\":\"https://docs.mcpcore.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mcpcore.io/connect/codex#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mcpcore.io/connect/codex#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Connect AI Clients\",\"item\":\"https://docs.mcpcore.io/connect/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Codex\",\"item\":\"https://docs.mcpcore.io/connect/codex\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.mcpcore.io/connect/codex#article\",\"headline\":\"Codex\",\"name\":\"Codex\",\"description\":\"Connect your MCPCore server to OpenAI Codex CLI and the Codex IDE extension.\",\"url\":\"https://docs.mcpcore.io/connect/codex\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mcpcore.io/connect/codex#webpage\"},\"dateModified\":\"2026-10-29T19:47:40.568Z\",\"publisher\":{\"@id\":\"https://docs.mcpcore.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mcpcore.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MCPCore\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"MCPCore\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/connect/codex.md","siteName":"MCPCore","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.mcpcore.io"},{"anchor":"Blog","icon":"newspaper","href":"https://mcpcore.io/blog"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","href":"/quickstart"}]},{"group":"MCP Servers","pages":[{"title":"Creating a Server","href":"/servers/create"},{"title":"Server Settings","href":"/servers/settings"},{"title":"Security Overview","href":"/servers/security-overview"},{"group":"Security Modes","pages":[{"title":"Public Mode","href":"/servers/security/public"},{"title":"Unlisted Mode","href":"/servers/security/unlisted"},{"title":"API Key Mode","href":"/servers/security/api-key"},{"title":"OAuth 2.0 Mode","href":"/servers/security/oauth2"},{"title":"Example OAuth Server","href":"/servers/security/oauth-example"},{"title":"Bearer Token Mode","href":"/servers/security/bearer-token"}]},{"group":"Enterprise SSO","pages":[{"title":"Auth0 Setup","href":"/servers/security/sso/auth0"},{"title":"Okta Setup","href":"/servers/security/sso/okta"},{"title":"Keycloak Setup","href":"/servers/security/sso/keycloak"},{"title":"Azure AD / Entra ID Setup","href":"/servers/security/sso/azure-entra"}]}]},{"group":"Tools","pages":[{"title":"Creating a Tool","href":"/tools/create"},{"title":"Code Editor","href":"/tools/editor"},{"title":"Import from OpenAPI","href":"/tools/import-openapi"},{"group":"Workflow Builder","pages":[{"title":"Workflow Builder","href":"/tools/workflows/overview"},{"title":"Generate with AI","href":"/tools/workflows/generate-with-ai"},{"title":"Workflow Steps","href":"/tools/workflows/nodes"},{"title":"Variables","href":"/tools/workflows/expressions"},{"title":"Testing Workflows","href":"/tools/workflows/testing"},{"title":"Workflow Templates","href":"/tools/workflows/templates"}]},{"title":"Version history","href":"/tools/versions"},{"title":"Playground","href":"/tools/playground"},{"title":"Tool Runtime","href":"/tools/sandbox"},{"title":"Parameters","href":"/tools/parameters"},{"title":"Secrets","href":"/tools/secrets"},{"title":"Testing Tools","href":"/tools/testing"},{"title":"Code Examples","href":"/tools/examples"}]},{"group":"Observability","pages":[{"title":"Traffic Logs","href":"/observability/traffic-logs"},{"title":"Error Logs","href":"/observability/error-logs"},{"title":"Analytics","href":"/observability/analytics"}]},{"group":"Connect AI Clients","pages":[{"title":"Connecting AI Clients","href":"/connect/overview"},{"title":"ChatGPT","description":"Add your MCPCore server to ChatGPT as a custom MCP server, on a free account, without Developer Mode.","href":"/connect/chatgpt"},{"title":"Codex","href":"/connect/codex"},{"title":"Claude Desktop","description":"Connect your MCPCore server to Claude Desktop using the mcp-remote bridge.","href":"/connect/claude-desktop"},{"title":"Claude Code","href":"/connect/claude-code"},{"title":"Cursor","href":"/connect/cursor"},{"title":"VS Code","href":"/connect/vscode"},{"title":"Gemini CLI","href":"/connect/gemini-cli"},{"title":"Windsurf","href":"/connect/windsurf"},{"title":"Cline","href":"/connect/cline"}]}]}]},"basePath":"","title":"Codex - MCPCore","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":[],"chunks":[]}