---
title: "Connect Endpoint"
method: POST
path: "/gateways/mcps/endpoints/{endpoint_id}/connect"
tags: ["Gateway: MCP"]
---

# Connect Endpoint

`POST /gateways/mcps/endpoints/{endpoint_id}/connect`

One route, two steps. `body.scopes is None` -> discover and cache the
checklist onto the row; a list (possibly empty) -> begin and return the
authorization redirect.

## Path parameters

- `endpoint_id` string, uuid, required

## Request body

- MCPConnectRequest — Request MCP OAuth scope discovery or authorization. `scopes` present (an empty list is a legal "no scopes") is the begin step.
  - `scopes` string[], nullable

## Response `200`

Successful Response

- MCPConnectResponse
  - `count` integer
  - `redirect_url` string, nullable
  - `scopes_offered` string[]

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-20** `7a4b57044657` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/gateways/mcps/endpoints/:endpoint_id/connect/post.md)

---

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