Skip to main content

Connect the OpenAI Codex CLI

The Codex CLI can work on your SitePack site through the same connector. It uses the Model Context Protocol (MCP), so once it is connected you can ask Codex in the terminal to read or change your site's content, exactly like the Claude connector, on the one site you approve.

There are two ways to connect: with a browser sign-in, or with a token.

For developers

This page assumes you are comfortable editing ~/.codex/config.toml and running npx. If you just want to use an AI assistant on your site, the Claude desktop app is the simplest option.

Add the connector to ~/.codex/config.toml using the mcp-remote bridge, which runs the SitePack sign-in and consent screen in your browser the first time and remembers it afterwards:

# ~/.codex/config.toml
[mcp_servers.sitepack]
command = "npx"
args = ["-y", "mcp-remote@latest", "https://admin.sitepack.eu/api/mcp"]

Start Codex. The first time it connects, a browser tab opens with the SitePack sign-in and the permission screen where you pick your site and approve. After that, the SitePack tools are available in Codex.

With a token (no browser step)

If you would rather not use the browser flow, ask your SitePack contact for a personal access token. It is tied to one site and to the same permissions, and can be revoked at any time. Pass it as a header:

# ~/.codex/config.toml
[mcp_servers.sitepack]
command = "npx"
args = ["-y", "mcp-remote@latest", "https://admin.sitepack.eu/api/mcp",
"--header", "Authorization: Bearer YOUR_TOKEN"]

On a Codex build with native remote-MCP support you can point it straight at the URL with an auth header instead (check that your Codex version supports remote servers and custom headers):

[mcp_servers.sitepack]
url = "https://admin.sitepack.eu/api/mcp"
http_headers = { Authorization = "Bearer YOUR_TOKEN" }
Keep the token safe

A personal access token is a password: keep it out of shared config and version control. If it leaks, ask for it to be revoked and issue a new one.

What you can do

The same tools as the Claude connector: pages, menus, media, products, categories, tags and translations, on the one site the connection is bound to. See Connect Claude for the full list.

Frequently asked questions

Does Codex get access to my whole account?

No. Like every SitePack connection, it is bound to one site and to the permissions you approve.

How do I disconnect?

Remove the [mcp_servers.sitepack] block from ~/.codex/config.toml. If you used a token, ask your SitePack contact to revoke it as well.