vercel-mcp-server

LucasBiason/vercel-mcp-server

3.2

If you are the rightful owner of vercel-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Vercel MCP Server is a professional Model Context Protocol server designed for seamless integration with Vercel's deployment platform, enabling automation and management of deployments, projects, and environment variables.

Tools
7
Resources
0
Prompts
0

Vercel MCP Server

TypeScript MCP

Model Context Protocol server for Vercel API integration

Professional MCP server that enables seamless interaction with Vercel's deployment platform. Automate deployments, manage projects, monitor builds, and control environment variables directly from your development environment.


Features

Deployment Management

  • Create and deploy projects programmatically
  • Trigger builds from any branch
  • Monitor deployment status in real-time
  • View deployment logs
  • Rollback to previous versions

Project Configuration

  • Update environment variables
  • Manage project settings
  • Configure build commands and output directories
  • Control framework detection

Monitoring

  • List all deployments with filters
  • Check deployment status
  • Access build and runtime logs
  • Monitor resource usage

Installation

Prerequisites

  • Node.js 20+
  • npm or pnpm
  • Vercel account with API token

Setup

# Clone repository
git clone https://github.com/LucasBiason/vercel-mcp-server.git
cd vercel-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Configure
cp .env.example .env
# Edit .env and add your VERCEL_TOKEN

Configuration

Create .env file:

VERCEL_TOKEN=your_vercel_token_here

Get your Vercel token at: https://vercel.com/account/tokens


Usage

With Cursor MCP

Add to your .cursor/mcp.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "vercel": {
      "command": "node",
      "args": ["/path/to/vercel-mcp-server/dist/index.js"],
      "env": {
        "VERCEL_TOKEN": "your_token_here"
      }
    }
  }
}

Standalone

# Run MCP server
npm start

# Development mode with watch
npm run dev

Available Tools

create_project

Create a new Vercel project from GitHub repository.

Parameters:

  • name: Project name
  • framework: Framework (nextjs, vite, react, etc)
  • repo: GitHub repository (format: owner/repo)
  • buildCommand: Custom build command (optional)
  • outputDirectory: Output directory (optional)

Example:

{
  "name": "my-portfolio",
  "framework": "vite",
  "repo": "LucasBiason/portfolio",
  "buildCommand": "npm run build",
  "outputDirectory": "dist"
}

deploy_project

Trigger a new deployment for a project.

Parameters:

  • projectId: Project ID or name
  • branch: Git branch to deploy (default: main)

get_deployments

List deployments for a project.

Parameters:

  • projectId: Project ID or name
  • limit: Number of deployments to return (default: 20)
  • state: Filter by state (BUILDING, READY, ERROR, etc)

get_deployment_logs

Get logs for a specific deployment.

Parameters:

  • deploymentId: Deployment ID
  • limit: Number of log lines (default: 100)

update_env_vars

Update environment variables for a project.

Parameters:

  • projectId: Project ID or name
  • envVars: Array of {key, value, target} objects
  • target: production, preview, or development

Example:

{
  "projectId": "my-project",
  "envVars": [
    {
      "key": "API_URL",
      "value": "https://api.example.com",
      "target": "production"
    }
  ]
}

get_project_info

Get detailed information about a project.

Parameters:

  • projectId: Project ID or name

rollback_deployment

Rollback to a previous deployment.

Parameters:

  • deploymentId: Deployment ID to rollback to

API Reference

This MCP server uses the Vercel REST API v9/v13.

Base URL: https://api.vercel.com

Authentication: Bearer token in Authorization header

Key endpoints used:

  • GET /v9/projects - List projects
  • POST /v13/deployments - Create deployment
  • GET /v6/deployments - List deployments
  • GET /v2/deployments/{id}/events - Get logs
  • POST /v10/projects/{id}/env - Manage env vars

Full API docs: https://vercel.com/docs/rest-api


Architecture

Cursor/Client
      ↓
   MCP Server
      ↓
  Vercel API
      ↓
Vercel Platform

Components

src/

  • index.ts - Main MCP server entry point
  • types.ts - TypeScript type definitions
  • tools/ - MCP tools implementation
    • deployment.ts - Deployment operations
    • project.ts - Project management
    • environment.ts - Environment variables
  • services/ - Business logic
    • vercel_client.ts - Vercel API client
  • utils/ - Helper functions
    • logger.ts - Logging
    • validators.ts - Input validation

Development

Build

npm run build

Watch mode

npm run dev

Lint

npm run lint

Test

npm test

Examples

Deploy a Project

// Using MCP tool
{
  "tool": "deploy_project",
  "arguments": {
    "projectId": "my-portfolio",
    "branch": "main"
  }
}

Update Environment Variables

{
  "tool": "update_env_vars",
  "arguments": {
    "projectId": "my-api",
    "envVars": [
      {
        "key": "DATABASE_URL",
        "value": "postgresql://...",
        "target": "production"
      }
    ]
  }
}

Monitor Deployment

// 1. Get deployments
{
  "tool": "get_deployments",
  "arguments": {
    "projectId": "my-project",
    "limit": 5
  }
}

// 2. Check logs of latest
{
  "tool": "get_deployment_logs",
  "arguments": {
    "deploymentId": "dpl_xxx",
    "limit": 100
  }
}

Security

  • API tokens are stored in environment variables
  • Never commit .env file
  • Use read-only tokens when possible
  • Limit token scope to necessary permissions

Troubleshooting

Token not found

# Verify .env file exists
cat .env

# Should contain:
VERCEL_TOKEN=your_token

Connection errors

# Test token manually
curl https://api.vercel.com/v9/projects \
  -H "Authorization: Bearer $VERCEL_TOKEN"

Build errors

# Clean and rebuild
rm -rf dist node_modules
npm install
npm run build

Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/new-tool
  3. Commit changes: git commit -am 'Add new tool'
  4. Push to branch: git push origin feature/new-tool
  5. Submit pull request

License

MIT License - see LICENSE file for details


Links


Created by: Lucas Biason
Date: November 2025
Purpose: Professional automation for Vercel deployments via MCP