Skip to main content

Vercel Setup for AI Agents

Status: Configuration Required
Last Updated: 2025-12-26
Purpose: Enable AI agents to manage Vercel deployments and environment variables

Current Status

Vercel MCP Server: Configured in ~/.cursor/mcp.json
Vercel Access Token: Not configured (required)
Vercel CLI: Not installed (optional)

Required Setup

Step 1: Create Vercel Access Token

  1. Go to: https://vercel.com/account/tokens
  2. Click “Create Token”
  3. Configure:
    • Name: Sanctiv MCP - Full Access
    • Scope: Full Account (recommended) or specific team
    • Expiration: No expiration (recommended for CI/CD)
  4. Copy the token (alphanumeric string)

Step 2: Add Token to Cursor Cloud Agent Secrets

  1. Open Cursor Settings → Cloud Agent Secrets
  2. Add new secret:
    • Key: VERCEL_ACCESS_TOKEN ✅ (Standard Vercel API token name)
    • Value: (paste token from Step 1)
  3. Save

Step 3: Verify MCP Configuration

The official Vercel MCP is a hosted server. Configure it in ~/.cursor/mcp.json or .cursor/mcp.json:
{
  "mcpServers": {
    "vercel": {
      "url": "https://mcp.vercel.com/sse"
    }
  }
}
Note: The official Vercel MCP uses OAuth authentication. When you first connect, Cursor will prompt you to authorize with your Vercel account. No API token needed in the config - authentication is handled via the browser.

Optional: Install Vercel CLI

For local development and manual operations:
npm install -g vercel
# or
pnpm add -g vercel
Verify installation:
vercel --version

Available Capabilities (Once Configured)

With Vercel MCP configured, agents can:
  • Manage Environment Variables
    • List environment variables for projects
    • Add/update/delete environment variables
    • Set variables for specific environments (Production/Preview/Development)
  • Deployment Management
    • List deployments
    • View build logs
    • Check deployment status
    • Rollback deployments
  • Project Configuration
    • View project settings
    • Configure domains
    • Access deployment URLs

Usage Examples (After Setup)

"List environment variables for the dashboard project"
"Add NEXT_PUBLIC_SUPABASE_URL to Vercel"
"Show me the latest deployment status"
"What's the build log for deployment xyz?"

Troubleshooting

MCP Server Not Available

Symptom: list_mcp_resources returns no Vercel resources Fix:
  1. Verify VERCEL_ACCESS_TOKEN is set in Cursor Cloud Agent Secrets
  2. Restart Cursor to reload MCP servers
  3. Check ~/.cursor/mcp.json configuration

Token Invalid

Symptom: MCP calls fail with authentication errors Fix:
  1. Regenerate token at https://vercel.com/account/tokens
  2. Update VERCEL_ACCESS_TOKEN in Cursor Cloud Agent Secrets
  3. Restart Cursor


Next Steps

  1. Complete: Create Vercel access token
  2. Complete: Add VERCEL_ACCESS_TOKEN to Cursor Cloud Agent Secrets (if not already done)
  3. Pending: Verify MCP access with test command
  4. Pending: Use MCP to configure environment variables

Token Variable Names

Standard: VERCEL_ACCESS_TOKEN
Alternative: Some tools may use VERCEL_API_TOKEN, but VERCEL_ACCESS_TOKEN is the official standard used by:
  • Vercel CLI
  • Vercel MCP Server
  • Vercel API documentation
If you already have VERCEL_ACCESS_TOKEN configured, you’re all set! No changes needed.

Trigger rebuild with updated Vercel env vars