vercel-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vercel Automation via Rube MCP

通过Rube MCP实现Vercel自动化

Automate Vercel platform operations through Composio's Vercel toolkit via Rube MCP.
通过Composio的Vercel工具包,借助Rube MCP自动化Vercel平台的操作。

Prerequisites

前提条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active Vercel connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    vercel
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需提供RUBE_SEARCH_TOOLS)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    并使用工具包
    vercel
    建立有效的Vercel连接
  • 请始终先调用
    RUBE_SEARCH_TOOLS
    以获取最新的工具架构

Setup

设置步骤

Get Rube MCP: Add
https://rube.app/mcp
as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
  1. Verify Rube MCP is available by confirming
    RUBE_SEARCH_TOOLS
    responds
  2. Call
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    vercel
  3. If connection is not ACTIVE, follow the returned auth link to complete Vercel OAuth
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥 — 只需添加端点即可使用。
  1. 通过确认
    RUBE_SEARCH_TOOLS
    能正常响应,验证Rube MCP是否可用
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    并指定工具包
    vercel
  3. 如果连接状态未显示为ACTIVE,请按照返回的授权链接完成Vercel OAuth认证
  4. 在运行任何工作流之前,确认连接状态显示为ACTIVE

Core Workflows

核心工作流

1. Monitor and Inspect Deployments

1. 监控与检查部署

When to use: User wants to list, inspect, or debug deployments
Tool sequence:
  1. VERCEL_LIST_ALL_DEPLOYMENTS
    or
    VERCEL_GET_DEPLOYMENTS
    - List deployments with filters [Required]
  2. VERCEL_GET_DEPLOYMENT
    or
    VERCEL_GET_DEPLOYMENT_DETAILS
    - Get specific deployment info [Optional]
  3. VERCEL_GET_DEPLOYMENT_LOGS
    or
    VERCEL_GET_RUNTIME_LOGS
    - View build/runtime logs [Optional]
  4. VERCEL_GET_DEPLOYMENT_EVENTS
    - Get deployment event timeline [Optional]
  5. VERCEL_LIST_DEPLOYMENT_CHECKS
    - View deployment check results [Optional]
Key parameters:
  • projectId
    : Filter deployments by project
  • state
    : Filter by deployment state (e.g., 'READY', 'ERROR', 'BUILDING')
  • limit
    : Number of deployments to return
  • target
    : Filter by environment ('production', 'preview')
  • deploymentId
    or
    idOrUrl
    : Specific deployment identifier
Pitfalls:
  • Deployment IDs and URLs are both accepted as identifiers in most endpoints
  • Build logs and runtime logs are separate; use the appropriate tool
  • VERCEL_GET_DEPLOYMENT_LOGS
    returns build logs;
    VERCEL_GET_RUNTIME_LOGS
    returns serverless function logs
  • Deployment events include status transitions and are useful for debugging timing issues
适用场景:用户需要列出、检查或调试部署任务
工具执行顺序:
  1. VERCEL_LIST_ALL_DEPLOYMENTS
    VERCEL_GET_DEPLOYMENTS
    - 带筛选条件列出部署任务 [必填]
  2. VERCEL_GET_DEPLOYMENT
    VERCEL_GET_DEPLOYMENT_DETAILS
    - 获取特定部署的详细信息 [可选]
  3. VERCEL_GET_DEPLOYMENT_LOGS
    VERCEL_GET_RUNTIME_LOGS
    - 查看构建/运行时日志 [可选]
  4. VERCEL_GET_DEPLOYMENT_EVENTS
    - 获取部署事件时间线 [可选]
  5. VERCEL_LIST_DEPLOYMENT_CHECKS
    - 查看部署检查结果 [可选]
关键参数:
  • projectId
    : 按项目筛选部署任务
  • state
    : 按部署状态筛选(例如:'READY'、'ERROR'、'BUILDING')
  • limit
    : 返回的部署任务数量
  • target
    : 按环境筛选('production'、'preview')
  • deploymentId
    idOrUrl
    : 特定部署的标识符
