Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

vercel-apiVercel API 部署

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

1,273

周安装

52

GitHub Stars

154

下载量

408
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vercel-api(Vercel API 部署)
来源仓库:https://github.com/vercel-labs/vercel-plugin
仓库路径:skills/vercel-api
安装命令:
npx skills add https://github.com/vercel-labs/vercel-plugin --skill vercel-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vercel-labs/vercel-plugin --skill vercel-api

简介

用于辅助 API 设计和接口文档编写。

  • 适合梳理 endpoint 和生成 OpenAPI 草稿。
  • 使用时需确认业务语义和鉴权方式。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 避免凭空补字段,应基于现有代码提取事实。
  • vercel-api 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Vercel API — MCP Server & REST API

You are an expert in the Vercel platform APIs. This plugin bundles a connection to the official Vercel MCP server (https://mcp.vercel.com) which gives agents live, authenticated access to Vercel resources.

MCP Server (Public Beta)

The plugin's .mcp.json configures the official Vercel MCP server using Streamable HTTP transport with OAuth authentication. The MCP server is in public beta — read-only in the initial release. Write operations are on the roadmap. Supported clients: Claude, Cursor, and VS Code.

Connection

URL:       https://mcp.vercel.com
Transport: Streamable HTTP
Auth:      OAuth 2.1 (automatic — agent is prompted to authorize on first use)

On first connection the agent will open a browser-based OAuth flow to grant read access to your Vercel account. Subsequent sessions reuse the stored token.

Available MCP Tools

The Vercel MCP server exposes these tool categories (read-only in initial release):

CategoryCapabilities
DocumentationSearch and navigate Vercel docs, Next.js docs, AI SDK docs
ProjectsList projects, get project details, view project settings
DeploymentsList deployments, inspect deployment details, view build output
LogsQuery deployment logs, function invocation logs, build logs
DomainsList domains, check domain configuration and DNS status
Environment VariablesList env vars per project and environment
TeamsList teams, view team members and settings

Usage Patterns

Diagnose a failed deployment

1. List recent deployments → find the failed one
2. Inspect deployment → get error summary
3. Query build logs → identify root cause
4. Cross-reference with vercel-functions skill for runtime fixes

Audit project configuration

1. Get project details → check framework, build settings, root directory
2. List environment variables → verify required vars are set per environment
3. List domains → confirm production domain is correctly assigned
4. Check deployment logs → look for runtime warnings

Search documentation

1. Search Vercel docs for a topic → get relevant pages
2. Read specific doc page → extract configuration examples
3. Cross-reference with bundled skills for deeper guidance

Debug function performance

1. Query function logs → find slow invocations
2. Inspect deployment → check function region, runtime, memory
3. Cross-reference with vercel-functions skill for optimization patterns

Deploying Your Own MCP Server

Use the mcp-handler package (renamed from @vercel/mcp-adapter) to build and deploy custom MCP servers on Vercel with Next.js, Nuxt, or SvelteKit:

npm install mcp-handler

MCP servers deployed on Vercel use Streamable HTTP transport (replaced SSE in March 2025 MCP spec) — cuts CPU usage vs SSE with no persistent connections required. Used in production by Zapier, Composio, Vapi, and Solana.

See Deploy MCP servers to Vercel and GitHub: mcp-handler.

REST API (Direct Access)

When the MCP server doesn't cover a use case (or for write operations), use the Vercel REST API directly with @vercel/sdk or curl.

Authentication

# Bearer token auth (personal token or team token)
curl -H "Authorization: Bearer $VERCEL_TOKEN" https://api.vercel.com/v9/projects
// @vercel/sdk
import { Vercel } from '@vercel/sdk';

const vercel = new Vercel({ bearerToken: process.env.VERCEL_TOKEN });

Key Endpoints

EndpointMethodPurpose
/v9/projectsGETList all projects
/v9/projects/:idGETGet project details
/v13/deploymentsGETList deployments
/v13/deploymentsPOSTCreate a deployment
/v13/deployments/:idGETGet deployment details
/v9/projects/:id/envGETList environment variables
/v9/projects/:id/envPOSTCreate environment variable
/v6/domainsGETList domains
/v6/domainsPOSTAdd a domain
/v1/edge-configGETList Edge Configs
/v1/firewallGETList firewall rules
/v1/drainsGETList all drains
/v1/drainsPOSTCreate a drain
/v1/drains/:id/testPOSTTest a drain
/v1/drains/:idPATCHUpdate a drain
/v1/drains/:idDELETEDelete a drain
/v3/deployments/:id/eventsGETStream runtime logs

SDK Examples

List deployments

import { Vercel } from '@vercel/sdk';

const vercel = new Vercel({ bearerToken: process.env.VERCEL_TOKEN });

const { deployments } = await vercel.deployments.list({
  projectId: 'prj_xxxxx',
  limit: 10,
});

for (const d of deployments) {
  console.log(`${d.url} — ${d.state} — ${d.created}`);
}

Manage environment variables

// List env vars
const { envs } = await vercel.projects.getProjectEnv({
  idOrName: 'my-project',
});

// Create env var
await vercel.projects.createProjectEnv({
  idOrName: 'my-project',
  requestBody: {
    key: 'DATABASE_URL',
    value: 'postgres://...',
    target: ['production', 'preview'],
    type: 'encrypted',
  },
});

Get project domains

const { domains } = await vercel.projects.getProjectDomains({
  idOrName: 'my-project',
});

for (const d of domains) {
  console.log(`${d.name} — verified: ${d.verified}`);
}

Observability APIs

Drains (/v1/drains)

Drains forward logs, traces, speed insights, and web analytics data to external endpoints. All drain management is REST API or Dashboard (https://vercel.com/dashboard/{team}/~/settings/log-drains) only — no CLI commands exist.

import { Vercel } from '@vercel/sdk';

const vercel = new Vercel({ bearerToken: process.env.VERCEL_TOKEN });

// List all drains
const drains = await vercel.logDrains.getLogDrains({ teamId: 'team_xxxxx' });

// Create a drain
await vercel.logDrains.createLogDrain({
  teamId: 'team_xxxxx',
  requestBody: {
    url: 'https://your-endpoint.example.com/logs',
    type: 'json',
    sources: ['lambda', 'edge', 'static'],
    environments: ['production'],
  },
});
For payload schemas (JSON, NDJSON), signature verification, and vendor integration setup, see ⤳ skill: observability.

Runtime Logs (/v3/deployments/:id/events)

Stream runtime logs for a deployment. The response uses application/stream+json — each line is a separate JSON object. Always set a timeout to avoid hanging on long-lived streams.

// Query via MCP (recommended for agents)
// Use the get_runtime_logs MCP tool for structured log access

// Direct REST alternative (streaming)
const res = await fetch(
  `https://api.vercel.com/v3/deployments/${deploymentId}/events`,
  { headers: { Authorization: `Bearer ${process.env.VERCEL_TOKEN}` } }
);
// Parse as NDJSON — see observability skill for streaming code patterns

vercel api CLI Command (January 2026)

The vercel api command gives agents direct access to the full Vercel REST API from the terminal with no additional configuration. It uses the CLI's existing authentication, so agents like Claude Code can call any endpoint immediately.

# Call any REST endpoint directly
vercel api GET /v9/projects
vercel api GET /v13/deployments
vercel api POST /v9/projects/:id/env --body '{"key":"MY_VAR","value":"val","target":["production"]}'

This bridges the gap between the read-only MCP server and the full REST API — agents can perform write operations without needing @vercel/sdk or manual curl with tokens.

When to Use MCP vs CLI vs REST API

ScenarioUseWhy
Agent needs to inspect/read Vercel stateMCP serverOAuth, structured tools, no token management
Agent needs to deploy or mutate stateCLI (vercel deploy, vercel env add)Full write access, well-tested
Agent needs ad-hoc API accessvercel apiDirect REST from terminal, no token setup
Programmatic access from app codeREST API / @vercel/sdkTypeScript types, fine-grained control
CI/CD pipeline automationCLI + VERCEL_TOKENScriptable, --prebuilt for speed
Searching Vercel documentationMCP serverIndexed docs, AI-optimized results

Cross-References

  • CLI operations⤳ skill: vercel-cli
  • Function configuration⤳ skill: vercel-functions
  • Storage APIs⤳ skill: vercel-storage
  • Firewall rules⤳ skill: vercel-firewall
  • AI SDK MCP client⤳ skill: ai-sdk (section: MCP Integration)
  • Drains, log streaming, analytics export⤳ skill: observability

Official Documentation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.16%
按下载量换算164

Claude

29.09%
按下载量换算119

Cursor

19.13%
按下载量换算78

Gemini CLI

9.16%
按下载量换算37

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills