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

# Vercel

> Connect Vercel so CloudThinker can triage failed deployments, read runtime logs, and audit domains and aliases

Connect Vercel to let CloudThinker agents find out why a deployment failed, read runtime logs, check which deployment is live, and audit domains, plus cancel a deployment or pause a project through your [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md). The connection uses one Vercel **access token**, and the token's scope (your personal account or one team) decides what agents can see.

***

## Prerequisites

* A Vercel account that can see the team and projects you want to investigate.
* Permission to create access tokens for that team.
* The **Admin** role in the CloudThinker workspace, which you need to add connections. See [Roles](https://docs.cloudthinker.io/guide/security/roles.md).

***

## Setup

**1. Create an access token in Vercel**

In Vercel, open the avatar menu and go to **Account Settings → Tokens** ([direct link](https://vercel.com/account/settings/tokens)). Create a token:

* **Name**: `cloudthinker`
* **Scope**: the one team CloudThinker should reach, or your personal account. A token reaches only that scope, so if your projects span several teams, create one token per team and add each as its own connection.
* **Expiration**: pick a date and put the rotation on your calendar

Copy the token now. Vercel shows it only once.

**2. Add the connection in CloudThinker**

In the sidebar, click **More → Workspace settings → Connections**. On the **Builtin Connections** tab, search for **Vercel**, paste the token into **VERCEL\_TOKEN**, and click **Connect**.

**Success state:** the Vercel card in CloudThinker shows **Connected**. For Vercel, that means the token is saved, not that it works.

**3. Run the verify prompt**

Vercel accepts any token when the connection starts and only checks it on the first real call. A mistyped or expired token still shows **Connected**, so run the [verify prompt](#verify-the-connection) before you rely on it.

**Success state:** CloudThinker returns your Vercel user, teams, and projects. If it returns `403 Not authorized (invalidToken)` instead, the token is bad: see [Troubleshooting](#troubleshooting).

***

## Connection details

| Field | Description |
| - | - |
| **VERCEL\_TOKEN** | Vercel access token. CloudThinker finds teams and projects from its scope, so you don't enter a team ID. |

***

## Required permissions

Vercel tokens have no read-only option. The scope is your main control: a token scoped to one team can't reach projects in any other team.

| Agents can | Needs |
| - | - |
| Read projects, deployments, logs, domains, and aliases | A token scoped to the team that owns them |
| Cancel a deployment, pause or unpause a project | The same token, plus a pass through Approvals |

> [!TIP]
>
> Scope the token to a single team and set an expiration. There's no read-only mode for this connection. Choose **Manual** so a person approves every cancel, pause, and unpause — that is the control that works today.
>
> Once CloudThinker turns on [Rule enforcement](https://docs.cloudthinker.io/guide/approvals/rules.md#troubleshooting) for your workspace, a Rule can narrow it. The quickest way is to [ask for one in chat](https://docs.cloudthinker.io/guide/approvals/rules.md#ask-for-one-rule-in-chat): `/create-policy Deny cancelling deployments and pausing or unpausing projects on my Vercel connection` refuses those controls outright, and `/create-policy Ask first before cancelling deployments or pausing projects in production on my Vercel connection` sends the production ones to a person.

Every change an agent makes goes through your workspace's [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md) first. On the default **Auto · Rules + AI · Ask me** mode, AI judgment can let a safe change run without asking — and an Allow Rule can too, once CloudThinker turns on [Rule enforcement](https://docs.cloudthinker.io/guide/approvals/rules.md#troubleshooting) for your workspace. Choose **Manual** to approve every change yourself.

***

## Agent capabilities

| Capability | Description |
| - | - |
| **Deployment triage** | Read a deployment's build events and runtime log errors, and explain why it failed |
| **Deployment health** | Count deployment states per project, spot error streaks, and flag builds stuck for 30 minutes or more |
| **Production status** | Map aliases to the live deployment and suggest earlier deployments you could roll back to |
| **Build performance** | Compare build times per project (p50, p95, max) over the last 7 days by default (name another window in your prompt) and list the slowest builds |
| **Domains and aliases** | Check domain configuration, find unverified domains, and list aliases |
| **Controls** | Cancel a deployment, pause a project, or unpause a project, each through Approvals |

Rollback suggestions are advice only. CloudThinker has no tool to roll back or redeploy on Vercel.

### Verify the connection

```text theme={null}
Check my Vercel connection: show the signed-in user, my teams, and my projects with their latest deployment state
```

### Example prompts

```text theme={null}
Why did the latest production deployment of my web project fail? Show the build error and a fix
Which Vercel builds are stuck right now, and which are getting slower this week?
Audit my Vercel domains and list any that are unverified or misconfigured
```

Name the team or project in your prompt when the account has many projects. The answer comes back faster and stays focused.

***

## Troubleshooting

To swap a token on an existing connection, open the connection, click the edit icon on the instance, click **Replace…** in **Edit Instance**, paste the new token, and click **Save and test**. See [Rotate a credential](https://docs.cloudthinker.io/guide/connections/overview.md#rotate-a-credential).

> [accordion] Every request fails with 403 Not authorized (invalidToken)
>
> The token is wrong, expired, or revoked. The connection still showed **Connected** because Vercel only checks the token on the first call. Create a new token and replace it on the connection.

> [accordion] One team or project fails with 403 Forbidden
>
> Other requests work, but the token's scope doesn't include that team. Create a token scoped to the right team and replace it on the connection.

> [accordion] 404 Not Found for a project or deployment
>
> The name or ID is wrong, or it belongs to a team outside the token's scope. Ask CloudThinker to list your projects first, then use a name from that list.

> [accordion] A cancel or pause never ran
>
> Controls go through your [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md) first, and CloudThinker never retries a refused request. A person may have rejected it on **Manual**. On Auto, your Approval mode may be set to **Refuse** when nothing allows the change. Once Rule enforcement is on, a **Deny** Rule can also refuse it outright. Ask again when you want it to run.

***

## Security

* **Least privilege** — grant only the permissions the agents need for your use case; start read-only and widen later.
* **Read-only by default** — use read-only credentials unless you want agents to make changes through this connection.
* **Rotate credentials** — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
* **Revoke on offboarding** — remove the credential at the provider when you delete a connection or a teammate leaves.

- **No read-only token**: Vercel has no read-only credential, so the read-only advice above can't apply here. Use a team-scoped token and choose **Manual**, so a person approves every change, plus a **Deny** or **Ask first** Rule once Rule enforcement is on.
- **Plan rotation**: Vercel tokens don't rotate on their own. Set an expiration when you create one and replace it before that date.
- **Watch runtime logs**: an app can print secrets into its own logs. CloudThinker replaces credential-shaped values in tool output with a placeholder before the model or chat sees them (see [Data protection](https://docs.cloudthinker.io/guide/security/data-protection.md)), but a secret in an unusual format can slip through. Keep secrets out of logs at the source.

***

## Related

> [card] [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md)
>
> Decide which Vercel controls run on their own and which wait for you

> [card] [Connections overview](https://docs.cloudthinker.io/guide/connections/overview.md)
>
> See every platform you can connect and how to rotate a credential


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