---
title: "Connect a remote MCP server by URL"
method: POST
path: "/connections/mcp/start"
tags: ["Setup · Connections"]
---

# Connect a remote MCP server by URL

`POST /connections/mcp/start`

## Request

- Base URL: `https://api.ziggsai.com`
- URL: `https://api.ziggsai.com/connections/mcp/start`
- Auth: HTTP bearer

Discovers the MCP server's authorization server, registers a client, and returns the browser OAuth consent URL. Completing the flow stores the tokens as a connection with provider "mcp"; grants on it list MCP tool names in allowed_actions.

## Request body

- StartMcpConnectionDto
  - `serverUrl` string: Remote MCP server URL (https). Required unless requestId is set.
  - `agreementId` string: First-hop connection consent agreement to approve: its server URL is used, and completing OAuth records the owner's approval and mints the grant. Required unless serverUrl is set.
  - `expectedUpdatedAt` string: With agreementId: the agreement `updatedAt` the person was shown when they chose to approve and connect. Carried through the OAuth state; the approval recorded on callback is refused if the agreement changed meanwhile.
  - `returnTo` string: Frontend URL to redirect after OAuth

## Response `200`

OK

- OAuthStartResponseSchema
  - `authorizeUrl` string, required

---

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