Codex
OpenAI Codex supports MCP servers in the CLI and IDE extension. Add Iteration Layer as a Streamable HTTP MCP server so Codex can call Document Extraction, Document to Markdown, Website Extraction, Image Transformation, Image Generation, Document Generation, and Sheet Generation tools.
Requirements
- Codex CLI or Codex IDE extension
- An Iteration Layer account
- Browser access for OAuth login
MCP Server Endpoint
https://api.iterationlayer.com/mcp
Add Iteration Layer To Codex
Codex stores MCP configuration in ~/.codex/config.toml. Trusted projects can also use .codex/config.toml.
Add this server entry:
[mcp_servers.iterationlayer]
url = "https://api.iterationlayer.com/mcp"
enabled = true
tool_timeout_sec = 180Then authenticate the MCP server:
codex mcp login iterationlayerCodex uses a browser OAuth flow. Iteration Layer MCP uses OAuth 2.1, not static bearer tokens.
Project-Scoped Setup
For a project-specific setup, add the same entry to .codex/config.toml in a trusted project:
[mcp_servers.iterationlayer]
url = "https://api.iterationlayer.com/mcp"
enabled = true
tool_timeout_sec = 180Use project-scoped config only when every developer on the project should see the same MCP server.
Verify The Connection
List configured servers:
codex mcp listThen ask Codex:
Which Iteration Layer MCP tools can you use?
You should see tools such as extract_document, convert_document_to_markdown, generate_document, and generate_sheet.
Optional Tool Filtering
Codex supports tool allow lists. For a document-only workflow, you can expose a narrower toolset:
[mcp_servers.iterationlayer]
url = "https://api.iterationlayer.com/mcp"
enabled = true
enabled_tools = [
"convert_document_to_markdown",
"extract_document",
"generate_document",
"generate_sheet"
]First Workflow
Try this with sample files in your project:
Use Iteration Layer to inspect this document packet, extract the fields needed for our import job, and propose the production API requests we should add to the codebase.
Codex can use MCP to explore the workflow and then edit the code that calls the REST API or SDK.
Troubleshooting
OAuth callback fails
If your environment requires a fixed callback URL or port, configure Codex’s MCP OAuth callback settings in config.toml.
Tools time out
Increase tool_timeout_sec for document conversion, extraction, and generation workflows.
Project config is ignored
Codex loads project-scoped .codex/config.toml only for trusted projects. Trust the project or use ~/.codex/config.toml.