{
  "$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, send and verify OTP codes (SMS or WhatsApp verification), and inspect account balance in Morocco (+212) and internationally.",
    "version": "1.0.0"
  },
  "transport": {
    "type": "http",
    "endpoint": "https://api.envoisms.ma/v1/mcp",
    "note": "JSON-RPC 2.0 over HTTP POST"
  },
  "capabilities": {
    "tools": 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"
        ]
      },
      "requiresAuth": true
    },
    {
      "name": "get_balance",
      "description": "Check current account SMS credit balance in MAD.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "requiresAuth": true
    },
    {
      "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"
        ]
      },
      "requiresAuth": true
    },
    {
      "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"
        ]
      },
      "requiresAuth": true
    },
    {
      "name": "get_pricing",
      "description": "Get EnvoiSMS pricing packs and per-SMS rates in MAD. Public — no authentication required.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    }
  ],
  "authentication": {
    "type": "bearer",
    "description": "All tools except get_pricing require an EnvoiSMS API key sent as 'Authorization: Bearer <API key>'. Create one in the dashboard.",
    "tokenUrl": "https://envoisms.ma/fr/dashboard",
    "publicTools": [
      "get_pricing"
    ]
  }
}
