> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set an agent's MCP servers

> Choose which MCP servers a voice agent uses. The list replaces the old one.

> [!NOTE]
>
> This endpoint is for the VIP plan only. Other plans get a `403`. See [Plan access](https://docs.nedzo.ai/api-reference/introduction.md#plan-access).

The list replaces the servers the agent used before. Voice agents only. Returns the servers the agent now uses.

## Path Parameters

**agentId** `string` *required*

Agent UUID

## Body

**mcpServerIds** `string[]` *required*

Up to 5 MCP servers in the agent's workspace. An empty list removes all.

```bash cURL theme={null}
curl -X PUT "https://api.nedzo.ai/v1/agents/123e4567-e89b-12d3-a456-426614174000/mcp-servers" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "mcpServerIds": ["9b2f6c1a-3e4d-4a5b-8c7d-0e1f2a3b4c5d"] }'
```

```json Response theme={null}
[
  {
    "id": "9b2f6c1a-3e4d-4a5b-8c7d-0e1f2a3b4c5d",
    "workspaceId": "789e4567-e89b-12d3-a456-426614174000",
    "name": "Inventory",
    "url": "https://mcp.example.com/mcp",
    "authType": "bearer",
    "hasAuth": true,
    "headerNames": [],
    "toolCount": 4,
    "lastConnectedAt": "2026-10-11T10:00:00Z",
    "createdAt": "2026-10-11T09:00:00Z",
    "updatedAt": "2026-10-11T10:00:00Z"
  }
]
```

## Errors

| Status | When |
| - | - |
| `400` | More than 5 ids, an id in `mcpServerIds` is not a server in the agent's workspace, or the agent is not a voice agent. |
| `404` | The agent is not in your API key's scope. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.