注意事项:
  • 部署ID和URL均可作为大多数接口的标识符
  • 构建日志与运行时日志是分离的,请使用对应的工具获取
  • VERCEL_GET_DEPLOYMENT_LOGS
    返回构建日志;
    VERCEL_GET_RUNTIME_LOGS
    返回无服务器函数日志
  • 部署事件包含状态转换信息,可用于调试时序问题

2. Create and Manage Deployments

2. 创建与管理部署

When to use: User wants to trigger a new deployment
Tool sequence:
  1. VERCEL_LIST_PROJECTS
    - Find the target project [Prerequisite]
  2. VERCEL_CREATE_NEW_DEPLOYMENT
    - Trigger a new deployment [Required]
  3. VERCEL_GET_DEPLOYMENT
    - Monitor deployment progress [Optional]
Key parameters:
  • name
    : Project name for the deployment
  • target
    : Deployment target ('production' or 'preview')
  • gitSource
    : Git repository source with ref/branch info
  • files
    : Array of file objects for file-based deployments
Pitfalls:
  • Either
    gitSource
    or
    files
    must be provided, not both
  • Git-based deployments require proper repository integration
  • Production deployments update the production domain alias automatically
  • Deployment creation is asynchronous; poll with GET_DEPLOYMENT for status
适用场景:用户需要触发新的部署任务
工具执行顺序:
  1. VERCEL_LIST_PROJECTS
    - 找到目标项目 [前提步骤]
  2. VERCEL_CREATE_NEW_DEPLOYMENT
    - 触发新部署 [必填]
  3. VERCEL_GET_DEPLOYMENT
    - 监控部署进度 [可选]
关键参数:
  • name
    : 部署对应的项目名称
  • target
    : 部署目标环境('production' 或 'preview')
  • gitSource
    : 包含分支信息的Git仓库源
  • files
    : 基于文件部署的文件对象数组
注意事项:
  • 必须提供
    gitSource
    files
    其中之一,不可同时提供
  • 基于Git的部署需要正确配置仓库集成
  • 生产环境部署会自动更新生产域名别名
  • 部署创建是异步操作;需调用GET_DEPLOYMENT轮询获取状态

3. Manage Environment Variables

3. 管理环境变量

When to use: User wants to add, list, or remove environment variables for a project
Tool sequence:
  1. VERCEL_LIST_PROJECTS
    - Find the project ID [Prerequisite]
  2. VERCEL_LIST_ENV_VARIABLES
    - List existing env vars [Required]
  3. VERCEL_ADD_ENVIRONMENT_VARIABLE
    - Add a new env var [Optional]
  4. VERCEL_DELETE_ENVIRONMENT_VARIABLE
    - Remove an env var [Optional]
Key parameters:
  • projectId
    : Target project identifier
  • key
    : Environment variable name
  • value
    : Environment variable value
  • target
    : Array of environments ('production', 'preview', 'development')
  • type
    : Variable type ('plain', 'secret', 'encrypted', 'sensitive')
Pitfalls:
  • Environment variable names must be unique per target environment
  • type: 'secret'
    variables cannot be read back after creation; only the ID is returned
  • Deleting an env var requires both
    projectId
    and the env var
    id
    (not the key name)
  • Changes require a new deployment to take effect
适用场景:用户需要为项目添加、列出或删除环境变量
工具执行顺序:
  1. VERCEL_LIST_PROJECTS
    - 找到项目ID [前提步骤]
  2. VERCEL_LIST_ENV_VARIABLES
    - 列出已有的环境变量 [必填]
  3. VERCEL_ADD_ENVIRONMENT_VARIABLE
    - 添加新的环境变量 [可选]
  4. VERCEL_DELETE_ENVIRONMENT_VARIABLE
    - 删除环境变量 [可选]
