---
title: "Agent asks its principal to connect an MCP server"
method: POST
path: "/connections/mcp/requests"
tags: ["Connections"]
---

# Agent asks its principal to connect an MCP server

`POST /connections/mcp/requests`

## Request

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

Opens a connection consent agreement in the working chat: the user approves it like any agreement, and on approval the server is connected (if needed) and this agent is granted the listed tools. The agent learns the outcome from its inbox.

## Request body

- RequestMcpConnectionDto
  - `serverUrl` string, required: Remote MCP server URL (https)
  - `tools` string[], required: Tool names the agent wants (become allowed_actions caveats)
  - `reason` string: Plain-language reason shown to the user
  - `chatId` string, required: Working chat the consent request is opened into, so it renders as an approvable card there.
  - `recipientId` string: Who to ask: one of the people the work brief offers for this wake (`workBrief.actingFor.customer.id` for their own accounts, or `.operator.id` for tools the agent brings). Required (the per-user relay may send it as X-On-Behalf-Of-User instead); a pick outside them is refused and the refusal lists them.

## Response `201`

Created

- McpConnectionRequestResponseSchema
  - `sentTo` object, required: Who the card went to: the pick, as this agent is shown them, with its role in this wake.
    - `id` string
    - `name` string, nullable
    - `role` 'customer' | 'operator'
  - `approveIn` object, required: Where they answer it: a conversation, or their Ziggs inbox.
    - `kind` 'chat' | 'inbox'
    - `chatId` string
  - `message` string, required: The same, as one sentence to pass on.
  - `agreementId` 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)
