---
title: "corestack_company_deployment_connection_delete"
url: https://docs.corefinity.com/mcp/tools/corestack_company_deployment_connection_delete
type: tool
last_updated: 2026-11-13
feature: deployment-connections
related:
  - https://docs.corefinity.com/guides/organisation/developers/repository-connections.md
---
# corestack_company_deployment_connection_delete

**Remove a deployment connection.** Remove one of your company's deployment connections. Only the company's owners may, and only while no environment deploys through it: move those environments to another connection first. Send confirm_connection set to the connection's id once the person has agreed. Scope: write.

- Scope: `write`
- Confirmation: `confirm_connection`
- Runs as a task: no

## When to use it

Remove one of your company's deployment connections, for example an account that has left the company or a duplicate. Only the company's owners may remove a connection, and only while no environment deploys through it: move each environment that uses it to another connection first (its deployment settings in the Control Panel, or `corestack_deployments_repository_set` for a site). Nothing else is deleted: the environments keep their repository settings.

To repair a connection that needs re-authorising, do not remove it: reconnect it through `reconnect_url` from `corestack_company_deployment_connections_list`, which keeps every environment that uses it.

Removing cannot be undone. Ask the person first, then send `confirm_connection` set to the connection's id.

## Inputs

- `connection_id` (integer, required): the connection to remove, from `corestack_company_deployment_connections_list`.
- `confirm_connection` (integer): the same id again, sent only after the person agreed. Without it, or with another id, nothing is removed and the refusal says what to send.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_connection": {
      "description": "The same id again, sent only after the person agreed to remove this connection.",
      "minimum": 1,
      "type": "integer"
    },
    "connection_id": {
      "description": "The connection to remove (corestack_company_deployment_connections_list).",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "connection_id"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: you are not one of the company's owners; ask an owner or Corefinity support.
- `conflict`: environments still deploy through the connection; `details.environments` names them and `details.other_environments` counts the ones not named to you. Nothing was removed.
- `confirm_mismatch`: `confirm_connection` is missing or is not the connection's id. Nothing was removed.
- `tenant_mismatch`: no such connection in your company.
- `pin_refused`: a token limited to some sites cannot change company-wide settings.
- 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_company_deployment_connection_delete",
  "arguments": {
    "connection_id": 42,
    "confirm_connection": 42
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_company_deployment_connection_delete with connection_id 42. (Remove a deployment connection.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Repository connections](https://docs.corefinity.com/guides/organisation/developers/repository-connections.md)