关键参数:
  • projectId
    : 目标项目的标识符
  • key
    : 环境变量名称
  • value
    : 环境变量值
  • target
    : 环境数组('production'、'preview'、'development')
  • type
    : 变量类型('plain'、'secret'、'encrypted'、'sensitive')
注意事项:
  • 环境变量名称在目标环境中必须唯一
  • type: 'secret'
    类型的变量创建后无法读取其值;仅会返回ID
  • 删除环境变量需要同时提供
    projectId
    和环境变量的
    id
    (而非变量名)
  • 环境变量变更后需要重新部署才能生效

4. Manage Domains and DNS

4. 管理域名与DNS

When to use: User wants to configure custom domains or manage DNS records
Tool sequence:
  1. VERCEL_GET_DOMAIN
    - Check domain status and configuration [Required]
  2. VERCEL_GET_DOMAIN_CONFIG
    - Get DNS/SSL configuration details [Optional]
  3. VERCEL_LIST_PROJECT_DOMAINS
    - List domains attached to a project [Optional]
  4. VERCEL_GET_DNS_RECORDS
    - List DNS records for a domain [Optional]
  5. VERCEL_CREATE_DNS_RECORD
    - Add a new DNS record [Optional]
  6. VERCEL_UPDATE_DNS_RECORD
    - Modify an existing DNS record [Optional]
Key parameters:
  • domain
    : Domain name (e.g., 'example.com')
  • name
    : DNS record name/subdomain
  • type
    : DNS record type ('A', 'AAAA', 'CNAME', 'MX', 'TXT', 'SRV')
  • value
    : DNS record value
  • ttl
    : Time-to-live in seconds
Pitfalls:
  • Domain must be added to the Vercel account before DNS management
  • SSL certificates are auto-provisioned but may take time for new domains
  • CNAME records at the apex domain are not supported; use A records instead
  • MX records require priority values
适用场景:用户需要配置自定义域名或管理DNS记录
工具执行顺序:
  1. VERCEL_GET_DOMAIN
    - 检查域名状态与配置 [必填]
  2. VERCEL_GET_DOMAIN_CONFIG
    - 获取DNS/SSL配置详情 [可选]
  3. VERCEL_LIST_PROJECT_DOMAINS
    - 列出关联到项目的域名 [可选]
  4. VERCEL_GET_DNS_RECORDS
    - 列出域名的DNS记录 [可选]
  5. VERCEL_CREATE_DNS_RECORD
    - 添加新的DNS记录 [可选]
  6. VERCEL_UPDATE_DNS_RECORD
    - 修改已有的DNS记录 [可选]
关键参数:
  • domain
    : 域名(例如:'example.com')
  • name
    : DNS记录名称/子域名
  • type
    : DNS记录类型('A'、'AAAA'、'CNAME'、'MX'、'TXT'、'SRV')
  • value
    : DNS记录值
  • ttl
    : 生存时间(秒)
注意事项:
  • 域名必须先添加到Vercel账户才能进行DNS管理
  • SSL证书会自动配置,但新域名可能需要一定时间生效
  • apex域名不支持CNAME记录;请改用A记录
  • MX记录需要设置优先级值

5. Manage Projects

5. 管理项目

When to use: User wants to list, inspect, or update project settings
Tool sequence:
  1. VERCEL_LIST_PROJECTS
    - List all projects [Required]
  2. VERCEL_GET_PROJECT
    - Get detailed project information [Optional]
  3. VERCEL_UPDATE_PROJECT
    - Modify project settings [Optional]
Key parameters:
  • idOrName
    : Project ID or name for lookup
  • name
    : Project name for updates
  • framework
    : Framework preset (e.g., 'nextjs', 'vite', 'remix')
  • buildCommand
    : Custom build command override
  • rootDirectory
    : Root directory if not repo root
Pitfalls:
  • Project names are globally unique within a team/account
  • Changing framework settings affects subsequent deployments
  • rootDirectory
    is relative to the repository root
