Codex + Semurai

Codex MCP
for SEO and content.

Set up Semurai as a Codex MCP server once, and the Codex CLI, IDE extension and app can research keywords, read Search Console and pull article drafts into your repository. Made for sites whose content lives in Markdown or MDX. One address, OAuth sign-in, no API keys.

Codex CLI · IDE extension · Codex app

Add Semurai from your terminal

Terminal
codex mcp add semurai --url https://api.semur.ai/mcp
codex mcp login semurai
  • Or add it to ~/.codex/config.toml
  • Sign in to Semurai in the browser and click Allow
  • The IDE extension and the Codex app use the same setup

Setup

How do I set up
the Codex MCP server?

Two commands in your terminal. Codex saves the server in its configuration, which the IDE extension and the Codex app read too.

  1. In your terminal, run the codex mcp add command from the Terminal snippet.

  2. Run codex mcp login semurai. Codex opens a Semurai page in your browser.

  3. Sign in to Semurai, pick a default workspace and click Allow.

  4. Start Codex in your project and ask for something that needs search data. Codex calls the Semurai tools it needs.

Terminal
codex mcp add semurai --url https://api.semur.ai/mcp
codex mcp login semurai
~/.codex/config.toml
[mcp_servers.semurai]
url = "https://api.semur.ai/mcp"

Good to know

  • Prefer a file? Add the TOML block to ~/.codex/config.toml, then run codex mcp login semurai. A trusted project can keep it in .codex/config.toml instead.
  • The Codex CLI, the IDE extension and the Codex app share this configuration, so you add Semurai once.
  • Each connection has a default workspace. Ask Codex to list your workspaces, and it can work in another one.

Use cases

What can Codex do
with Semurai?

Codex for SEO means search data next to your source files: Codex edits the content, Semurai tells it what people search for.

  • SEO for sites built from Markdown

    Your blog lives in Markdown or MDX files, and Codex already edits them. Semurai adds the search data, so a change to a post starts from volume and intent.

  • Titles that earn the click

    Codex finds pages with plenty of impressions and few clicks in Search Console, then rewrites their meta titles and descriptions in the source.

  • A weekly ranking file in the repo

    One codex exec command reads the week’s position changes from your Semurai rank tracker and writes them to a Markdown file in the repository, ready for Monday.

  • Editor drafts, pulled into Git

    An article written and reviewed in Semurai’s SEO editor comes back through get_content as Markdown, ready to save as a new post.

  • Keyword gaps as tasks

    Codex compares your domain with up to five competitors in Semurai and adds the missing topics as tasks on the Semurai board, where your editors pick them up.

  • Keyword research for docs pages

    Help centres and docs get searched too. Codex checks volume and related questions for a topic, then shapes the headings around what people ask.

Example

Search Console data,
fixed in the source.

Codex reads the numbers from Semurai and edits the files behind them.

  1. You:

    Some of our blog pages get impressions but few clicks. Check them in Semurai and fix the titles and descriptions of the weakest ones.

  2. Semurai tool: semurai.search_console_reporttop_pages, last 28 days
  3. Semurai tool: semurai.research_keywords3 title phrases
  4. Assistant:

    Three blog pages with many impressions and few clicks:

    PageImpressionsCTRPosition
    /blog/french-press-guide/12,4000.9%6.2
    /blog/decaf-explained/8,1501.1%7.8
    /blog/grinder-settings/5,3201.4%5.4

    I found their files in content/blog and rewrote each title and description in the front matter around the phrase with the most searches from the keyword check. Shall I run the build?

  5. You:

    Yes, run it.

  6. Assistant:

    Build passed. Three files changed in content/blog, ready for your review before you commit.

Demo project: Morrowfield Coffee Co. (demo data). An example of Codex using two Semurai tools in a site repository.

Prompts to try

Give Codex
a task like these.

  • “Bring our newest Semurai draft about coffee grinders into content/blog as MDX, with the meta title and description in the front matter.”
  • “Find the keyword gap between us and our two saved competitors in Semurai, and add the five best topics as tasks.”
  • “List our tracked keywords in Semurai that have no post in content/blog yet.”
  • “Research keywords for our docs page about brewing ratios and suggest H2s from the questions people ask.”
  • “Add the target keywords of our five newest posts to the Semurai rank tracker.”

CLI, IDE or app

Codex CLI, IDE extension
or the Codex app?

All three read the same MCP configuration. Add Semurai in whichever one you open first.

Where to add the Codex MCP server

