Skip to content

Give Codex a real phone number

Codex gets a Phonekit number it can read and, with your approval, text from. It can finish your app's sign-in or text your product and check what comes back.

Install the skill

Install for CodexShell
npx skills add https://www.phonekit.io --skill phonekit --agent codex --copy

Run it from the repository Codex works in. The skill lands in .agents/skills, where Codex finds it. In the CLI or IDE, select $phonekit or browse /skills; in the desktop app, pick it from the mention picker. Start a new session if it doesn't appear. Codex's skills guide covers discovery.

Commit the skill if teammates or cloud tasks should get it with the repository. It contains no key.

Connect

MCP

Add and authenticate Phonekit in CodexShell
codex mcp add phonekit --url https://www.phonekit.io/api/mcp
codex mcp login phonekit
codex mcp list

Approve the workspace, actions and lines in Phonekit's browser flow. In a new Codex session, /mcp lists the server and its tools. Codex keeps these credentials separate from the Phonekit CLI login. See Codex's MCP guide and Phonekit's MCP reference.

CLI

The CLI needs Node.js 20.3 or newer.

Connect the Phonekit CLIShell
npx phonekit@latest docs agents
npx phonekit@latest login --wait 50
npx phonekit@latest number list

Open the approval link, check the short code and select the numbers this connection may read. Exit code 8 means approval is still pending; run login again to resume. The skill uses MCP when it's connected and the CLI otherwise. Name the number for your project with the quickstart.

Give it a task

Say your app is a table-booking assistant that answers texts. Codex can text it from one Phonekit line and read the reply.

PromptText your product and check the reply
Use the phonekit skill. Our booking assistant answers texts on its staging number, which we added to Phonekit as an outside number. From our test-agent line, text 'Table for 2, Friday 7pm' to that number, then wait up to 120 seconds for the reply on test-agent. Check that it confirms the booking with the right day, time and party size. Then add this as a test with the Phonekit SDK, run it and report the result.

What done looks like

One text sent, the assistant's reply read on the test line, a test that asserts the booking details and a passing run.

Sending needs its own permission. Browser login is read-only, so for the CLI create a credential with Send texts in workspace Automation settings; for MCP, choose send permission when you approve the connection.

You can text your workspace's own numbers, your teammates' verified phones, anyone who texted your workspace in the last 30 days and up to 5 outside numbers you add. Each number sends up to 10 texts a minute and 100 a day, a workspace up to 200 a day, and a message can be up to 3 SMS segments. The limits keep the lines trusted. Phonekit isn't for bulk or marketing texts.

Cloud tasks and CI

A cloud task doesn't inherit your local approval. Give it its own selected-number key through the environment's secret configuration.

For a test that runs on every push, keep the SDK call in the test runner rather than in a Codex session. The GitHub Actions guide shows the key setup, and one number per test covers running workers side by side.

Questions

Should the Phonekit key go in AGENTS.md?

No. Put the workflow and the number's name in repository context, and supply the key through the environment's secret configuration. The skill file and project aliases contain no credential.

Why does it work locally but fail in a cloud task?

A local approval stays on your machine; cloning the repository does not copy it. Check that the cloud task has Node, network access, your app's URL and its own Phonekit credential.

Can Codex drive the browser too?

Use the browser or test tools in your Codex environment. Phonekit handles the texts; the task still needs a way to use your app and check where it ends up.

Which number type should I use?

Standard, a US local VoIP number, covers most tests of your own app. Use Mobile, a real SIM line on a mobile network, when a service you depend on only texts mobile numbers. No number is accepted by every service.

Get a number.

Tell us what you're testing. We'll set up your workspace.

Get a number