适用场景:用户需要列出、检查或更新项目设置
工具执行顺序:
  1. VERCEL_LIST_PROJECTS
    - 列出所有项目 [必填]
  2. VERCEL_GET_PROJECT
    - 获取项目详细信息 [可选]
  3. VERCEL_UPDATE_PROJECT
    - 修改项目设置 [可选]
关键参数:
  • idOrName
    : 用于查找的项目ID或名称
  • name
    : 用于更新的项目名称
  • framework
    : 框架预设(例如:'nextjs'、'vite'、'remix')
  • buildCommand
    : 自定义构建命令
  • rootDirectory
    : 项目根目录(若不在仓库根目录)
注意事项:
  • 项目名称在团队/账户内是全局唯一的
  • 修改框架设置会影响后续的部署任务
  • rootDirectory
    是相对于仓库根目录的路径

6. Team Management

6. 团队管理

When to use: User wants to view team info or list team members
Tool sequence:
  1. VERCEL_LIST_TEAMS
    - List all teams the user belongs to [Required]
  2. VERCEL_GET_TEAM
    - Get detailed team information [Optional]
  3. VERCEL_GET_TEAM_MEMBERS
    - List members of a specific team [Optional]
Key parameters:
  • teamId
    : Team identifier
  • limit
    : Number of results per page
  • role
    : Filter members by role
Pitfalls:
  • Team operations require appropriate team-level permissions
  • Personal accounts have no teams; team endpoints return empty results
  • Member roles include 'OWNER', 'MEMBER', 'DEVELOPER', 'VIEWER'
适用场景:用户需要查看团队信息或列出团队成员
工具执行顺序:
  1. VERCEL_LIST_TEAMS
    - 列出用户所属的所有团队 [必填]
  2. VERCEL_GET_TEAM
    - 获取团队详细信息 [可选]
  3. VERCEL_GET_TEAM_MEMBERS
    - 列出特定团队的成员 [可选]
关键参数:
  • teamId
    : 团队标识符
  • limit
    : 每页结果数量
  • role
    : 按角色筛选成员
注意事项:
  • 团队操作需要对应的团队级权限
  • 个人账户没有团队;团队接口会返回空结果
  • 成员角色包括'OWNER'、'MEMBER'、'DEVELOPER'、'VIEWER'

Common Patterns

通用模式

ID Resolution

ID解析

Project name -> Project ID:
1. Call VERCEL_LIST_PROJECTS
2. Find project by name in response
3. Extract id field for subsequent operations
Domain -> DNS Records:
1. Call VERCEL_GET_DNS_RECORDS with domain name
2. Extract record IDs for update/delete operations
项目名称 -> 项目ID:
1. 调用VERCEL_LIST_PROJECTS
2. 在响应结果中按名称查找项目
3. 提取id字段用于后续操作
域名 -> DNS记录:
1. 使用域名调用VERCEL_GET_DNS_RECORDS
2. 提取记录ID用于更新/删除操作

Pagination

分页

  • Use
    limit
    parameter to control page size
  • Check response for pagination tokens or
    next
    fields
  • Continue fetching until no more pages are indicated
  • 使用
    limit
    参数控制每页大小
  • 检查响应结果中的分页令牌或
    next
    字段
  • 持续获取数据直到没有更多页面

Known Pitfalls

已知注意事项

Deployment States:
  • States include: INITIALIZING, ANALYZING, BUILDING, DEPLOYING, READY, ERROR, CANCELED, QUEUED
  • Only READY deployments are live and serving traffic
  • ERROR deployments should be inspected via logs for failure details
Environment Variables:
  • Secret type vars are write-only; values cannot be retrieved after creation
  • Env vars are scoped to environments (production, preview, development)
  • A redeployment is needed for env var changes to take effect
Rate Limits:
  • Vercel API has rate limits per endpoint
  • Implement backoff on 429 responses
  • Batch operations where possible to reduce API calls
