Skip to content

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

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

The 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:

OpenCode remote MCP configurationJSON
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "phonekit": {
      "type": "remote",
      "url": "https://www.phonekit.io/api/mcp",
      "enabled": true
    }
  }
}
Authenticate and confirm the serverShell
opencode mcp auth phonekit
opencode mcp list

Approve 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.

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

Approve 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

PromptAdd a Supabase phone sign-in test
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.

Get a number.

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

Get a number