Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manage Vercel Projects, Deployments, Domains, and Environment Variables via MCP

A Model Context Protocol (MCP) server that exposes Vercel's API for project lifecycle management, deployment operations, and runtime visibility.


Overview

The CL Vercel MCP Server provides stateless, multi-tenant Vercel automation:

  • Full Vercel API-call catalog discovery from official docs
  • MVP endpoint wrappers for high-value day-to-day operations
  • Generic fallback endpoint tool for uncovered API calls

Perfect for:

  • CI/CD automation and deployment orchestration
  • Project and environment configuration management
  • Domain, alias, and runtime log troubleshooting workflows

Tools

health_check - Server readiness check

Checks basic MCP server readiness.

Inputs:

  • None

Output:

{
  "status": "ok",
  "server": "CL Vercel MCP Server"
}

list_vercel_api_calls - List extracted Vercel API calls

Returns the full endpoint catalog extracted from Vercel REST API docs.

Inputs:

  • category (string, optional) - Category filter such as projects, deployments, or environment

Output:

{
  "count": 274,
  "category": "projects",
  "calls": []
}

list_projects - List projects

Maps to GET /v10/projects.

Inputs:

  • team_id (string, optional) - Team scope
  • slug (string, optional) - Team slug scope
  • params (object, optional) - Query params (limit, search, etc.)

get_project - Get a project by ID or name

Maps to GET /v9/projects/{idOrName}.

Inputs:

  • id_or_name (string, required)
  • team_id (string, optional)
  • slug (string, optional)

create_project - Create a project

Maps to POST /v11/projects.

Inputs:

  • body (object, required) - Project creation payload
  • team_id (string, optional)
  • slug (string, optional)

update_project - Update a project

Maps to PATCH /v9/projects/{idOrName}.

Inputs:

  • id_or_name (string, required)
  • body (object, required)
  • team_id (string, optional)
  • slug (string, optional)

list_deployments - List deployments

Maps to GET /v6/deployments.

Inputs:

  • team_id (string, optional)
  • slug (string, optional)
  • params (object, optional)

get_deployment - Get deployment details

Maps to GET /v13/deployments/{idOrUrl}.

Inputs:

  • id_or_url (string, required)
  • team_id (string, optional)
  • slug (string, optional)

create_deployment - Create deployment

Maps to POST /v13/deployments.

Inputs:

  • body (object, required)
  • team_id (string, optional)
  • slug (string, optional)

cancel_deployment - Cancel deployment

Maps to PATCH /v12/deployments/{id}/cancel.

Inputs:

  • deployment_id (string, required)
  • team_id (string, optional)
  • slug (string, optional)

get_deployment_events - Retrieve deployment events

Maps to GET /v3/deployments/{idOrUrl}/events.

Inputs:

  • id_or_url (string, required)
  • team_id (string, optional)
  • slug (string, optional)
  • params (object, optional)

list_project_environment_variables - List project environment variables

Maps to GET /v10/projects/{idOrName}/env.

Inputs:

  • id_or_name (string, required)
  • team_id (string, optional)
  • slug (string, optional)
  • params (object, optional)

create_project_environment_variables - Create project environment variables

Maps to POST /v10/projects/{idOrName}/env.

Inputs:

  • id_or_name (string, required)
  • body (object or array, required)
  • team_id (string, optional)
  • slug (string, optional)

update_project_environment_variable - Update a project environment variable

Maps to PATCH /v9/projects/{idOrName}/env/{id}.

Inputs:

  • id_or_name (string, required)
  • environment_variable_id (string, required)
  • body (object, required)
  • team_id (string, optional)
  • slug (string, optional)

list_project_domains - List project domains

Maps to GET /v9/projects/{idOrName}/domains.

Inputs:

  • id_or_name (string, required)
  • team_id (string, optional)
  • slug (string, optional)
  • params (object, optional)

add_project_domain - Add domain to project

Maps to POST /v10/projects/{idOrName}/domains.

