Skip to navigation
RecipesMCPCoding

Codex with Markup AI MCP

Coding

Overview

Connect the OpenAI Codex CLI to the hosted Markup AI MCP server at https://api.markup.ai/mcp/. Add the remote server to your Codex config and authenticate with either an interactive login or an API key.

You’ll need a Markup AI account to continue. Sign up at https://console.markup.ai/signup.

Codex adds remote MCP servers through its config.toml file (~/.codex/config.toml), not a codex mcp add command. Edit the file directly—or open it from the Codex IDE extension via the gear menu → MCP settings → Open config.toml.

Add the Markup AI MCP Server to Codex

Log in with OAuth
1

Add the server

Add the Markup AI server to ~/.codex/config.toml:

[mcp_servers.markup-ai]
url = "https://api.markup.ai/mcp/"
2

Authenticate

Run the OAuth login for the server and follow the browser prompt to log in to your Markup AI account:

codex mcp login markup-ai
1

Get your API key

  1. Visit https://console.markup.ai/signup and create an account.
  2. Copy your API key from the console.

Store your key securely. Prefer environment variables or a secrets manager over committing keys to code.

2

Export your key

Set an environment variable that holds your API key:

export MARKUP_AI_API_KEY="YOUR_API_KEY"
3

Add the server with a bearer token

Point Codex at the environment variable in ~/.codex/config.toml. Codex reads the variable and sends it as an Authorization: Bearer header:

[mcp_servers.markup-ai]
url = "https://api.markup.ai/mcp/"
bearer_token_env_var = "MARKUP_AI_API_KEY"

Use either OAuth or an API-key token—not both. If you set bearer_token_env_var and the server rejects it, Codex reports a failure rather than falling back to OAuth.

Test Your Setup

Start a Codex session and try:

  • “Check this announcement for brand-voice drift: [paste text]”
  • “Flag any hard-to-read sentences in this doc and rewrite them: [paste text]”
  • “List the available Markup AI agents.”

Troubleshooting

  • Confirm the server URL is https://api.markup.ai/mcp/.
  • If using an API key, make sure the environment variable named in bearer_token_env_var is exported in the shell where Codex runs.
  • Restart Codex after editing config.toml so it reloads MCP servers.
  • If a remote (url) server or codex mcp login isn’t picked up, update Codex to the latest version—older builds only spoke stdio and need the Rust MCP client enabled with experimental_use_rmcp_client = true at the top level of config.toml.
  • codex mcp add configures stdio (command-based) servers only; add remote HTTP servers by editing config.toml as shown above.