Key Takeaways
- MCP auth for SMS is: API keys in environment variables, scoped tools, rotation — not keys pasted into prompts.
- The agent must refuse to echo keys or OTP digits. Your REST wrapper reads process.env.
- Separate keys for OTP vs marketing when possible. Rotate after contractor access ends.
- This page is prompt + policy. Live auth headers live in Developer Center. No MCP source dump.
- Hosts (Cursor, Claude Desktop, Windsurf) only inject env — they are not the secret store.
- You bring the Android and operator credit. We meter devices and send volume.
Keys in env, never in chat
MCP auth and API keys — example agent prompt teaches agents (and operators) that SMS gateway credentials belong in the MCP process environment. Overview: MCP overview. Human how-to twin: secure API keys in env.
“Paste your key so I can configure MCP” is social engineering with a helpful tone.
Example agent prompt
“Never ask the user to paste API keys into chat. Assume keys are already in process.env for the MCP server. Never print env values. Never echo OTP. If auth fails, say ‘check env / rotate key’ — do not invent tokens. Prefer list_devices then scoped send.” Fields: Developer Center. Spec: MCP specification.
Auth rules
| Action | OK? | Why |
|---|---|---|
| Read key from env in wrapper | Yes | Secret stays off transcript |
| Paste key into chat / mcp.json in git | No | Exports, forks, screenshots |
| Echo OTP or Authorization header | No | Breaks 2FA and auth |
| Rotate after contractor offboarding | Yes | Least privilege over time |
Least privilege
Scope tools so a general coding agent cannot blast marketing lists. OTP lane: OTP verification. STOP still applies on promo: auto-reply and STOP.
Cost
Stolen keys burn operator airtime and platform volume. You still bring the Android and carrier credit. Free: 1 device / 300 SMS lifetime / 300 contacts. See device and SMS volume pricing.
Checklist
- Keys only in env / secret manager.
- Agent prompt forbids paste-and-echo.
- OTP digits banned from transcripts.
- OTP vs marketing scopes separated.
- Rotation documented.
- No plugin claim.
- No MCP source dump.
- Developer Center for live headers.
Next steps
Logging without leaking: MCP logging prompt. Securing tools overview: securing SMS MCP tools.
Related product pages
Jump to the live product docs for this topic—not another long-form article.
- SMS API documentationLive endpoint reference
- device and SMS volume pricingPlans and allowances
- Android SMS gateway product guideDefinition, product, and how to buy
- download the Android gateway appGet the APK





