OpenCode × SMS8

أرسل SMS من OpenCode عبر خادم MCP الخاص بـ SMS8

OpenCode is the open-source AI coding agent from sst — MIT, 160k+ stars, runs locally, picks any model. SMS8 ships an MCP server at mcp.sms8.io. One block in opencode.json and your agent can text, OTP, and receive replies through your own Android phone. No Twilio. No A2P. $29/month flat.

How it works

What happens when your OpenCode agent calls send_sms

Four hops, all under one second on a good connection. No phantom backend — the SIM card in your own pocket is the last hop.

01Agent decidesOpenCode sees a tool named send_sms in the manifest and calls it during reasoning.
02MCP client posts JSON-RPCOpenCode wraps the call in JSON-RPC 2.0 and POSTs it to mcp.sms8.io with your Bearer token.
03SMS8 routes to your phoneThe MCP server picks a paired Android, signs a push, the phone wakes and sends the SMS via its modem.
04Recipient sees your numberتصل الرسالة كرسالة SMS عادية من الرقم الذي يحفظونك تحته. بدون short code، بدون فلتر سبام.
Setup

One config block in opencode.json

التثبيت OpenCode if you do not already have it. Grab an API key from your SMS8 dashboard. Paste this into opencode.json at the root of your project (or ~/.config/opencode/opencode.json for global).

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sms8": {
      "type": "remote",
      "url": "https://mcp.sms8.io",
      "enabled": true,
      "headers": {
        "Authorization": "Bearer YOUR_SMS8_API_KEY"
      }
    }
  }
}

Restart OpenCode. Confirm with opencode mcp list — you should see sms8 with 9 tools.

ما الذي تحصل عليه

Nine tools, one MCP endpoint

Same surface as Claude Code, Cursor and Windsurf. One SMS8 account behind all of them.

send_sms

Send a single SMS through a paired Android. Per-device and per-SIM routing.

send_otp

Generate and dispatch a one-time code. Configurable length, expiry, attempts.

verify_otp

Constant-time compare against the latest OTP for that phone.

wait_for_otp NEW

Block the agent until an OTP-shaped SMS lands on your paired Android. Code is extracted automatically.

get_messages

Fetch recent inbox or sent SMS. Filter by direction or phone.

list_devices

اعرض قائمة هواتف الأندرويد المربوطة. اختر المرسِل عند موازنة الحمل.

get_balance NEW

Quick credit check. Returns remaining SMS, days until renewal, summary.

create_webhook

Register a callback URL for inbound SMS and delivery events. HMAC-signed.

setup_sms8

Handshake. Validates the API key, returns devices, plan and integration context.

أوامر حقيقية

What an OpenCode + SMS8 session looks like

These are the actual prompts users type into OpenCode after wiring up SMS8.

"Wire phone OTP into our signup"

Agent edits the React form, plugs send_otp and verify_otp into the backend, tests against your real number end-to-end.

"Sign me up on this site, paste the OTP"

OpenCode drives the browser via Playwright, fills the form, blocks on wait_for_otp, pastes the code that lands on your real SIM.

"SMS me when CI fails"

يكتب الوكيل GitHub Action، يضيف send_sms، ثم يلتزم بالكود. البنيات الحمراء ترسل لك SMS خلال ثوانٍ.

"Test our STOP keyword end-to-end"

Sends an SMS via send_sms, replies STOP from a test number, calls get_messages to confirm the STOP handler ran.

"What is the SMS bill if I switch from Twilio?"

Agent reads your Twilio CSV, applies $0 per-message and $29/month, returns the delta. Most users see 90%+ savings.

"Stream incoming SMS into my dev server"

Calls create_webhook with your ngrok URL. Every inbound SMS streams to your laptop in real time. No production exposure.

الأسئلة الشائعة

Real questions people search and ask AI assistants

Mined from Google, Reddit and Cursor / Claude Code / OpenCode community prompts.

How do I send SMS from OpenCode?

Add the SMS8 MCP server to opencode.json under the mcp key. Set type to remote, url to https://mcp.sms8.io and a headers.Authorization Bearer line with your SMS8 API key. Restart OpenCode. Your agent now has send_sms, send_otp, verify_otp, wait_for_otp, get_messages, list_devices, get_balance and create_webhook tools. SMS routes through your own paired Android phone.

Is there a free SMS MCP server for AI agents?

SMS8 offers a 5-day free trial with no credit card. After the trial it costs $29/month flat. There is no per-message cost because SMS goes through your own SIM card, not a Twilio number, so the actual SMS portion is whatever your carrier charges (often $0 on an unlimited plan).

What is the best SMS MCP server for vibe coders?

SMS8 MCP works with every MCP-compatible AI coding tool: Claude Code, Cursor, Windsurf and OpenCode. It exposes nine tools through one Bearer-authenticated endpoint at mcp.sms8.io. A single API key works in every tool, so switching editors does not break your SMS integration. The MCP source is MIT-licensed on GitHub.

Can my OpenCode agent wait for an SMS to arrive?

Yes. The wait_for_otp tool blocks the agent until an OTP-shaped SMS lands on your paired Android, then extracts the numeric code automatically. Configurable filters for sender phone, device, SIM slot, body substring and code length. Default timeout 60 seconds, configurable up to 180.

Do I need Twilio to send SMS from an AI agent?

No. SMS8 uses your own Android phone and SIM card as the gateway. No Twilio account, no virtual number rental, no A2P 10DLC registration, no per-segment billing.

How does the SMS8 MCP authenticate requests?

Bearer token over HTTPS. The opencode.json headers.Authorization field carries Bearer YOUR_SMS8_API_KEY. Rotate keys from the API page in the dashboard.

What MCP transport does SMS8 use with OpenCode?

Remote HTTP over JSON-RPC 2.0, MCP revision 2024-11-05. OpenCode calls this transport type: remote in opencode.json. Both streamable-http and SSE responses are supported. There is no local stdio binary to install.

Can OpenCode send SMS to multiple phone numbers in one run?

Yes. Call send_sms once per recipient. There is no per-message cost so iterating across a list does not change billing. SMS8 also supports multi-device routing: if you have several Android phones paired, list_devices lets the agent pick which one sends.

أضِف SMS إلى وكيل OpenCode في 3 دقائق

Free 5-day trial. No credit card. Same API key works in Claude Code, Cursor and Windsurf if you switch later.