Codex
Codex CLI and the IDE extension can launch a local stdio MCP server. Complete Installation and configuration and run Codex on the Runtime computer. Processes in remote development environments cannot automatically access your computer's scanner.
Add through the CLI
For account authorization, run czur-open auth login first, then add the server:
codex mcp add czur-open -- npx -y @czur/open-mcp@latest
codex mcp list
codex mcp get czur-openThis writes MCP configuration without scanning. Remove it with codex mcp remove czur-open, after finishing any active scans or tasks.
Configure with TOML
Alternatively, add the following to ~/.codex/config.toml. If you already added the server with the CLI, edit that same entry instead of defining it twice:
[mcp_servers.czur-open]
command = "npx"
args = ["-y", "@czur/open-mcp@latest"]
startup_timeout_sec = 60
tool_timeout_sec = 300These are Codex client timeouts in seconds. Allow more startup time if npm must fetch the package, or more tool time for complex captures. They are separate from Runtime request timeouts and do not make an OCR long task wait for completion within a single call.
For an API Key, append:
[mcp_servers.czur-open.env]
CZUR_OPEN_API_KEY = "REPLACE_WITH_YOUR_API_KEY"Here is the complete TOML configuration with an API Key. sk-sq-v1-xxxxxxxxxxxxxxxxxxxxxxxxxx is a fictitious placeholder; replace it with your own Key. This combines the server and environment settings above. Update the existing czur-open configuration rather than appending duplicate tables, and preserve other servers.
[mcp_servers.czur-open]
command = "npx"
args = ["-y", "@czur/open-mcp@latest"]
startup_timeout_sec = 60
tool_timeout_sec = 300
[mcp_servers.czur-open.env]
CZUR_OPEN_API_KEY = "sk-sq-v1-xxxxxxxxxxxxxxxxxxxxxxxxxx"Obtain a Key from the CZUR User Center, replace the placeholder, and protect the file. A nonempty Key takes precedence over account authorization without fallback on failure. To avoid storing a Key in the file, set it in the environment used to start Codex and explicitly forward it with env_vars = ["CZUR_OPEN_API_KEY"] in the server table. Remove any old static Key rather than configuring both.
To choose an output directory, add CZUR_OPEN_MCP_IMAGE_DIR to the same [mcp_servers.czur-open.env] table. Define each TOML table only once. Do not commit personal Keys in project-scoped .codex/config.toml files for trusted projects.
IDE extension and first use
Open MCP servers in the IDE extension settings to add a STDIO server with npx and arguments -y, @czur/open-mcp@latest, or use the configuration file above. Clients on the same Codex host can share MCP configuration. Restart the relevant session or extension after changes.
Use /mcp in Codex CLI to inspect the connection, then ask:
Please use CZUR MCP to scan a single-page document, save it as a JPG image, and analyze its contents.
Finish scanning with scan.finish. OCR document export returns a handle; query ocr.get rather than resubmitting. Use returned local paths to retrieve images and files. See Long-running tasks and result files.
Check connection and permissions
If tools do not load, check executable paths, configuration syntax, and client logs. Offline deployments should use a preinstalled czur-open-mcp with args = [], rather than relying on an initial npx download. Client permissions or organizational policy may restrict local processes and tool calls. Do not disable safety checks to troubleshoot.
Do not put the Runtime WebSocket address in Codex's MCP url; it is not an HTTP MCP service. For ChatGPT entry points, see ChatGPT.
Reference: Official OpenAI MCP documentation.