---
title: "Replace a custom MCP connection's credential (re-probed first)"
method: PUT
path: "/integrations/connections/{id}/mcp/auth"
tags: ["Integrations"]
---

# Replace a custom MCP connection's credential (re-probed first)

`PUT /integrations/connections/{id}/mcp/auth`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/integrations/connections/{id}/mcp/auth`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `auth` object, required: How the platform authenticates to the MCP server. The token is encrypted at rest and never returned nor shown to agents.
    - `mode` 'none' | 'bearer' | 'header', required
    - `token` string: bearer/header modes. Write-only.
    - `headerName` string: header mode only (e.g. X-API-Key).

## Response `200`

- object
  - `connection` IntegrationConnection: Never includes credential material.
    - `id` string, uuid, required
    - `companyId` string, uuid, nullable
    - `providerKey` string, required
    - `displayName` string, required
    - `authType` 'api_key' | 'oauth2' | 'mcp' | 'internal', required
    - `visibility` 'company' | 'personal': 'company' = shared with the whole company, managed by its admins; 'personal' = visible to, managed and grantable (to their own agents) by its creator only. Another member's personal connections are never returned.
    - `isMine` boolean: Created by the caller.
    - `actions` object[]: List endpoint, custom MCP connections only (providerKey 'mcp', no catalog entry): the active tools, catalog-shaped.
      - `key` string
      - `scope` 'read' | 'write'
      - `description` string
    - `mcp` object: List endpoint, custom MCP connections only.
      - `host` string, nullable
      - `slug` string, nullable
      - `lastSyncedAt` string, nullable
      - `toolCount` integer
      - `enabledCount` integer
      - `pendingReview` integer
    - `status` 'active' | 'error' | 'revoked', required
    - `externalLabel` string, nullable
    - `config` object, nullable
    - `scopes` string[]
    - `lastUsedAt` string, date-time, nullable
    - `createdBy` string, uuid
    - `createdAt` string, date-time, required
  - `canManage` boolean
  - `server` object
  - `tools` object[]
    - `name` string
    - `title` string, nullable
    - `description` string
    - `inputSchema` object
    - `scope` 'read' | 'write': 'read' when the server annotates readOnlyHint, else 'write' (editable).
    - `destructive` boolean
    - `enabled` boolean
    - `pendingReview` boolean
    - `removed` boolean
  - `agents` object[]

## Other responses

- `400`: auth_invalid
- `401`: Missing, malformed, or invalid bearer token / API key, or revoked session (SESSION_REVOKED).
- `403`: forbidden
- `404`: Not found, or the caller is not authorized to access this resource.
- `422`: url_invalid / url_blocked (private, local or non-public address, or a redirect) / unreachable / auth_required (with `oauth: true` when the server asks for OAuth) / auth_rejected / not_mcp / too_many_tools / timeout
- `429`: too_many_requests

---

[API](https://skmtc.dev/atako/apis/atako-api.md) · [All operations](https://skmtc.dev/atako/apis/atako-api/llms.txt) · [OpenAPI document](https://skmtc.dev/atako/apis/atako-api/revisions/aa555c56fbd7?raw)
