---
title: "corestack_site_create"
url: https://docs.corefinity.com/mcp/tools/corestack_site_create
type: tool
last_updated: 2026-11-13
feature: site-create
related:
  - https://docs.corefinity.com/api/reference/sites/create-site.md
  - https://docs.corefinity.com/guides/sites/create-and-manage/create-a-site.md
---
# corestack_site_create

**Create a CoreStack site.** Create a standalone CoreStack site on Corefinity's servers in a region, on a package, optionally with staging environments. It is charged as the package's price: price it first with corestack_billing_quote_preview. Use corestack_in_corecluster_site_create when the company has a CoreCluster with space (check corecluster_capacity_check), otherwise corestack_site_create. Scope: write. Also needs exec when reveal_to_agent is true. Long-running: answers with a task. The secret opens in the person's browser; set reveal_to_agent to true to receive it yourself (needs exec).

- Scope: `write`
- Also needs `exec` when the returned `credentials[]`
- Runs as a task: yes
- Returns a secret only when `reveal_to_agent` is set

## When to use it

Create a standalone CoreStack site on Corefinity's servers in a region, on a package, optionally with staging environments. It is charged as the package's price: price it first with corestack_billing_quote_preview. Use corestack_in_corecluster_site_create when the company has a CoreCluster with space (check corecluster_capacity_check), otherwise corestack_site_create.

When another change in the same region is starting at that moment, the create waits for it instead of being refused: it is accepted at once, its operation stays `pending` with the `status_label` "Waiting for another change to finish. This carries on by itself." (the words the Control Panel shows), and it carries on by itself within a few minutes. Do not send it again. The task's status reads the same words while it waits.

When its DNS records cannot be published yet (Cloudflare busy, or a platform DNS problem for Corefinity to fix), the create waits at its `dns` step instead of failing: its operation stays `pending` with the `status_label` "Waiting for DNS", and the task's status reads the same words. It is tried again every minute and goes on by itself; do not send it again.

When the region's platform is not taking new changes for a while (a sync window, or automated sync switched off), the create waits before it commits anything: its operation stays `pending` with the `status_label` "Waiting for the platform", and the task's status reads the same words. It carries on by itself once the platform accepts changes; do not send it again.

With `site.http_auth: true` the site asks visitors for a password from its first minute: it is created behind HTTP authentication (one whole-site rule, one generated login), so its preview address never answers anyone without it. Its login is handed over with the staging environments' (a link to the secret page in the person's browser, or the values with `reveal_to_agent` and exec); later, corestack_http_auth_reveal_password shows it again. Use it for any site that will hold data that is not public yet, such as a copy or a migration.

With `content: copy`, follow the copy with corestack_operation_timeline_get on the new website's `provision` operation. The task names that operation as `work.operation_id`, on this answer, on corestack_task_get and on a login round's `work`. That read shows the copy's steps. While `fast_copy` is on, this tool and that read draw the copy progress view; for a website that is not a copy the view says so and shows no steps.

If the site's usual platform address (`<domain>-<company>.cfstack.io`) is already used by another site, the site and its environments are created on the next free one (`-2`, `-3`, … after the company part) and the progress's `operation.notes` says so (`platform_address_changed`); when none of those is free the create is refused `in_use`, naming the address, before anything is made. Two creates checked at the same moment are written one after the other, so they never share an address (`busy` when the other holds on for long: try again in a moment). If the domain is still held by an earlier create of it that failed and is being cleaned up, the call waits for that clean-up (up to about 20 seconds) and then creates the site; `cleaning_up` is answered only when the clean-up has not finished by then: try again in a minute.

When the region has no server of the site's kind yet, or none with room for it, the task waits while one is prepared or added (`capacity_being_added`), however long the region takes to make room: it carries on by itself, so there is nothing to retry; do not create the site again. The same holds while the region makes room for the site's disk: the task stays `creating` and the site's `placed` stage reads "Setting up your site. This can take a little longer." (corestack_site_progress_get, the Control Panel and the REST API say the same). If that server's storage is not ready, the task ends `work_failed` with `details.failed.reason` `storage_unavailable` and `details.failed.error` "Storage in this region is not ready for a new site at the moment. Contact support.", the words the Control Panel shows. Do not retry: ask Corefinity support.

