1. Prepare a local Codex client
Install PhoneMCP on Android and start its server. On your computer, use Codex CLI or a local desktop or IDE client with MCP configuration, plus Node.js and npx.
PhoneMCP exposes an SSE endpoint. This guide connects it to Codex's stdio support using the open-source mcp-remote bridge. The bridge runs on your computer and handles PhoneMCP pairing. The commands use version 0.15.2.
This setup requires a local process. It does not configure a hosted Codex cloud task. Check that node --version and npx --version work in the environment that runs your client.
2. Add your phone to Codex CLI
Switch on Remote access in PhoneMCP and keep its 8-character pairing code ready. Remote access includes a 30-day trial, then a subscription. See pricing.
First run the bridge in a terminal so the initial download and browser pairing can finish before Codex starts:
npx -y mcp-remote@0.15.2 https://phonemcp.ai/sse --transport sse-only
Enter your phone's pairing code on the PhoneMCP authorization page. Once the bridge reports a connection, stop it with Ctrl+C. It saves the authorization locally. Then add it to Codex:
codex mcp add phone -- npx -y mcp-remote@0.15.2 https://phonemcp.ai/sse --transport sse-only
Start a new Codex session, keeping the phone online. The bridge reuses the saved pairing.
In Codex CLI, run /mcp to inspect the active connection. codex mcp list shows the saved configuration. Authentication happens in the bridge's browser flow; this stdio configuration does not use codex mcp login phone.
Desktop or IDE: use the same configuration
If you used the CLI command on the same Codex host, the configuration is shared. Otherwise, merge this entry into ~/.codex/config.toml, preserving your existing settings:
[mcp_servers.phone]
command = "npx"
args = ["-y", "mcp-remote@0.15.2", "https://phonemcp.ai/sse", "--transport", "sse-only"]
startup_timeout_sec = 120
Restart your local client and complete the browser pairing when the bridge starts. If startup times out during the first download or pairing, finish authentication and restart the client.
Or connect over local Wi-Fi
Local access is free. Keep the computer on a trusted network that can reach the phone. Replace the remote configuration with the following entry, using the address, port and access token shown in PhoneMCP:
[mcp_servers.phone]
command = "npx"
args = ["-y", "mcp-remote@0.15.2", "http://<phone-ip>:3001/sse", "--transport", "sse-only", "--allow-http", "--header", "Authorization:${PHONE_MCP_AUTH}"]
startup_timeout_sec = 120
[mcp_servers.phone.env]
PHONE_MCP_AUTH = "Bearer <token>"
Replace both placeholders. Keep this credential in your private user configuration and out of shared repositories. The bridge expands the header variable so the token is not placed directly in its command arguments.
Local HTTP is unencrypted. The --allow-http flag permits it for this connection; use Remote access for an HTTPS endpoint across networks. No pairing code is needed for the local token connection.
3. Ask Codex for a real reading
Enable Sensors in PhoneMCP, then start a new Codex session to refresh the available tools. Ask:
Use phone_sensor. List the sensors available on my phone and explain one reading. Do not invent missing readings.
Review the tool request. A successful result should contain data from the phone. Sensor availability varies by device; move the phone and compare another reading.
Once connected, enable Files or Camera when a task needs them and review Android's permission requests. Try another phone task. Your connected AI service processes the data you request.
If the connection does not start
npx is missing or cannot be started
Install Node.js with npx on the computer running Codex. Restart the desktop client after installation so it gets the updated command path. Check that npx --version works there.
I added the SSE URL directly and it failed
Use the stdio bridge configuration above. Codex's URL configuration is for Streamable HTTP; the PhoneMCP endpoint in this guide uses SSE.
Pairing takes longer than startup allows
Use the configuration with startup_timeout_sec = 120. Keep a browser available for the bridge's pairing flow. Check that Remote access is on, then restart Codex once pairing finishes.
Connected, but no phone tools appear
Enable Sensors on the phone, confirm its server is running, then start a new Codex session. For remote use, also check that Remote access is online. Pairing does not enable tools automatically.
References and other agents
Client instructions checked on 31 October 2026 against OpenAI's MCP documentation and the mcp-remote instructions.