Skip to main content

Connect the Retently MCP to OpenAI Codex

Written by Alex Bitca

The Retently MCP lets you work with your Retently data directly from OpenAI Codex. Once connected, you can ask Codex to pull responses, build reports, look up customers, and run actions in your account.

This article covers adding the MCP to Codex. If you use Claude instead, see Connect the Retently MCP to Claude Cowork or Connect the Retently MCP to Claude Code. For what you can do once connected, see What the Retently MCP Can Do.

The MCP is still being actively improved. If something is missing or could work better, send us your feedback, ideally with the exact prompt you used, so we can optimize for that use case.


Before You Start

You need to be logged in to the Retently account you want to connect, and it must be accessible in your browser. Codex links to whichever account is active in your browser during the authorization step.

Set your AI access permissions

Before connecting, open your AI Connections page in Retently. Under Customer Personal Identifiable Information Access, you will find two toggles. By default, both are switched off. They control whether the assistant can read personal identifiable information (PII) and whether it can manage personal data.

What each state means:

  • On: Codex can read contact and customer properties, use filters, attribute survey responses to the customers who left them, and perform write actions such as sending surveys, tagging, and assigning.

  • Off (default): Codex can pull aggregate, quantitative data only. It cannot read contact properties, use filters, attribute responses to specific customers, or perform any write actions.

Most of the MCP's most useful capabilities depend on these toggles. Filters, contact properties, customer attribution, and every write action are tied to the PII read and manage settings. With both toggles off, you are limited to anonymous, quantitative data. Unless you specifically need to keep your data anonymous, we recommend enabling both.

If you want to let someone work with quantitative data without exposing PII, consider creating a separate, tightly scoped access token for that purpose instead of leaving the toggles off.

Set these toggles before you connect. The connection captures your access level when you authenticate, so if you change a toggle afterward (for example, you connected with PII access off and now want to switch it on), reconnect and re-authenticate the Retently MCP for the change to take effect.


Step 1: Start a New Codex Session

  1. Open your Codex app.

  2. Start a new conversation or project.

You will run the next command inside the chat of that session.


Step 2: Add the MCP Server

In the Codex chat, run:

codex mcp add retently --url https://mcp.retently.com/mcp

The MCP server URL is https://mcp.retently.com/mcp. The command registers it under the name retently.


Step 3: Authorize in Your Browser

After running the command, Codex normally redirects you to your browser to authorize the connection.

  1. On the authorization screen, select all of the available options to grant the access you set up on the AI Connections page.

  2. Confirm the authorization.

  3. When prompted that it is safe to close the page, close it and return to your Codex session.

Codex then reports that the connection is complete.

If Codex does not redirect you to your browser, authenticate manually by running: `` codex mcp login retently `` This forces Codex to authenticate the Retently MCP server.


Step 4: Restart Your Codex Session

Even after the connection is complete, the Retently tools are not available yet. You have to restart your Codex session by closing and reopening Codex.

This is because a session loads the available MCP tools when it first starts. A server you add mid-session is connected, but its tools are not picked up until the next session starts.

This restart requirement is not specific to Codex. The same applies to Claude Code and Claude Cowork: after adding a new MCP server, restart the session so the new tools load.

After restarting, the Retently tools are available and ready to use.


You Are Connected

Retently is now available in Codex. A good first step is to ask it to list everything it can do:

What can the Retently MCP do? List all the tools and give a short description of each.

From there, ask the kinds of questions you normally ask yourself when looking at your Retently data. See What the Retently MCP Can Do for categories of tools and example prompts.


Related

Did this answer your question?