Skip to main content
Glama
virtualsms-io

VirtualSMS MCP Server

create_number_order

Purchase virtual phone numbers for SMS verification across 500+ services in 50+ countries. Use with check_sms or wait_for_code to receive OTP codes.

Instructions

Purchase a virtual phone number for SMS verification. Returns order_id and phone_number. Use check_sms to poll for the verification code, or use wait_for_code to do it automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceYesService code (e.g. "telegram", "whatsapp", "google")
countryYesCountry ISO code (e.g. "US", "GB", "RU")

Implementation Reference

  • The handleBuyNumber function executes the tool logic for create_number_order.
    export async function handleBuyNumber(
      client: VirtualSMSClient,
      args: z.infer<typeof BuyNumberInput>
    ) {
      const order = await client.createOrder(args.service, args.country);
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(
              {
                order_id: order.order_id,
                phone_number: order.phone_number,
                expires_at: order.expires_at,
                status: order.status,
                tip: 'Use check_sms to poll for the code, or cancel_order to refund.',
              },
              null,
              2
            ),
          },
        ],
  • The BuyNumberInput Zod schema defines the input parameters for the tool.
    export const BuyNumberInput = z.object({
      service: z.string().describe('Service code (e.g. "telegram", "whatsapp", "google")'),
      country: z.string().describe('Country ISO code (e.g. "US", "GB", "RU")'),
    });
  • src/index.ts:98-101 (registration)
    Registration of the tool in the main switch statement.
    case 'create_number_order': {
      const parsed = BuyNumberInput.parse(args);
      return await handleBuyNumber(client, parsed);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/virtualsms-io/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server