Connect ThaiBulkSMS to your AI

Create a connection, save its credentials once, and configure the assistant you use.

Your connections

Store these two environment variables privately

Use the values shown when you created your connection. Never commit them or paste them into chat.

Create or manage your AI key pair. Choose the services and permissions you need. Creation reuses saved managed keys and creates missing channel keys; a new OTP application needs a contact email and brand name.

TBS_AI_KEYTBS_AI_SECRET

Same URL as OAuth. Your client sends X-TBS-AI-Key and X-TBS-AI-Secret instead of an OAuth token.

Setting environment variables alone is not enough: use the client configuration below to map both values to request headers. Start the client with both variables available. No OAuth sign-in is needed for this connection.

One AI pair connects your selected SMS, OTP and email services. Dashboard tools require OAuth.

Configure your client

Keep the placeholders below. Your client reads the real values from its environment.

Claude Code .mcp.json
{
  "mcpServers": {
    "thaibulksms": {
      "type": "http",
      "url": "https://ai.thaibulksms.com/mcp",
      "headers": {
        "X-TBS-AI-Key": "${TBS_AI_KEY}",
        "X-TBS-AI-Secret": "${TBS_AI_SECRET}"
      }
    }
  }
}

Add these two environment-backed headers to your existing thaibulksms entry; keep the same /mcp URL. Set both variables in the environment that starts the client, then restart it. AI headers select key authentication; without them the server uses OAuth. Do not create a second entry. For Codex, keep the non-secret Authorization marker shown here to bypass cached OAuth refresh; remove the marker and both AI header mappings to return to OAuth.

Codex ~/.codex/config.toml
[mcp_servers.thaibulksms]
url = "https://ai.thaibulksms.com/mcp"
http_headers = { "Authorization" = "TBS-AI" }
env_http_headers = { "X-TBS-AI-Key" = "TBS_AI_KEY", "X-TBS-AI-Secret" = "TBS_AI_SECRET" }

Add these two environment-backed headers to your existing thaibulksms entry; keep the same /mcp URL. Set both variables in the environment that starts the client, then restart it. AI headers select key authentication; without them the server uses OAuth. Do not create a second entry. For Codex, keep the non-secret Authorization marker shown here to bypass cached OAuth refresh; remove the marker and both AI header mappings to return to OAuth.

Cursor .cursor/mcp.json
{
  "mcpServers": {
    "thaibulksms": {
      "url": "https://ai.thaibulksms.com/mcp",
      "headers": {
        "X-TBS-AI-Key": "${env:TBS_AI_KEY}",
        "X-TBS-AI-Secret": "${env:TBS_AI_SECRET}"
      }
    }
  }
}

Add these two environment-backed headers to your existing thaibulksms entry; keep the same /mcp URL. Set both variables in the environment that starts the client, then restart it. AI headers select key authentication; without them the server uses OAuth. Do not create a second entry. For Codex, keep the non-secret Authorization marker shown here to bypass cached OAuth refresh; remove the marker and both AI header mappings to return to OAuth.

Copy setup prompt

Check the connection

Restart your client after setting the variables, discover available tools, and make a read-only check. Setup never needs a test message.

Still asked to sign in?

Keep your existing ThaiBulkSMS MCP entry and URL. Add both environment-backed key headers, set the two variables and restart your client. The AI pair takes precedence over any saved OAuth bearer; no second entry is needed.

If neither key header reaches the server, it detects OAuth and may ask you to sign in. If either key header is present, an incomplete or invalid pair returns a key error without switching to OAuth. ChatGPT cannot read your local environment variables.

For agents

Read the matching skill for account access, safe changes and messaging. Private key clients use their own setup guide.