Inputs:

  • id_or_name (string, required)
  • body (object, required)
  • team_id (string, optional)
  • slug (string, optional)

assign_deployment_alias - Assign alias to deployment

Maps to POST /v2/deployments/{id}/aliases.

Inputs:

  • deployment_id (string, required)
  • body (object, required)
  • team_id (string, optional)
  • slug (string, optional)

list_deployment_aliases - List deployment aliases

Maps to GET /v2/deployments/{id}/aliases.

Inputs:

  • deployment_id (string, required)
  • team_id (string, optional)
  • slug (string, optional)

get_runtime_logs_for_deployment - Get deployment runtime logs

Maps to GET /v1/projects/{projectId}/deployments/{deploymentId}/runtime-logs.

Inputs:

  • project_id (string, required)
  • deployment_id (string, required)
  • team_id (string, optional)
  • slug (string, optional)
  • params (object, optional)

vercel_api_request - Generic Vercel endpoint fallback

Calls any Vercel REST endpoint when a dedicated wrapper tool is not yet available.

Inputs:

  • method (string, required)
  • path (string, required)
  • team_id (string, optional)
  • slug (string, optional)
  • headers (object, optional)
  • params (object, optional)
  • json_body (any, optional)
  • body (string, optional)
  • timeout_seconds (number, optional)
  • follow_redirects (boolean, optional)
  • max_response_chars (integer, optional)

Usage Example:

{
  "tool": "vercel_api_request",
  "arguments": {
    "method": "GET",
    "path": "/v10/projects",
    "team_id": "team_xxx"
  }
}

API Parameters Reference

Common Parameters
  • team_id - Team context (teamId query value)
  • slug - Team slug context (slug query value)
  • params - Additional endpoint-specific query parameters
  • body / json_body - Endpoint payload for write operations

Resource Formats

  • Project: id_or_name (example: my-project)
  • Deployment: deployment_id or id_or_url (example: dpl_abc123)
  • Environment Variable: environment_variable_id (example: env_abc123)

Authentication Guide

Vercel API Key Guide

Authentication is handled server-side via fastmcp-credentials. The gateway injects your Vercel token through the X-MCP-Cred-Fields header as a JSON object (e.g. {"apiToken": "<token>"}) — no auth_token parameter is needed in any tool call.

Step 1: Create Token

  1. Open Vercel account token settings: https://vercel.com/account/tokens
  2. Create a personal access token
  3. Copy and securely store the token

Step 2: Configure the Gateway

Provide the token to the MewCP gateway, which injects it via X-MCP-Cred-Api-Key on every request.

Step 3: Team Scope

If operating on team resources, include team_id and/or slug in your tool call.


Setup

pip install -r requirements.txt

Running the Server

# stdio
python server.py

# sse
python server.py --transport sse --host 127.0.0.1 --port 8001

# streamable-http
python server.py --transport streamable-http --host 127.0.0.1 --port 8001

Troubleshooting

Common Issues

Missing or Invalid Token

  • Cause: Invalid or expired token, or missing X-MCP-Cred-Api-Key header from the gateway
  • Solution: Verify the gateway has a valid Vercel token configured and retry

Team Resource Access Errors

  • Cause: Team-scoped endpoint called without team_id/slug
  • Solution: Add the correct team scope params

Malformed Request Payload

  • Cause: Missing required fields in body or invalid types
  • Solution: Validate payload shape against Vercel endpoint docs

Unknown Endpoint Path

  • Cause: Wrong API version or path in vercel_api_request
  • Solution: Use list_vercel_api_calls to discover valid method/path pairs

Resources

Links

Project Structure

cl-mcp-vercel/
|-- server.py
|-- requirements.txt
|-- README.md
`-- vercel_mcp/
    |-- __init__.py
    |-- cli.py
    |-- config.py
    |-- tools.py
    |-- schemas.py
    |-- service.py
    `-- vercel_endpoints.json

About

MCP server for Vercel

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages