MCP clients

Codex MCP: Connect Ken to OpenAI Codex

Codex connects to Ken's remote MCP server over Streamable HTTP. Run codex mcp add ken --url with Ken's server URL, then codex mcp login ken to sign in. The Codex CLI, IDE extension and ChatGPT desktop app share this setup.

How Do You Connect Ken to Codex?

In short Add https://mcp.ken.so/mcp as a remote MCP server in Codex, then sign in to Ken in your browser.

  1. Add Ken as a Streamable HTTP Server

    Run this in your terminal. It writes Ken to ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app all read.

    codex mcp add ken --url https://mcp.ken.so/mcp
  2. Sign In to Ken

    Run codex mcp login ken. Your browser opens the Ken sign-in. Sign in with the account you use in the Ken app, then select Allow access on the Ken approval screen. You never paste a client ID or secret.

    codex mcp login ken
  3. Check the Connection

    Run codex mcp list, or type /mcp inside Codex, to see Ken among your active MCP servers.

    codex mcp list

Can You Use a Ken API Key Instead of OAuth?

In short Yes. Codex can send your Ken API key as a Bearer token when a browser sign-in is not an option.

  1. Use a Ken API Key as a Bearer Token

    Create a key in the Ken app under Settings > Integrations > API Keys and export it as KEN_API_KEY in the shell that starts Codex. Codex sends it as a Bearer token in the Authorization header, and the key stays out of config.toml.

    [mcp_servers.ken]
    url = "https://mcp.ken.so/mcp"
    bearer_token_env_var = "KEN_API_KEY"

What Can You Ask Ken From Codex?

In short Ask in plain language. The client picks the Ken tool, and Ken runs it with your workspace role.

Example requests in Codex and the Ken MCP tool that answers each one
AskKen tool usedWhat the tool does
Find VPs of Sales at US software companies with 50 to 200 employees.search_readSearches Ken's people and company database and returns filter facets.
Load Ken's campaign-planning skill and plan a 3-step cold email campaign for that list.load_skillLoads one Ken workflow skill, such as campaign-planning, into the chat.
Before I launch, preview who lands in the Series B segment.segments_readPreviews which contacts land in a campaign segment.
How many emails a day can this campaign send with the inboxes it has?campaign_flow_readEstimates how many emails a campaign can send with its inboxes.
How did my campaigns do this week? Show sends, replies and bounces for each one.analytics_readReads campaign performance, engagement, deliverability and reply classifications.
Pause the fintech campaign while I rewrite step 2.campaigns_writeCreates, updates, launches, pauses and resumes campaigns.

Admins and members get read and write tools. View-only members get read tools plus inbox replies.

What If Ken Does Not Connect in Codex?

In short Most failures come from a skipped sign-in step or a client setting.

Common Codex connection problems and fixes
ProblemFix
Ken's tools stop working after a whileSign in again: run codex mcp logout ken, then codex mcp login ken.
codex mcp login cannot finish on a remote machineThe login listens for a browser callback on your machine. On a devbox, set mcp_oauth_callback_port or mcp_oauth_callback_url in config.toml, or use the API key setup instead.
A long Ken call times outCodex waits 60 seconds per tool call by default. Raise tool_timeout_sec under [mcp_servers.ken] in config.toml.
A Ken tool answers "Missing scope"Part of the Ken approval screen was declined. Remove Ken from the client, add it again and select Allow access.

Frequently Asked Questions

Do I need a feature flag for remote MCP servers in Codex?

No. OpenAI's current Codex docs cover Streamable HTTP servers and OAuth login without any experimental flag.

Does the Codex IDE extension need its own setup?

No. The ChatGPT desktop app, Codex CLI and IDE extension share the same config.toml, so adding Ken once covers all three.

Can Codex ask before Ken changes something?

Yes. Set default_tools_approval_mode to writes under [mcp_servers.ken] and Codex prompts before any tool that is not marked read-only.

Which Ken workspace does Codex use?

With one workspace, Ken picks it for you. If you belong to several, say which workspace you mean in your request. Ken rejects calls to workspaces you are not a member of.

The new Ken opens to the waiting list in batches.

Sources

Every source, with the date we checked it
SourceChecked
OpenAI docs: MCP in Codex (CLI)
OpenAI docs: MCP in Codex (app)
OpenAI docs: Codex developer commands

Changelog

  1. Page published.