部署状态:
  • 状态包括:INITIALIZING、ANALYZING、BUILDING、DEPLOYING、READY、ERROR、CANCELED、QUEUED
  • 只有READY状态的部署是已上线并提供服务的
  • ERROR状态的部署需要通过日志检查失败详情
环境变量:
  • Secret类型的变量是只写的;创建后无法获取其值
  • 环境变量是按环境(production、preview、development)划分作用域的
  • 环境变量变更后需要重新部署才能生效
速率限制:
  • Vercel API对每个接口都有速率限制
  • 收到429响应时请实现退避机制
  • 尽可能批量操作以减少API调用次数

Quick Reference

快速参考

TaskTool SlugKey Params
List projectsVERCEL_LIST_PROJECTSlimit
Get project detailsVERCEL_GET_PROJECTidOrName
Update projectVERCEL_UPDATE_PROJECTidOrName, name, framework
List deploymentsVERCEL_LIST_ALL_DEPLOYMENTSprojectId, state, limit
Get deploymentVERCEL_GET_DEPLOYMENTidOrUrl
Create deploymentVERCEL_CREATE_NEW_DEPLOYMENTname, target, gitSource
Deployment logsVERCEL_GET_DEPLOYMENT_LOGSdeploymentId
Runtime logsVERCEL_GET_RUNTIME_LOGSdeploymentId
List env varsVERCEL_LIST_ENV_VARIABLESprojectId
Add env varVERCEL_ADD_ENVIRONMENT_VARIABLEprojectId, key, value, target
Delete env varVERCEL_DELETE_ENVIRONMENT_VARIABLEprojectId, id
Get domainVERCEL_GET_DOMAINdomain
Get domain configVERCEL_GET_DOMAIN_CONFIGdomain
List DNS recordsVERCEL_GET_DNS_RECORDSdomain
Create DNS recordVERCEL_CREATE_DNS_RECORDdomain, name, type, value
Update DNS recordVERCEL_UPDATE_DNS_RECORDdomain, recordId
List project domainsVERCEL_LIST_PROJECT_DOMAINSprojectId
List teamsVERCEL_LIST_TEAMS(none)
Get teamVERCEL_GET_TEAMteamId
Get team membersVERCEL_GET_TEAM_MEMBERSteamId, limit
任务工具标识关键参数
列出项目VERCEL_LIST_PROJECTSlimit
获取项目详情VERCEL_GET_PROJECTidOrName
更新项目VERCEL_UPDATE_PROJECTidOrName, name, framework
列出部署任务VERCEL_LIST_ALL_DEPLOYMENTSprojectId, state, limit
获取部署信息VERCEL_GET_DEPLOYMENTidOrUrl
创建部署任务VERCEL_CREATE_NEW_DEPLOYMENTname, target, gitSource
获取部署日志VERCEL_GET_DEPLOYMENT_LOGSdeploymentId
获取运行时日志VERCEL_GET_RUNTIME_LOGSdeploymentId
列出环境变量VERCEL_LIST_ENV_VARIABLESprojectId
添加环境变量VERCEL_ADD_ENVIRONMENT_VARIABLEprojectId, key, value, target
删除环境变量VERCEL_DELETE_ENVIRONMENT_VARIABLEprojectId, id
获取域名信息VERCEL_GET_DOMAINdomain
获取域名配置VERCEL_GET_DOMAIN_CONFIGdomain
列出DNS记录VERCEL_GET_DNS_RECORDSdomain
创建DNS记录VERCEL_CREATE_DNS_RECORDdomain, name, type, value
更新DNS记录VERCEL_UPDATE_DNS_RECORDdomain, recordId
列出项目域名VERCEL_LIST_PROJECT_DOMAINSprojectId
列出团队VERCEL_LIST_TEAMS(无)
获取团队信息VERCEL_GET_TEAMteamId
获取团队成员VERCEL_GET_TEAM_MEMBERSteamId, limit