MCP server connecting Claude to Vercel
A Model Context Protocol (MCP) integration for Vercel’s REST API, providing programmatic access to Vercel deployment management through AI Assistants like Claude and Cursor.
This MCP server implements Vercel’s core API endpoints as tools, enabling:
vercel-list-all-deployments
- List deployments with filteringvercel-get-deployment
- Retrieve specific deployment detailsvercel-list-deployment-files
- List files in a deploymentvercel-create-deployment
- Create new deploymentsvercel-create-project
- Create new Vercel projectsvercel-create-environment-variables
- Create multiple environment variablesvercel-get-environments
- Access project environment variablesvercel-create-custom-environment
- Create custom environments for projectsvercel-list-projects
- List all projects with paginationvercel-list-all-teams
- List all accessible teamsvercel-create-team
- Create a new team with custom slug and namevercel-list-all-deployments
List deployments under the authenticated user or team
app
(string): Filter by deployment nameprojectId
(string): Filter by project ID/namestate
(string): Filter by state (BUILDING, ERROR, INITIALIZING, QUEUED, READY, CANCELED)target
(string): Filter by environment (production/preview)limit
(number): Number of deployments to returnvercel-get-deployment
Get detailed information about a specific deployment
idOrUrl
(string): Deployment ID or URL (required)teamId
(string): Team ID for request scopingvercel-list-deployment-files
List all files of a Vercel deployment
id
(string): The unique deployment identifier (required)teamId
(string): Team identifier to perform the request on behalf ofslug
(string): Team slug to perform the request on behalf ofvercel-create-deployment
Create a new Vercel deployment using the v13/deployments API endpoint
name
(string): Deployment/project nameproject
(string): Project ID/name (required unless deploymentId is provided)deploymentId
(string): ID of a previous deployment to redeploy (required unless project is provided)slug
(string): A unique URL-friendly identifierteamId
(string): Team ID for scopingcustomEnvironmentSlugOrId
(string): Custom environment slug or IDtarget
(string): Environment (production/preview/development, default: production)regions
(string[]): Deployment regionsfunctions
(object): Serverless functions configurationroutes
(array): Array of route definitionscleanUrls
(boolean): Enable or disable Clean URLstrailingSlash
(boolean): Enable or disable trailing slashespublic
(boolean): Make the deployment publicignoreCommand
(string): Command to check whether files should be ignoredgitSource
(object): Git source information
type
(string): Git provider type (github/gitlab/bitbucket)repoId
(string/number): Repository IDref
(string): Git reference (branch/tag)sha
(string): Git commit SHAgitMetadata
(object): Git metadata for the deployment
commitAuthorName
(string): Commit author namecommitMessage
(string): Commit messagecommitRef
(string): Git referencecommitSha
(string): Commit SHAremoteUrl
(string): Git remote URLdirty
(boolean): If the working directory has uncommitted changesprojectSettings
(object): Project-specific settings
buildCommand
(string): Custom build commanddevCommand
(string): Custom development commandframework
(string): Framework presetinstallCommand
(string): Custom install commandoutputDirectory
(string): Build output directoryrootDirectory
(string): Project root directorynodeVersion
(string): Node.js versionserverlessFunctionRegion
(string): Region for serverless functionsmeta
(object): Additional metadata for the deploymentmonorepoManager
(string): Monorepo manager (turborepo, nx, etc.)files
(array): Files to deploy
file
(string): File pathdata
(string): File contentencoding
(string): Content encoding (base64/utf-8)forceNew
(boolean): Force new deployment even if identical existswithCache
(boolean): Enable or disable build cacheautoAssignCustomDomains
(boolean): Automatically assign custom domainswithLatestCommit
(boolean): Include the latest commit in the deploymentvercel-create-project
Create a new Vercel project
name
(string): Project name (required)framework
(string): Framework presetbuildCommand
(string): Custom build commanddevCommand
(string): Custom dev commandoutputDirectory
(string): Build output directoryteamId
(string): Team ID for scopingvercel-create-environment-variables
Create multiple environment variables for a project
Inputs:
projectId
(string): Target project ID (required)teamId
(string): Team ID for request scopingenvironmentVariables
(array): Environment variables to create
key
(string): Variable name (required)value
(string): Variable value (required)target
(string[]): Deployment targets (production/preview/development)type
(string): Variable type (system/encrypted/plain/sensitive)gitBranch
(string): Optional git branch for variableReturns: Object with created variables and any skipped entries
vercel-create-custom-environment
Create a custom environment for a Vercel project. Custom environments cannot be named ‘Production’ or ‘Preview’.
idOrName
(string): The unique project identifier or project name (required)name
(string): Name for the custom environment (required, cannot be ‘Production’ or ‘Preview’)description
(string): Description of the custom environmentbranchMatcher
(object): Branch matching configuration
type
(string): Type of branch matching (startsWith/endsWith/contains/exactMatch/regex)pattern
(string): Pattern to match branches againstteamId
(string): Team ID to perform the request on behalf ofslug
(string): Team slug to perform the request on behalf ofvercel-list-all-teams
List all teams accessible to authenticated user
limit
(number): Maximum results to returnsince
(number): Timestamp for teams created afteruntil
(number): Timestamp for teams created beforeteamId
(string): Team ID for request scopingvercel-create-team
Create a new Vercel team
slug
(string): A unique identifier for the team (required)name
(string): A display name for the team (optional)vercel-list-projects
List all projects under the authenticated user or team
limit
(number): Maximum number of projects to returnfrom
(number): Timestamp for projects created/updated after this timeteamId
(string): Team ID for request scopingsearch
(string): Search projects by namerepoUrl
(string): Filter by repository URLgitForkProtection
(string): Specify PR authorization from forks (0/1)id
: Project IDname
: Project nameframework
: Associated frameworklatestDeployments
: Array of recent deploymentscreatedAt
: Creation timestampgit clone [your-repo-url]
cd vercel-mcp
npm install
.env
file:VERCEL_API_TOKEN=your_api_token_here
npm start
Claude supports MCP tools via its Anthropic Console or Claude Code interface.
npm start
/connect
command:/connect mcp --path [path-to-server]
For CLI-based servers using stdio, specify the path to the server executablePlease list my recent Vercel deployments using the vercel-list-all-deployments tool
mcp-proxy
npm install -g @modelcontextprotocol/proxy
mcp-proxy --stdio --cmd "npm start" --port 3399
Then connect in Claude: /connect mcp --url http://localhost:3399
Cursor has built-in support for MCP tools through its extension system.
npm start
You can also use the Model Context Protocol SDK to integrate with the server programmatically in your own applications:
import { Client } from "@modelcontextprotocol/sdk/client";
// Create an MCP client connected to a stdio transport
const client = new Client({
transport: "stdio",
cmd: "npm --prefix /path/to/vercel-mcp start",
});
// Or connect to an HTTP transport
const httpClient = new Client({
transport: "http",
url: "http://localhost:3399",
});
// Connect to the server
await client.connect();
// List available tools
const { tools } = await client.listTools();
console.log(
"Available tools:",
tools.map((t) => t.name)
);
// Call a tool
const result = await client.callTool({
name: "vercel-list-all-deployments",
args: { limit: 5 },
});
console.log("Deployments:", result);
// You can also use this in an Express server:
app.post("/api/deployments", async (req, res) => {
try {
const result = await client.callTool({
name: "vercel-list-all-deployments",
args: req.body,
});
res.json(result);
} catch (error) {
res.status(500).json({ error: error.message });
}
});
const response = await mcpClient.callTool({
name: "vercel-list-all-deployments",
args: {
limit: 5,
target: "production",
},
});
const deployment = await mcpClient.callTool({
name: "vercel-get-deployment",
args: {
idOrUrl: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd",
},
});
const files = await mcpClient.callTool({
name: "vercel-list-deployment-files",
args: {
id: "dpl_5WJWYSyB7BpgTj3EuwF37WMRBXBtPQ2iTMJHJBJyRfd",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", // Optional
},
});
const projects = await mcpClient.callTool({
name: "vercel-list-projects",
args: {
limit: 10,
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", // Optional
search: "my-app", // Optional
},
});
// Create a basic deployment
const basicDeployment = await mcpClient.callTool({
name: "vercel-create-deployment",
args: {
project: "my-project-id",
target: "production",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", // Optional
},
});
// Redeploy an existing deployment
const redeployment = await mcpClient.callTool({
name: "vercel-create-deployment",
args: {
deploymentId: "dpl_123abc456def",
},
});
// Create a deployment with Git source (from GitHub)
const gitDeployment = await mcpClient.callTool({
name: "vercel-create-deployment",
args: {
project: "my-project-id",
gitSource: {
type: "github",
ref: "main",
},
gitMetadata: {
commitMessage: "add method to measure Interaction to Next Paint",
commitAuthorName: "developer",
remoteUrl: "https://github.com/vercel/next.js",
},
},
});
// Create a deployment with custom files
const fileDeployment = await mcpClient.callTool({
name: "vercel-create-deployment",
args: {
name: "my-instant-deployment",
project: "my-deployment-project",
files: [
{
file: "index.html",
data: "PGgxPkhlbGxvIFdvcmxkPC9oMT4=", // Base64 encoded <h1>Hello World</h1>
encoding: "base64",
},
],
projectSettings: {
framework: "nextjs",
buildCommand: "next build",
installCommand: "npm install",
nodeVersion: "18.x",
},
},
});
const team = await mcpClient.callTool({
name: "vercel-create-team",
args: {
slug: "my-awesome-team",
name: "My Awesome Team",
},
});
const customEnv = await mcpClient.callTool({
name: "vercel-create-custom-environment",
args: {
idOrName: "my-project-id",
name: "staging",
description: "Staging environment for QA testing",
branchMatcher: {
type: "startsWith",
pattern: "staging/",
},
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", // Optional
},
});
docker build -t vercel-mcp .
docker run -it --rm \
-e VERCEL_API_TOKEN=your_token_here \
-p 3399:3399 \
vercel-mcp
docker run -d \
--name vercel-mcp \
--restart unless-stopped \
-e VERCEL_API_TOKEN=your_token_here \
-p 3399:3399 \
vercel-mcp
docker build --target builder -t vercel-mcp-dev .
docker run -it --rm \
-e VERCEL_API_TOKEN=your_token_here \
-p 3399:3399 \
-v $(pwd)/src:/app/src \
vercel-mcp-dev
src/
├── constants/ # Tool definitions
├── tools/
│ ├── deployments/ # Deployment handlers
│ │ ├── handlers.ts
│ │ ├── schema.ts
│ │ └── types.ts
│ └── environments/# Environment management
├── utils/ # API helpers
└── index.ts # Server entrypoint
Variable | Description | Required |
---|---|---|
VERCEL_API_TOKEN |
Vercel access token | Yes |
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)MIT License - see LICENSE for details