How to set up an SMS MCP server to receive SMS in Codex

This guide walks you through retrieving incoming SMS messages in Codex using the Ozeki SMS MCP server. By following this tutorial, you will learn how to verify the MCP server connection, instruct the AI agent to list incoming messages in plain language, and confirm the transaction through the gateway logs.

What is an MCP tool call?

An MCP (Model Context Protocol) tool call is how an AI model communicates with external systems. When the AI needs to retrieve data such as incoming SMS messages, it sends a structured request to the appropriate MCP server, which processes it and returns the result back to the model.

Overview
Overview

Example prompt

List all incoming SMS messages.

Steps to follow

We assume Ozeki SMS Gateway is already installed on your system, you have created an MCP user account with an API key, and you have already configured the Ozeki SMS MCP server in Codex.

  1. Verify the MCP server connection
  2. Use the list incoming messages tool
  3. View the transaction in logs

Video tutorial

The following video shows how to retrieve incoming SMS messages in Codex using the Ozeki SMS MCP server step-by-step.

Step 1 - Verify the MCP server connection

Before retrieving messages, run the /mcp command in Codex to confirm that the Ozeki MCP server is listed and its status shows as connected (Figure 1).

Verify SMS MCP server connection in Codex
Figure 1 - Verify the Ozeki SMS MCP server connection status

Step 2 - Use the list incoming messages tool

In the Codex prompt, type your request in plain language and press Enter. The AI agent will interpret the request and invoke the appropriate MCP tool to retrieve the messages from the gateway inbox (Figure 2).

List all incoming SMS messages.

Instruct the AI agent to list incoming messages in Codex
Figure 2 - Instruct the AI agent to list incoming SMS messages

Codex may ask for your approval before invoking the tool. Review the proposed tool call and confirm to allow the AI agent to proceed (Figure 3).

Approve tool use if prompted in Codex
Figure 3 - Review and approve the tool use request

The result will appear in the Codex terminal, displaying the list of incoming messages. Each entry includes the sender number, message text, and timestamp confirming when it was received (Figure 4).

List incoming messages tool result in Codex
Figure 4 - The incoming messages tool result appears in the Codex terminal

Step 3 - View the transaction in logs

Open Ozeki SMS Gateway in your browser and navigate to the MCP user details page by clicking on the MCP user entry in the Users and applications panel (Figure 5).

Open MCP user details in SMS Gateway
Figure 5 - Open the MCP user details in Ozeki SMS Gateway

In the MCP user event log, you should see an entry for the incoming message retrieval request as well as the response, confirming that the API key authentication, tool call, and data retrieval were all processed correctly by the gateway (Figure 6).

View transaction in event logs
Figure 6 - Verify the transaction in the MCP user event logs

Final thoughts

You have successfully retrieved incoming SMS messages in Codex using the Ozeki SMS MCP server. The AI agent running in Codex can now list incoming messages from your gateway simply by being asked to do so in plain language, making it easy to add SMS inbox access to any Codex workflow.


More information