---
title: "corestack_environment_starts_with_get"
url: https://docs.corefinity.com/mcp/tools/corestack_environment_starts_with_get
type: tool
last_updated: 2026-11-13
feature: environments
related:
  - https://docs.corefinity.com/api/reference/environments/get-environment-starts-with.md
  - https://docs.corefinity.com/guides/sites/environments-and-copies/create-an-environment.md
---
# corestack_environment_starts_with_get

**What a new environment starts with.** What a new staging environment of a site starts with before you add it: the firewall addresses and presets it inherits, whether SSH is closed to everyone else, the SSH keys it gets and its HTTP authentication. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

Before `corestack_environment_create`: what a new staging environment of a site starts with. It tells you which firewall
addresses and presets the new environment inherits, whether SSH to it is closed to every other address from its first
minute, which SSH keys it gets, and that it is protected by HTTP authentication. Nothing is created or changed.

## Inputs

- `site_id` (integer, ≥ 1, required): Any row of the site: the site or one of its environments. A pinned token needs
  the same pins as `corestack_environment_create`: a pin on the whole site, or on its cluster. A pin on one of its
  environments is not enough.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "site_id": {
      "description": "Any row of the site: the site or one of its environments.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id"
  ],
  "type": "object"
}
```

## Refusals

- `tenant_mismatch`: a site you cannot see, another company's site or one that does not exist (a purged site included),
  or environments are not available.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages the
  site. This comes before anything else about the site, as `corestack_environment_create` refuses it.
- `deleted`: the site is deleted (in its grace period), so no environment can be added to it. This is the same refusal
  `corestack_environment_create` gives: "This site is deleted. Restore it first." Restore it with
  corestack_site_restore_deleted first.
- `provisioning`: the site is still being created. This is the same refusal `corestack_environment_create` gives: "The
  site is still being created. Try again once it is ready."
- `site_unadopted`: refused for the same reason and in the same words as `corestack_environment_create`.
- `pin_refused`: your token is pinned, and not to the whole site or its cluster ("Adding an environment needs a pin on
  the whole site", as `corestack_environment_create` answers), or its pins do not cover the row you named.
- `rate_limited`: more than 60 reads a minute (one budget with the Control Panel and the API).
- 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_environment_starts_with_get",
  "arguments": {
    "site_id": 4211
  }
}
```

Answer (shortened):

```json
{
  "firewall": {
    "inherited": 2,
    "items": [
      { "cidr": "203.0.113.0/24", "scope": "both", "layer": "company", "owner": { "type": "company", "id": 77, "name": "Northwind Stores" } },
      { "cidr": "198.51.100.7/32", "scope": "ssh", "layer": "user", "owner": { "type": "user", "id": 912, "name": "Alex Morgan" } }
    ],
    "presets": [],
    "stage": "enforce",
    "closed_to_others": true
  },
  "ssh": { "keys": 1, "items": [{ "name": "CI deploy", "layer": "company", "owner": { "type": "company", "id": 77, "name": "Northwind Stores" } }], "state": null },
  "http_auth": { "enabled": true },
  "staff_platform_line": false
}
```

## What it answers

- `firewall` (null while the firewall is not available for the site):
  - `inherited`: the number of addresses the new environment starts with. These are the website's own entries and those of
    its company, the company's agencies and their users. Only addresses that apply now are counted (active and not
    expired), never another environment's own entries.
  - `items`: one line per address: `cidr`, `scope` (`both`, `ssh` or `web`), `layer` (`website`, `company`, `agency` or
    `user`, the nearest level that holds it) and `owner` (`type`, `id`, `name`).
  - `presets`: the preset subscriptions that reach every environment of the site: `name`, `slug`, `ranges`, `layer`,
    `owner`.
  - `stage`: the stage of the platform scope the new environment joins (`dark`, `prepare`, `enforce`, `paused` or
    `deferred`).
  - `closed_to_others`: true when that scope enforces, so SSH is closed to every address not on the list.
- `ssh` (null while SSH keys are not available for the site):
  - `keys`: the number of SSH keys the new environment gets on its first delivery. These are the website's, its
    company's and the company's agencies' keys granted to every environment. A key limited to selected environments
    never reaches a new one.
  - `items`: one line per key: `name`, `layer`, `owner`.
  - `state`: null.
- `http_auth.enabled`: always true.
- `staff_platform_line`: always false for a token.

## Prompt

```text
Using the Corefinity MCP server, call corestack_environment_starts_with_get with site_id 4211. (What a new environment starts with.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [GET /api/corestack/sites/{site}/environments/starts-with](https://docs.corefinity.com/api/reference/environments/get-environment-starts-with.md)
- Guide: [Create an environment](https://docs.corefinity.com/guides/sites/environments-and-copies/create-an-environment.md)