Adding the Semurai MCP server in the Codex CLI, IDE extension and app
Codex CLIIDE extensionCodex app
Where you add itcodex mcp add or config.tomlGear menu → MCP servers → Add serverSettings → MCP servers
How you sign incodex mcp login semuraiRestart extension, then AuthenticateRestart, then sign in when Codex asks
Good forTerminal sessions and scripted runs with codex execFixing the content files you have openHanding Codex a task away from the terminal and the editor

In the IDE extension

  1. Open the gear menu and choose MCP servers, then Add server.
  2. Pick Streamable HTTP, enter the name semurai and the URL https://api.semur.ai/mcp, then save.
  3. Click Restart extension, then Authenticate. Sign in to Semurai and click Allow.

In the Codex app

  1. Open Settings → MCP servers.
  2. Add the server the same way: Streamable HTTP, the name semurai and the server address.
  3. Click Restart, sign in to Semurai when Codex asks and click Allow.

Scripts and teams

Codex for SEO
beyond the chat.

Run Semurai reports from a script, give Codex a standing SEO instruction, or pick the coding agent that fits your team.

Scripted reports with codex exec

codex exec runs Codex without the interactive session, so a weekly ranking summary is one command. Codex reads your tracked keywords in Semurai and writes the summary into the repository as Markdown.

Terminal
codex exec "Use Semurai to list our tracked keywords with their weekly change. Write the five biggest moves and a short comment to reports/rankings-weekly.md."

Put the command in a script you run every Monday, and the reports build a history in Git next to your content.

An SEO section for AGENTS.md

Codex follows the project instructions in AGENTS.md. A short section like this one makes keyword research part of its routine:

AGENTS.md
## SEO
Before you write or edit a blog post, check its target keyword in Semurai:
search volume, difficulty and the questions people ask.
Use those questions as headings where they fit.

Codex or Claude Code?

Codex and Claude Code with the Semurai MCP server
CodexClaude Code
Add Semuraicodex mcp addclaude mcp add
Sign incodex mcp login semurai/mcp in Claude Code, or claude mcp login semurai
Configuration~/.codex/config.toml, shared by the CLI, IDE extension and appLocal, project (.mcp.json) or user scope

Both reach the same 62 Semurai tools with the same account. Using Claude Code? See the Claude Code page. For research and plans in a chat, ChatGPT connects too.

FAQ

Codex and Semurai: questions

How do I add an MCP server to Codex?

Run codex mcp add with a name and the server URL. For Semurai: codex mcp add semurai --url https://api.semur.ai/mcp, then codex mcp login semurai to sign in. You can also write the server into config.toml, or add it under MCP servers in the IDE extension or the Codex app.

Where does Codex store MCP servers?

In the config.toml file, as an [mcp_servers.semurai] table with the server url. The CLI, the IDE extension and the Codex app all read it.

Does the Codex MCP setup apply to all my projects?

Yes, when the server is in ~/.codex/config.toml: that file applies to all your projects. A trusted project can also have its own .codex/config.toml, for servers that belong to that repository only.

Does the Codex IDE extension use the same config?

Yes. The Codex CLI, the IDE extension and the Codex app share one MCP configuration, so a server you add in one of them is available in the others.

How does Codex sign in to Semurai?

With OAuth. codex mcp login semurai opens a Semurai page in your browser, where you sign in, pick a default workspace and click Allow. No API key goes into the config file, and the access token renews on its own.

Can Codex write blog posts into my repo with Semurai data?

Yes, in two ways. Codex can research the keyword in Semurai and write the post itself as a Markdown or MDX file. Or Semurai writes the full draft in its SEO editor, and Codex brings it into the repository with get_content, which returns the body as Markdown.

Can Codex create images in Semurai?

It can, through the full server. Add it next to your semurai entry with codex mcp add semurai-full --url https://api.semur.ai/mcp/full and sign in with codex mcp login semurai-full. Since the CLI, the IDE extension and the app share one configuration, all three get the graphics tools: AI images saved to your media library, Canvas and Creative Studio designs, and alt texts, titles and tags for library images. Codex can also answer the designer’s questions, revise a design or go back to an earlier version without leaving your editor or terminal. The full server needs its own approval in Semurai.

Do Semurai tool calls count toward my usage limits?

Yes. Actions Codex runs in Semurai count toward the workspace’s usage limits, exactly as if you ran them in the Semurai app. Codex reading and editing files in your repository does not involve Semurai.

Which Semurai workspace does Codex use?

The default workspace you picked when you clicked Allow. Ask Codex to list your workspaces and it can work in another one, with your role in that workspace.

Connect Codex
in two commands.

Create your Semurai account, run codex mcp add and codex mcp login, and give Codex its first SEO task.

  • Free forever plan
  • No credit card
  • Set up in about 3 minutes