- Integrations
- OpenCode
Give OpenCode a real phone number
OpenCode gets a Phonekit number it can read. It can add the missing SMS step to your test suite and run it, whichever model you choose.
Install the skill
npx skills add https://www.phonekit.io --skill phonekit --agent opencode --copyThe skill lands in .agents/skills/phonekit/SKILL.md, which OpenCode reads. Start a new OpenCode session in the repository and ask it to load phonekit. OpenCode offers discovered skills through its skill tool; its skills docs cover discovery and permissions.
Connect
MCP
Merge this entry into the project's opencode.json, keeping its existing settings:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"phonekit": {
"type": "remote",
"url": "https://www.phonekit.io/api/mcp",
"enabled": true
}
}
}opencode mcp auth phonekit
opencode mcp listApprove the workspace, actions and lines in Phonekit's browser flow. OpenCode handles the sign-in for the remote server. See OpenCode's MCP guide and Phonekit's MCP reference.
CLI
The CLI needs terminal access and Node.js 20.3 or newer.
npx phonekit@latest docs agents
npx phonekit@latest login --wait 50
npx phonekit@latest number listApprove the workspace and the numbers it may read in your browser. 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
Load the phonekit skill and read our Supabase Auth setup. Add a test that marks the assigned number, calls signInWithOtp through our configured environment, waits up to 120 seconds for the new code with the Phonekit SDK, then calls verifyOtp. Assert the signed-in user and session. Reuse our existing test-account setup, run the test and report the result without tokens or codes.
What done looks like
The sign-in request, the SDK receiving step, a verifyOtp assertion and a passing run. For browser coverage, add your app's final page assertion too.
The Supabase guide has the provider calls. Give each parallel run its own number, as one number per test explains.
Permissions
Allow OpenCode to load the Phonekit skill and run the commands the task needs under its tool policy. That permission covers OpenCode only; which numbers it can read is still decided when you approve the Phonekit connection.
Questions
Why doesn't OpenCode list the skill?
Check that the file is at .agents/skills/phonekit/SKILL.md, then check OpenCode's skill permissions. A hidden or denied skill is a discovery problem; a CLI approval failure is a separate one.
Can I use the .opencode directory instead?
OpenCode reads that directory too. Keep one copy so you don't edit duplicates. The installer uses the shared .agents/skills directory.
Does changing models change anything?
No. The CLI, SDK and the numbers a connection can read don't depend on the model. The agent still needs tools to run your tests.
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.
Keep reading
- Connect and name a numberConnect the Phonekit CLI, choose an authorized company number, and wait for a fresh SMS verification code.
- Use the SDK in your testInstall Phonekit's server-side SDK, capture message cursors, wait for OTPs, and handle deadlines and cancellation in JavaScript or TypeScript.
- Write the task for your agentGive Claude Code, Codex, Cursor and OpenCode a real US phone number, including real SIM lines, so they can sign in to your own app, read the code and text your product without asking you.
- Supabase phone sign-in testTest Supabase SMS sign-in end to end with a selected Phonekit number, real receipt, verifyOtp, a session assertion, and explicit test-mode boundaries.