OpenAI Codex CLI + Inliner.ai MCP Integration - Hosted AI Images | Inliner.ai

OpenAI Codex CLI + Inliner.ai

Connect OpenAI Codex CLI to Inliner projects, smart hosted image URLs, local image files, and AI editing workflows through the Inliner MCP server.

OpenAI Codex terminal with dark theme and green accents in developer workspace

Last updated: June 10, 2026

Prerequisites

Quick Setup

Step 1: Get Your API Key

  1. Log into your Inliner.ai dashboard
  2. Go to Account > API Keys
  3. Click Create API Key and copy the key

Step 2: Configure MCP Server

Add the Inliner MCP 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.

Tip: Set INLINER_DEFAULT_PROJECT when you want Codex to use the same Inliner project namespace by default.

What Inliner Adds to Codex

Codex can use the Inliner MCP server to work with production-ready, hosted image assets:

Example Interactions

"Add a 1200x630 hero image to this landing page using my acme-corp Inliner project"

I'll create a hosted Inliner URL and add the image tag to your page...

<img src="https://img.inliner.ai/acme-corp/modern-saas-team-dashboard_1200x630.png" alt="Modern SaaS team dashboard" width="1200" height="630" loading="lazy">

"Create a project called launch-assets and make it my default for this workflow"

I'll reserve that namespace and use it for new generated assets...

"Edit ./photo.png to remove the background and make it transparent"

I'll upload the image, remove the background, and save the result...

Done! Saved to ./photo-edited.png

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.

Resources

Ready to Add Inliner Images to Codex CLI?

Get your API key and start creating hosted image assets in minutes