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.
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/mcpSign 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 kenCheck 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.
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.
| Ask | Ken tool used | What the tool does |
|---|---|---|
| Find VPs of Sales at US software companies with 50 to 200 employees. | search_read | Searches 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_skill | Loads one Ken workflow skill, such as campaign-planning, into the chat. |
| Before I launch, preview who lands in the Series B segment. | segments_read | Previews which contacts land in a campaign segment. |
| How many emails a day can this campaign send with the inboxes it has? | campaign_flow_read | Estimates 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_read | Reads campaign performance, engagement, deliverability and reply classifications. |
| Pause the fintech campaign while I rewrite step 2. | campaigns_write | Creates, 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.
| Problem | Fix |
|---|---|
| Ken's tools stop working after a while | Sign in again: run codex mcp logout ken, then codex mcp login ken. |
| codex mcp login cannot finish on a remote machine | The 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 out | Codex 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.
Related
- Ken MCP server
What Ken's MCP server does and every client it works with
- Claude MCP: Connect Ken as a Custom Connector
- ChatGPT MCP: Connect Ken as a Custom MCP Server
- Claude Code MCP: Connect Ken
- Cursor MCP: Connect Ken
- Gemini CLI MCP: Connect Ken
- Connect Ken to Perplexity with MCP
- Connect Ken to VS Code and GitHub Copilot with MCP
- Connect Ken to Claude Desktop with MCP
- Ken pricing
Plans and credit prices
Sources
| Source | Checked |
|---|---|
| OpenAI docs: MCP in Codex (CLI) | |
| OpenAI docs: MCP in Codex (app) | |
| OpenAI docs: Codex developer commands |
Changelog
- Page published.