---
title: "POST /api/mcp/servers/{slug}/auth"
method: POST
path: "/api/mcp/servers/{slug}/auth"
tags: ["mcp"]
---

# POST /api/mcp/servers/{slug}/auth

`POST /api/mcp/servers/{slug}/auth`

## Path parameters

- `slug` string, required

## Request body

- object
  - `authenticationTemplate` union[], required
    - union
      - object
        - `slug` string, nullable
        - `kind` 'none', required
      - object
        - `slug` string, nullable
        - `kind` 'oauth2', required
        - `scopes` string[], nullable
        - `enterpriseIdentityProvider` EnterpriseIdentityProviderDescriptor — The registered OAuth app that stands for the enterprise identity provider minting an integration's ID-JAGs.
          - `client` string, required
          - `clientOwner` 'org' | 'user', required
      - object
        - `slug` string, nullable
        - `type` 'apiKey', required
        - `label` string, nullable
        - `headers` object, nullable
        - `queryParams` object, nullable
  - `mode` 'merge' | 'replace', nullable

## Response `200`

Success

- object
  - `authenticationTemplate` union[], required
    - union
      - object
        - `slug` string, required
        - `kind` 'none', required
      - object
        - `slug` string, required
        - `kind` 'apikey', required
        - `label` string, nullable
        - `placements` object[], required
          - `carrier` 'header' | 'query', required
          - `name` string, required
          - `prefix` string, nullable
          - `variable` string, nullable
          - `literal` string, nullable
      - object
        - `slug` string, required
        - `kind` 'oauth2', required
        - `scopes` string[], nullable
        - `enterpriseIdentityProvider` EnterpriseIdentityProviderDescriptor — The registered OAuth app that stands for the enterprise identity provider minting an integration's ID-JAGs.
          - `client` string, required
          - `clientOwner` 'org' | 'user', required
      - object
        - `slug` string, required
        - `kind` 'stdio_env', required
        - `vars` string[], required

## Other responses

- `400` — McpConnectionError | McpToolDiscoveryError
- `500` — InternalError

## Changes

- **2026-08-30** `03ae66214fb3` — 2 info
  - added the optional property `anyOf[#/components/schemas/McpToolDiscoveryError]/modernContractViolation` to the response with the `400` status
  - added the optional property `anyOf[#/components/schemas/McpToolDiscoveryError]/reauthorizationRequired` to the response with the `400` status
- **2026-08-29** `97a522c951f2` — 1 info
  - added the optional property `anyOf[#/components/schemas/McpToolDiscoveryError]/timedOut` to the response with the `400` status
- **2026-08-28** `1e1ddf571b49` — 3 info
  - added the new optional request property `authenticationTemplate/items/anyOf[subschema #2]/scopes`
  - added the optional property `anyOf[#/components/schemas/McpConnectionError]/failureKind` to the response with the `400` status
  - added the optional property `authenticationTemplate/items/anyOf[subschema #3]/scopes` to the response with the `200` status
- **2026-08-26** `20ca94874092` — 2 info
  - added the new optional request property `authenticationTemplate/items/anyOf[subschema #2]/enterpriseIdentityProvider`
  - added the optional property `authenticationTemplate/items/anyOf[subschema #3]/enterpriseIdentityProvider` to the response with the `200` status

[Change history](https://skmtc.dev/executor/apis/executor-api/changes/api/mcp/servers/:slug/auth/post.md)

---

[API](https://skmtc.dev/executor/apis/executor-api.md) · [All operations](https://skmtc.dev/executor/apis/executor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/executor/executor-api/revisions/03ae66214fb3/schema)
