Create Customer


Creates a new WooCommerce customer account. Generates a username from the email and a random password when either is omitted.

Also known as: add a customer, new customer account.

Property Value
Ability slug mosmcp/create-customer
Wire tool name mosmcp__create-customer
Category WooCommerce (mosmcp-woocommerce)
Plan Free

 

Required access

Requirement Value
Capability create_users
Minimum default role Administrator
Requires WooCommerce
Annotations readOnly: false · destructive: false · idempotent: false · openWorld: false

 

Input schema

Field Type Required Default Description
email string Yes — The customer email address (required).
username string — Login username. Auto-generated from the email if omitted.
password string — Account password. Auto-generated if omitted.
first_name string — First name.
last_name string — Last name.
billing object —
billing.first_name string —
billing.last_name string —
billing.company string —
billing.address_1 string —
billing.address_2 string —
billing.city string —
billing.state string —
billing.postcode string —
billing.country string —
billing.phone string —
billing.email string —
shipping object —
shipping.first_name string —
shipping.last_name string —
shipping.company string —
shipping.address_1 string —
shipping.address_2 string —
shipping.city string —
shipping.state string —
shipping.postcode string —
shipping.country string —
shipping.phone string —
shipping.email string —

 

Output schema

Field Type Required
success boolean
message string
data object
data.id integer
data.date_created string \| null
data.date_modified string \| null
data.email string
data.first_name string
data.last_name string
data.role string
data.username string
data.billing object
data.shipping object
data.is_paying_customer boolean
data.avatar_url string
data.order_count integer
data.total_spent string
meta object
meta.ability string
meta.timestamp string
meta.execution_time string \| null

 

Example

Sample prompt
Create a customer account for jane@example.com, Jane Doe.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 354,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__create-customer",
    "arguments": {
      "input": {
        "email": "jane@example.com",
        "first_name": "Jane",
        "last_name": "Doe"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 354,
  "result": {
    "isError": false,
    "structuredContent": {
      "success": true,
      "message": "Customer created.",
      "data": {
        "id": 57,
        "date_created": "2026-03-04T11:20:00",
        "date_modified": null,
        "email": "jane@example.com",
        "first_name": "Jane",
        "last_name": "Doe",
        "role": "customer",
        "username": "janedoe",
        "billing": {
          "first_name": "",
          "last_name": "",
          "company": "",
          "address_1": "",
          "address_2": "",
          "city": "",
          "state": "",
          "postcode": "",
          "country": "",
          "email": "",
          "phone": ""
        },
        "shipping": {
          "first_name": "",
          "last_name": "",
          "company": "",
          "address_1": "",
          "address_2": "",
          "city": "",
          "state": "",
          "postcode": "",
          "country": "",
          "email": "",
          "phone": ""
        },
        "is_paying_customer": false,
        "avatar_url": "https://secure.gravatar.com/avatar/abc123?s=96&d=mm&r=g",
        "order_count": 0,
        "total_spent": "0.00"
      },
      "meta": {
        "ability": "mosmcp/create-customer",
        "timestamp": "2026-09-29T10:15:00+00:00",
        "execution_time": "18.4ms"
      }
    }
  }
}

 

Edge cases / errors

  • Invalid email → wcab_invalid_email; an account with that email already exists → wcab_customer_exists.
  • Omitted username/password are generated by WooCommerce (username from the email, random password).
  • WooCommerce rejects the account (e.g. username taken) → wcab_customer_create_failed with its message.

 


<< Previous Next >>
Create Coupon Create Order

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.