{
  "$schema": "https://modelcontextprotocol.io/schemas/2026-01-01/server-card.json",
  "serverInfo": {
    "name": "EnvoiSMS Platform MCP Server",
    "description": "Official Model Context Protocol server for EnvoiSMS.ma. Allows AI agents to send SMS, WhatsApp messages, send and verify OTP codes, and inspect account balance in Morocco (+212) and internationally.",
    "version": "1.0.0"
  },
  "transport": {
    "type": "stream",
    "endpoint": "https://api.envoisms.ma/v1/mcp"
  },
  "capabilities": {
    "tools": true,
    "resources": true,
    "prompts": true
  },
  "tools": [
    {
      "name": "send_sms",
      "description": "Send single or bulk SMS messages to Moroccan (+212) or international numbers.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "description": "Recipient phone number in E.164 format (e.g. +212600000000)"
          },
          "message": {
            "type": "string",
            "description": "SMS content message string"
          },
          "sender_id": {
            "type": "string",
            "description": "Optional approved Sender ID"
          }
        },
        "required": ["to", "message"]
      }
    },
    {
      "name": "get_balance",
      "description": "Check current account SMS credit balance in MAD.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "send_otp",
      "description": "Send a 6-digit OTP verification code via SMS.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "description": "Phone number in E.164 format (e.g. +212600000000)"
          },
          "brand": {
            "type": "string",
            "description": "Optional brand name to include in OTP message"
          }
        },
        "required": ["to"]
      }
    },
    {
      "name": "verify_otp",
      "description": "Validate a user-provided OTP verification code.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Session ID returned by send_otp"
          },
          "code": {
            "type": "string",
            "description": "6-digit OTP code entered by user"
          }
        },
        "required": ["session_id", "code"]
      }
    }
  ]
}