A create that stops on a temporary problem (the platform, its DNS or its SSH gateway not ready in time) is tried again automatically, at most three times, a few minutes apart; follow it with corestack_site_progress_get or corestack_site_operation_get (`notes`) instead of creating it again.

A new site never fails while its certificate is issued: when Let's Encrypt is slow or limits new accounts, the task keeps waiting, for up to a few hours, and corestack_site_operation_get and corestack_site_progress_get say "Certificate on its way" (note `certificate_on_its_way`) until it carries on by itself.

When the region has no room for the new site yet, the create is not refused: it is accepted, waits briefly for room (`capacity_being_added`, "Setting up your site. This can take a little longer.") and then continues by itself. Do not retry it or create it again; follow it as usual.

Staging environments are never refused because the region's staging servers are not ready yet: they are created on the region's production servers instead, and the task's environment rows say so (`placement.tier` `production`). When the region's servers are not taking new sites for the moment (being set up or replaced), the task waits (`capacity_being_added`) and goes on by itself once they are; there is nothing to retry.

A site that needs a new server in the region while changes to cluster capacity are paused for planned maintenance is not refused: the task waits (`capacity_being_added`) and goes on by itself once the pause ends; there is nothing to retry.

A Direct Debit mandate the bank is still confirming counts as a payment method. A company with no payment method at all may still create one site: it is created as usual, and corestack_site_progress_get answers `payment` with `add_by` and the words the Control Panel shows, "This site was created before your account had a payment method. Add a card or a Direct Debit mandate by 5 November 2026." Tell the person to add one in the Control Panel by that date. If that site's creation fails and will not be tried again automatically, or it is deleted before it is ready, the company may create one again at once.

## Inputs

- `region` (string, 2–4 characters, required): uk, us, nl or aus (corestack_platform_options_get lists the ready ones).
- `package` (string, up to 16 characters, required): A CoreStack package key, for example CS4; it sets the site's size.
- `compute_family` (one of `general`, `optimised`, default `"general"`): general: Standard; optimised: Performance.
- `site` (object, required): The site; versions left out take the platform's defaults.
  - `platform` (one of `wordpress`, `laravel`, `magento2`, `shopware`, required)
  - `domain` (string, 4–253 characters, required): The site's domain, without www.
  - `content` (one of `fresh`, `empty`, required; `copy` too while `fast_copy_new_site` is on): fresh: install the platform; empty: an empty site to migrate into; copy: a copy of `source`.
  - `php_version` (string, up to 8 characters)
  - `mariadb_version` (string, up to 8 characters)
  - `fresh` (object): With content fresh: the first admin and the site's title.
    - `admin_email` (string, up to 255 characters)
    - `admin_username` (string, up to 32 characters)
    - `site_title` (string, up to 255 characters)
    - `locale` (string, up to 16 characters)
  - `http_auth` (boolean): true: the site asks visitors for a password from its first minute (one generated login, handed over once). Left out or false, the site is created open, as before.
  - `edition` (one of `open_source`, `mage_os`, `commerce`; only while `app_versions` is on and an edition is offered): magento2 only; the edition from corestack_app_versions_list. Left out, the platform's default edition.
  - `app_version` (string; only while `app_versions` is on): The line key from corestack_app_versions_list (for example 2.4.8). Left out, the platform's default line.
  - `acknowledge` (array of one of `eol`; only while `app_versions` is on): ["eol"] once the person knows the chosen line is end of life (refused with `ack_required` otherwise).
  - `varnish` (object; only while new Magento 2 sites are born with Varnish): Magento 2 only: `{enabled: true|false, version?}`. Left out, the site is born with Varnish on the default version (7.7) in front of Magento; `enabled: false` uses Magento's built-in full-page cache instead and the site stays that way until the person switches Varnish on. `version` is one corestack_site_provisioning_options lists as allowed for the Magento version being installed (`version_unsupported` otherwise); a size with no room for Varnish is `varnish_too_small`.
  - `source` (object; only while `fast_copy_new_site` is on): With content copy: the environment to copy, one of the company's (corestack_copy_preview shows what the copy brings and its price), as `{environment_id}` or the API's `{type: "environment", environment_id}`. Platform and versions follow it: leave the version, `fresh`, Node.js and line keys out; a `platform` sent must be the source's. While restoring anywhere and restoring into a new website are switched on, `source` may instead be `{type: "snapshot", snapshot_id}`: any snapshot of the company's websites (corestack_company_snapshots_list), whose platform and versions the new website follows; it is never anonymised (that is corestack_snapshot_restore_to's).
    - `type` (`environment`, the default; another type is `invalid_arguments`)
    - `environment_id` (integer): The environment's row (a website's production row or one of its environments).
