SDKs and platforms

How do I use Offline Protocol in ChatGPT and Codex?

Install the Offline Protocol plugin from the ChatGPT plugin directory, which ChatGPT and Codex share. For Codex working in your repository, add the local MCP server with codex mcp add offline-protocol -- npx -y @offline-protocol/cli@0.2.9 mcp serve; it needs no account. The assistant can then plan your app's architecture, pick compatible packages, follow the integration guide and, through the local server, scaffold a starter project.

TL;DR

Install the Offline Protocol plugin from the directory that ChatGPT and Codex share to plan an app and pick packages in a chat. Add the local MCP server to Codex with one command, and Codex gets 18 tools, including three that scaffold and configure your project. You then run the app on your devices.

Learning objectives

After reading this article you will be able to:

  • Install the Offline Protocol plugin in ChatGPT or Codex
  • Add the local or hosted Offline Protocol MCP server to Codex
  • Know what ChatGPT and Codex can build with the tools and the next steps on your devices

Offline Protocol plugin for ChatGPT and Codex

With the Offline Protocol plugin installed, you can ask ChatGPT or Codex to plan an app built on Offline Protocol, choose compatible packages and walk through the integration guide for your workflow. The plugin is listed in the plugin directory at chatgpt.com/plugins, and the Start building section of the Offline Protocol homepage links to it.

OpenAI’s documentation describes the install steps:

  1. Open the plugin’s details in the directory.
  2. Select the plus button to install it.
  3. If the plugin asks to connect its MCP server, connect it when prompted.
  4. Start a new chat and ask ChatGPT or Codex to use the plugin.

OpenAI describes a plugin as a package that can bundle an MCP connection with skills, which are reusable instructions. ChatGPT and Codex share one plugin catalog, so the same plugin is discoverable from both. Plugins work in Chat and Work in ChatGPT on the web, desktop and mobile, and in Codex in the ChatGPT desktop app. In Codex CLI, /plugins opens the plugin browser; start a new session after installing.

In ChatGPT on the web, plugin tools run on a remote MCP server, according to OpenAI. That suits the planning side of the work. When you want Codex to write files into your repository, add the local server described next; the docs keep the file-writing tools in local mode.

Codex local MCP server setup

Codex takes the local MCP server with one command, run once:

codex mcp add offline-protocol -- npx -y @offline-protocol/cli@0.2.9 mcp serve

Or add this to ~/.codex/config.toml:

[mcp_servers.offline-protocol]
command = "npx"
args = ["-y", "@offline-protocol/cli@0.2.9", "mcp", "serve"]

The server runs on your machine and talks to Codex over standard input and output. It needs Node.js 18 or later and no login or API key. The first launch downloads that CLI release from npm, and later launches use the npm cache.

OpenAI’s documentation adds three details that help here. The ChatGPT desktop app, Codex CLI and the IDE extension share this configuration, so you set it up once. codex mcp list shows the configured servers, and /mcp in the Codex terminal UI shows the active ones. A project-scoped .codex/config.toml also works, in trusted projects only.

Hosted Offline Protocol MCP in Codex

Codex can also use the hosted endpoint, which runs without a local install and offers the 15 read-only tools; scaffolding runs in local mode. It takes an app API key, created in the developer portal, and the matching App ID. Organization keys are rejected. In ~/.codex/config.toml, with OFFLINE_API_KEY set in the environment used to start Codex:

[mcp_servers.offline-protocol]
url = "https://mcp.offlineprotocol.com/mcp"
bearer_token_env_var = "OFFLINE_API_KEY"
http_headers = { "x-app-id" = "app_your_application_id" }

Configure one mode under the offline-protocol name, not both.

Offline Protocol tools in ChatGPT and Codex

Connected to the local server, Codex can plan the architecture of an app, pick compatible packages, read the integration guide for a workflow and scaffold a starter project. The local server provides 18 tools for packages, capabilities, workflows, examples, skills, templates, planning and scaffolding.

ChatGPT pluginCodex, local MCPCodex, hosted MCP
InstallPlugin directorycodex mcp add or config.tomlconfig.toml
Where the tools runA remote MCP serverYour machineOffline Protocol hosted service
Plan, choose packages, read guidesYesYesYes
Scaffold files in your repositoryUse Codex with local MCPYesUse local MCP

The planning and lookup tools include generate_architecture, resolve_packages, get_skill, get_workflow and preview_scaffold. The three scaffolding tools, scaffold_project, integrate_packages and init_project, write files and run package-manager commands with your permissions. Codex lets you set a server’s default_tools_approval_mode, and OpenAI’s documentation says its writes value prompts for tools that aren’t marked read-only.

The ready workflows local-handoff, backend-delivery and nearby-service each scaffold a React Native app. If you are still choosing a package for another platform, Which Offline Protocol SDK should I use? compares them.

A first Offline Protocol request in ChatGPT or Codex

A concrete request gets a concrete plan. The Offline Protocol docs suggest a first request like this:

Add an encrypted local handoff to this React Native app. Explain the device requirements, choose compatible packages, and show how the receiving app will persist the handoff.

Add your repository, target device models and OS, installed SDK version and intended workflow. The live agent setup prompt is the canonical setup instruction; give Codex its URL rather than a copied version.

Next steps after Codex scaffolds the app

Once Codex has planned and scaffolded the integration, the next steps happen on your machine and your devices:

  • Test on the target devices. The docs ask you to compile the changed application and test on the devices, where radio delivery is confirmed.
  • Review the generated changes with the rest of your code before you commit them.
  • Keep keys in the environment. Local mode needs none, and the hosted configuration reads the key from OFFLINE_API_KEY.

The same server works in Claude, Cursor and VS Code. For how its local, hosted and public modes differ, read What is the Offline Protocol MCP server?

Frequently asked questions

Is the ChatGPT plugin the same one Codex uses?

Yes. OpenAI's documentation says ChatGPT and Codex use one universal plugin directory, so the same public plugins are discoverable from both. Codex in the ChatGPT desktop app and Codex CLI can browse and install them.

Do I need an Offline Protocol account for Codex?

No. The local MCP server needs no login or API key. Only the keyed hosted endpoint takes an app API key and the matching App ID.

How do I use Offline Protocol in the Codex IDE extension?

Add the MCP server to Codex's config.toml. OpenAI's documentation says the ChatGPT desktop app, Codex CLI and the IDE extension share that configuration, so one setup covers all three. Plugins are installed from the desktop app or Codex CLI.

Which setup writes the starter project into my repository?

Codex with the local MCP server. Its scaffold_project, integrate_packages and init_project tools write files and run package-manager commands on your machine, after you approve them.

Where does messaging between devices happen?

In your app, through the Offline Protocol mesh SDK. ChatGPT and Codex use the MCP tools to plan and build that integration, and you run the app on your phones to see messages move.

Sources

Build it with Offline Protocol

The coding agents page has the Codex configuration for local and hosted mode, and a first request to try once the server is connected.

Read use Offline Protocol from your coding agent