# Codex CMS integration: draft and publish with MCP

Published: 2026-11-02 | Updated: 2026-11-02 | URL: https://blog.genko.me/en/codex-mcp-cms

> Connect Codex to a CMS over MCP. Use genko.me to configure TOML, sign in with OAuth, save a draft, review changes, and publish after human approval.

To create and publish CMS articles from Codex, configure an MCP server and sign in with OAuth. For genko.me, the endpoint is `https://genko.me/mcp`, `create_draft` saves a draft, and `publish_entry` publishes it. Save the draft first, have a person review its content and destination, then request publication.

## Configure the MCP server in Codex

This walkthrough assumes you already have Codex CLI available and belong to the target genko.me workspace. [OpenAI's official MCP documentation](https://learn.chatgpt.com/docs/extend/mcp) documents Streamable HTTP, OAuth, and the user configuration file at `~/.codex/config.toml`. Following the [genko.me MCP documentation](https://docs.genko.me/ai/mcp), add this table to that file without replacing your existing configuration:

```toml
[mcp_servers.genko-me]
url = "https://genko.me/mcp"
```

If a table with that name already exists, edit it. If you previously registered genko.me under `genko.me`, `genko`, or `genko-docs`, remove those older registrations to avoid duplicate connections. The former endpoint at `https://docs.genko.me/mcp` has been retired.

You can also register the server through the CLI. Choose either this command or the manual edit; you do not need both. The genko.me CLI (`npx @genko-me/cli@latest mcp --codex`) can also add the same setting and replaces entries under the older names.

```bash
codex mcp add genko-me --url https://genko.me/mcp
```

This is the MCP endpoint, rather than a content delivery API URL.

## Sign in and test a read operation

Use the OAuth login command documented by OpenAI:

```bash
codex mcp login genko-me
```

Check the account and requested permissions on genko.me's sign-in and consent screen. Reload the connection in Codex, then use `/mcp` in its interactive interface to inspect the tools. Start with: “Search for genko.me API key management using `search_docs`, then fetch the matching page with `get_doc`. Do not change any content.”

If tools are missing, check the configuration location, reload the client, and confirm that the URL ends in `/mcp`. Successfully fetching documentation does not prove that you can edit or publish articles. genko.me requires workspace membership for reading, an editor-or-higher role and `mcp:write` for updates, and additionally `mcp:publish` for publishing or scheduling. If access is denied, check the workspace role and OAuth grants; authenticate again if additional permissions are needed.

## Separate drafting, review, and publication

The following instructions are worked examples. Replace `your-workspace`, API names, and entry IDs with values confirmed in tool responses. Restrictions written into prompts are operating instructions; they do not replace permission controls.

### 1. Confirm the destination and fields

Start with this request:

```text
Use list_workspaces to identify my workspaces and roles.
Run list_apis for your-workspace and show the destination API,
its field definitions, required fields, and language settings.
Use read operations only at this stage.
```

Do not guess an API name or body field ID before saving. `list_apis` returns API and field definitions, workspace languages, and each API's localization settings. To use an existing article as a reference, locate it with `list_entries` and read it with `get_entry`.

### 2. Review the proposed article, then save a draft

First ask Codex to show the title, body, and supporting links in the conversation, and incorporate corrections. Then request a save:

```text
Use the confirmed API and field definitions to save the reviewed
article with create_draft. Do not publish or schedule it.
Show the returned entry ID, retrieve it with get_entry, and report
its saved title, body, language, and publication status.
```

The required arguments for `create_draft` are `workspace`, `api`, and `values`. This minimal argument example assumes a schema that permits saving only a `title`. For an actual article, add the body and required fields according to the discovered field definitions and tool input specification.

```json
{
  "workspace": "your-workspace",
  "api": "blog",
  "values": { "title": "Example article title" }
}
```

Use `create_draft` for a new article and `update_draft` for revisions. When you use `update_draft` on a published article, the specified fields are saved as unpublished changes. The site and normal delivery API continue serving the published content. This behavior is documented in the [genko.me MCP specification](https://docs.genko.me/ai/mcp).

### 3. Have a person review the diff

For a published article with pending edits, `get_entry` returns `hasPendingChanges: true`. Its `values` and `markdown` contain unpublished content; `published.values` and `published.markdown` contain the currently published content. Ask Codex to compare these pairs. A new article has no published version, so compare the saved values against the reviewed proposal instead.

| Area | What a reviewer should check |
| --- | --- |
| Destination | The workspace, API, entry ID, and language are correct |
| Body | Numbers, product claims, sources, and removed paragraphs are accurate |
| Presentation | Headings, link destinations, code, images, and alternative text are appropriate |
| Other fields | Titles, references, categories, and other fields have no unintended edits |
| Publication scope | Whether this creates a new publication or replaces an existing article |

Also inspect the CMS editor and the site's preview. Read the saved content and fields rather than relying only on the agent's summary. If someone edits the article after review, retrieve it again before publishing and compare it with the approved content.

### 4. Publish only the approved entry

After reviewing the destination and changes, issue a separate instruction:

```text
Restate the reviewed workspace, API, entry ID, and target language.
Fetch the entry with get_entry and confirm that its content still
matches what I approved. Only if it matches, publish that entry
with publish_entry. Do not publish, schedule, or delete other entries.
```

`publish_entry` immediately publishes a draft or scheduled version, or publishes the pending changes of an already published version. Distinguish immediate publication from scheduling. Afterward, check both the state returned by `get_entry` and the actual site. A successful CMS publication and correct website rendering are separate checks.

To abandon pending changes on a published article, use `discard_changes`. This discards unpublished edits; it is a different operation from restoring an older published version. For a localized API, inspect its languages with `list_apis` and pass `lang` to the relevant tools. Omitting it targets the main language, so include the language in the publication approval.

## Can other MCP clients, including Claude, use it?

The genko.me server is not exclusive to Codex. Other Streamable HTTP MCP clients with OAuth support can connect to the same URL. Configuration files and keys differ between clients, so do not copy Codex's TOML into another client's configuration unchanged.

For Claude setup, see [using Claude to work with a CMS over MCP](https://blog.genko.me/en/claude-mcp-cms). For implementing CMS integrations from Claude Code and Codex, see [Integrate a Headless CMS with Claude Code or Codex](https://blog.genko.me/en/ai-agent-cms-integration). This walkthrough focuses on Codex configuration and the review before publication.

## Other CMSs with official MCP servers

If your current CMS meets your requirements, you do not need to migrate just to use MCP.

| CMS | Capabilities documented by the vendor | When it fits |
| --- | --- | --- |
| [Contentful](https://www.contentful.com/developers/docs/tools/mcp-server.md) | Read, write, and publish entries; manage content models. The remote server uses OAuth and environment-specific access controls | You want to keep working in existing Contentful spaces and environments |
| [Sanity](https://www.sanity.io/docs/ai/mcp-server) | Execute GROQ queries, create, patch, and publish documents, and explore schemas | Your development workflow already uses Sanity schemas and GROQ |

Contentful's remote server requires its MCP app to be installed in each target space and environment. Sanity defaults to OAuth and also documents API token authentication. Tool names, input formats, and permissions vary, so do not reuse the genko.me arguments for another CMS.

## FAQ

### Can Codex publish CMS articles directly?

It can if the connected MCP server provides a publishing tool and the account has the necessary permissions. genko.me uses `publish_entry`. Request draft saving and publication separately, with human review of the destination and content between them.

### Should I put a genko.me API key in Codex configuration?

This walkthrough uses OAuth. Configure the MCP URL in TOML and complete sign-in; it does not require embedding a delivery API key.

### Does editing a published article immediately change the site?

In genko.me, `update_draft` saves unpublished changes. The published content stays unchanged until `publish_entry` is called. Review the diff against the published version before doing so.

### Can Codex use the MCP server I use with Claude?

For genko.me, both clients can use the same server. The client must support OAuth and Streamable HTTP, and you should follow its own configuration format.