- `environments` (array of objects, up to 10 items): Staging environments created with the site.
  - `name` (string, 1–40 characters, required): 1–40 characters, without < or >.
  - `uat_size` (string, up to 16 characters, required): A staging size key (corestack_uat_sizes_list).
  - `included` (boolean): The staging environment the package includes (at most one).
- `reveal_to_agent` (boolean, default `false`): Return the secret to you instead of opening it in the person's browser. Needs exec.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "compute_family": {
      "default": "general",
      "description": "general: Standard; optimised: Performance.",
      "enum": [
        "general",
        "optimised"
      ],
      "type": "string"
    },
    "environments": {
      "description": "Staging environments created with the site.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "included": {
            "description": "The staging environment the package includes (at most one).",
            "type": "boolean"
          },
          "name": {
            "description": "1–40 characters, without < or >.",
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          },
          "uat_size": {
            "description": "A staging size key (corestack_uat_sizes_list).",
            "maxLength": 16,
            "type": "string"
          }
        },
        "required": [
          "name",
          "uat_size"
        ],
        "type": "object"
      },
      "maxItems": 10,
      "type": "array"
    },
    "package": {
      "description": "A CoreStack package key, for example CS4; it sets the site's size.",
      "maxLength": 16,
      "type": "string"
    },
    "region": {
      "description": "uk, us, nl or aus (corestack_platform_options_get lists the ready ones).",
      "maxLength": 4,
      "minLength": 2,
      "type": "string"
    },
    "reveal_to_agent": {
      "default": false,
      "description": "Return the secret to you instead of opening it in the person's browser. Needs exec.",
      "type": "boolean"
    },
    "site": {
      "additionalProperties": false,
      "description": "The site; versions left out take the platform's defaults.",
      "properties": {
        "acknowledge": {
          "items": {
            "enum": [
              "eol"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "app_version": {
          "type": "string"
        },
        "content": {
          "description": "fresh: install the platform; empty: an empty site to migrate into.",
          "enum": [
            "fresh",
            "empty"
          ],
          "type": "string"
        },
        "domain": {
          "description": "The site's domain, without www.",
          "maxLength": 253,
          "minLength": 4,
          "type": "string"
        },
        "edition": {
          "enum": [
            "open_source"
          ],
          "type": "string"
        },
        "fresh": {
          "additionalProperties": false,
          "description": "With content fresh: the first admin and the site's title.",
          "properties": {
            "admin_email": {
              "maxLength": 255,
              "type": "string"
            },
            "admin_username": {
              "maxLength": 32,
              "type": "string"
            },
            "locale": {
              "maxLength": 16,
              "type": "string"
            },
            "site_title": {
              "maxLength": 255,
              "type": "string"
            }
          },
          "type": "object"
        },
        "http_auth": {
          "type": "boolean"
        },
        "mariadb_version": {
          "maxLength": 8,
          "type": "string"
        },
        "node_acknowledge": {
          "description": "[\"eol\"] once the person knows the chosen Node.js major is end of life (refused with ack_required otherwise).",
          "items": {
            "enum": [
              "eol"
            ],
            "type": "string"
          },
          "maxItems": 1,
          "type": "array"
        },
        "node_major": {
          "description": "The Node.js major (corestack_site_provisioning_options lists each platform's, with its status). Left out, the default for new sites.",
          "maximum": 99,
          "minimum": 10,
          "type": "integer"
        },
        "php_version": {
          "maxLength": 8,
          "type": "string"
        },
        "platform": {
          "enum": [
            "wordpress",
            "laravel",
            "magento2",
            "shopware5"
          ],
          "type": "string"
        },
        "search": {
          "description": "Search (OpenSearch) on or off, on a platform that offers it.",
          "type": "boolean"
        },
        "varnish": {
          "type": "object"
        }
      },
      "required": [
        "platform",
        "domain",
        "content"
      ],
      "type": "object"
    }
  },
  "required": [
    "region",
    "package",
    "site"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: the Control Panel refuses this person the action and names no reason; stop.
- `billing_forbidden`: the person has no billing role in the company; ask a company owner or billing member.
- `no_payment_method`: the company has no payment method and has already created its one site without one (a site whose creation failed, or that was deleted before it was ready, does not count); the person must add a card or a Direct Debit mandate in the Control Panel.
- `no_platform_cluster`: there is no platform cluster in that region; choose another region.
- `not_configured`: this is not set up for the company yet; the person should contact Corefinity.
- `duplicate`: the same thing already exists; read the current list and update it instead.
- `feature_off`: an input needs a feature that is switched off (for example `apply: "tonight"` while the maintenance window queue is switched off); leave that input out.
- `invalid_arguments` on `source.environment_id` or `source.snapshot_id` (content `copy`): "This WordPress site is built with Bedrock, so it can only be copied to a site that deploys the same way. For a staging copy, use a branch (Git) environment." A new website made from a copy deploys manually, so a WordPress site built with Bedrock that deploys from Git is not copied into one.
- `legacy_search` on `source.environment_id` or `source.snapshot_id` (content `copy`; message: "This site's search runs on a temporary older engine. Switch the store to the OpenSearch module first."): the source's search runs on a temporary older engine, so a new website is not made from it. Tell the person to switch the store to the OpenSearch module first.
- `demo_keep_required`: the company is on a free demo that is not kept yet, and a new standalone site (a fresh one or a copy, `content: copy`) costs money: ask the person to keep the demo first (`corestack_demo_keep`, or open `keep_url`); `change` names it and its monthly price. A site inside a CoreCluster is not affected.
- `invalid_arguments` on `package` (message: the price the Control Panel could not find, then "Choose another package or region, or contact support and we will sort it out."): the package has no price in the company's currency, region or server type yet, so nothing was created; choose another package or region, or ask the person to contact support. The REST answer is the same 422 with `reason` naming the gap (`currency_unpublished`, `family_unavailable`, `package_inactive`, `package_unknown`, `package_platform`).
- `rate_limited`: the person has created as many sites this hour as the limit allows (100 by default, shared with the Control Panel and the API). A create that is refused does not count. Wait `retry_after_seconds`, then call again.
- `invalid_arguments` on `content` ("PHP sites start empty: deploy your code"), or on `app_version`, `edition` or `acknowledge` ("The <field> field is not part of this request.", naming it): PHP has no installer and no versions to choose; create it with `content: empty` and leave those inputs out.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_site_create",
  "arguments": {
    "region": "uk",
    "package": "cs4",
    "site": {
      "platform": "wordpress",
      "domain": "example.co.uk",
      "content": "fresh"
    }
  }
}
```

## What it installs

Left out, `app_version`, `php_version` and `mariadb_version` take the defaults, and a default that cannot be installed on a new site yet never refuses the create: a release that has not finished testing installs the newest older release of the same line that has and carries the same security fixes (a line without that data never falls back to an older release), a default line that is held, has ended or has no build for the placement installs the next older line of its edition that carries them, and a PHP or MariaDB version not yet open to new sites takes the newest one that is. Each such choice is listed as `{field, from, to, reason, message}` in `create_fallbacks`: on the finished task's result, while the task runs on corestack_site_progress_get (with `environments[]`, or corestack_site_create) or corestack_site_provisioning_get (without), and afterwards on corestack_site_get's `site`. Once the PHP version a site could not be created on opens to new sites, its `php_version` entry carries `now_available: true` and says so in one sentence; the site stays on what it was created with until the owner switches it (corestack_php_version_change). Tell the person its `message`. A version you name is checked as before and refused if it cannot be installed.

When no release of the line has both finished testing and carries the newest security fixes, the create is accepted and waits instead of being refused: nothing is installed until a release qualifies, and then the site installs exactly what a create made at that moment would (the line, edition, PHP and MariaDB versions are kept). While it waits, `version_wait` (`{line, edition, pin, label, reason, since, message}`) is on corestack_site_progress_get or corestack_site_provisioning_get and on corestack_site_get's `site`, and the task keeps working with its `message` as the status, also when another change was starting at that moment. Tell the person its `message`. If staff hold the line meanwhile it keeps waiting and `reason` says why. A version you name waits the same way; it never moves to another line. To stop waiting, delete the site with corestack_site_delete: the waiting create is cancelled and its task ends `cancelled`.

Whenever the Control Panel requests the release's security testing itself, `version_wait` also has `testing` (`{state, since}`) and `overdue`, and `message` always reads the same state. `testing.state` is `requested` (the testing is asked for and has not started), `running` (the release is being tested), `awaiting_staff` (our team runs this release's security testing) or `team_review` (our team confirms the version: the testing has ended, the wait is for another `reason`, or it passed its bound; when the testing passed, the create goes on by itself shortly); `testing.since` is when that state began. `overdue` turns `true` once the create has waited longer than the bound our team sets: `testing.state` then reads `team_review`, and the create keeps waiting, is never failed by the bound and still goes on as soon as a release qualifies.

When no PHP version of the site's list is open to new sites yet (just after a PHP security update, before its tested release is opened), the create is not refused: it is accepted and waits for the PHP version it would use (the one you name, or the default), then goes on by itself once that version is open, never on another one. `version_wait` then has `kind` `php` and `php` (the version it waits for), its `reason` is `runtime_not_open` and its `message` reads "Waiting for PHP 8.3 to be available for new sites. Your site will be set up as soon as it is." Do not create it again; tell the person its `message`. While any PHP version of the list is open, one that is not is refused `php_version` as before: choose an open one (corestack_site_provisioning_options lists them, and says `php_wait` when none is).

A copy (`content` `copy`) of a site whose PHP version is not open to new sites yet is not refused either: a copy keeps the versions of the site it is copied from, so it waits for that version (`version_wait` with `kind` `php`), then goes on by itself once it is open. If by then the copy can no longer be made as it was planned (the storage server it was planned on is being emptied, or the site it copies has moved), it keeps waiting with the status "Waiting for our team to prepare the copy"; it is never failed. The snapshot a copy is made from cannot be deleted until the copy has finished.

A platform with no installer of its own (PHP, while it is offered) starts empty: send `content: empty` and no `fresh`, `app_version`, `edition` or `acknowledge`; the site takes the platform's default PHP and MariaDB versions unless you name them. The person then deploys their own code to it, as to any empty site.

## Prompt

```text
Using the Corefinity MCP server, call corestack_site_create with region uk, package cs4, site {"platform":"wordpress","domain":"example.co.uk","content":"fresh"}. (Create a CoreStack site.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites](https://docs.corefinity.com/api/reference/sites/create-site.md)
- Guide: [Create a site](https://docs.corefinity.com/guides/sites/create-and-manage/create-a-site.md)
