OpenAI Codex CLI + Inliner.ai
Install the Inliner plugin so Codex knows when and how to use Inliner, with MCP tools for hosted generation, editing, projects, and image integration.
Last updated: July 10, 2026
Prerequisites
- OpenAI Codex CLI installed and authenticated (official setup guide)
- An Inliner.ai account (free tier available)
- Node.js 18+ installed
Quick Setup
Recommended: Install the Inliner.ai Plugin
The released plugin bundles the canonical inliner-ai skill and MCP configuration. The skill teaches Codex when to activate Inliner; the MCP server supplies the live tools.
Terminal
codex plugin marketplace add inliner-ai/agent-skill --ref v1.3.0
codex plugin add inliner-ai@inliner-ai
Current releases: @inliner/agent-skill v1.3.0 and @inliner/mcp-server v1.1.1.
Step 1: Get Your API Key
- Log into your Inliner.ai dashboard
- Go to Account > API Keys
- Click Create API Key and copy the key
Export the key before starting Codex so the plugin's bundled MCP server can authenticate:
Terminal
export INLINER_API_KEY=inl_your-api-key-here
Step 2: Configure MCP Server
If you installed the plugin, it already includes this MCP configuration. For an MCP-only installation, add the server with Codex's MCP command:
Terminal
codex mcp add inliner --env INLINER_API_KEY=inl_your-api-key-here -- npx -y @inliner/mcp-server
For manual setup, add the server to your Codex config:
~/.codex/config.toml
[mcp_servers.inliner]
command = "npx"
args = ["-y", "@inliner/mcp-server"]
[mcp_servers.inliner.env]
INLINER_API_KEY = "inl_your-api-key-here"
INLINER_DEFAULT_PROJECT = "your-project-namespace"
Step 3: Verify and Restart Codex CLI
Check that Codex sees the server, then start a new Codex session so the Inliner tools load.
Terminal
codex mcp list
Inside Codex, run /mcp to view active MCP servers and exposed tools.
INLINER_DEFAULT_PROJECT when you want Codex to use the same Inliner project namespace by default.
What Inliner Adds to Codex
The bundled skill makes Codex aware of applicable visual requests, while the MCP server works with production-ready hosted assets:
- generate_image - Generate and host completed assets from full prompts, with optional local output
- edit_image - Edit an Inliner URL or upload a local file, then save the result
- recommend_image_url - Recommend a smart slug and integration snippet without generating an asset
- generate_image_url and create_image - Deprecated compatibility aliases
- get_projects, create_project, and get_project_details - Manage project namespaces and settings
- get_usage and get_current_plan - Check credits and plan capabilities
- list_images and get_image_dimensions - Browse assets and pick dimensions for common use cases
For new production assets, Codex should call generate_image and wait for the completed URL before inserting it into code. Project creation requires explicit user intent.
Example Interactions
Using with @inliner/cli
You can also use the standalone Inliner CLI alongside Codex for batch operations:
Terminal
# Generate images directly from terminal
npx @inliner/cli "hero-banner_1200x600.png" -p myproject
# Pipe through other tools
npx @inliner/cli gen "logo" -p brand --size 512x512 | convert - -resize 64x64 favicon.png
See the CLI documentation for more examples.