Skip to main content
Glama
econ-watch

Vercel MCP Relay Server

by econ-watch
README.md
# Vercel MCP Relay Server

A production-ready MCP (Model Context Protocol) relay server that enables GitHub Copilot Agents and other AI assistants to interact with the Vercel REST API.

## Features

- **Full Vercel API Coverage**: Manage projects, deployments, domains, environment variables, teams, and more
- **Production Ready**: Built for Vercel's serverless platform with optimal configuration
- **Streamable HTTP Transport**: Uses the modern MCP transport protocol for efficient communication
- **Type Safe**: Written in TypeScript with comprehensive schema validation using Zod

## Quick Start

### Deploy to Vercel

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/econ-watch/MCP)

### Environment Variables

Set the following environment variable in your Vercel project:

- `VERCEL_TOKEN`: Your Vercel API token ([create one here](https://vercel.com/account/tokens))

### Local Development

```bash
# Install dependencies
npm install

# Set your Vercel token
export VERCEL_TOKEN=your_token_here

# Start development server
npm run dev
```

The MCP server will be available at `http://localhost:3000/api/mcp`

## Available Tools

### Projects
| Tool | Description |
|------|-------------|
| `list_projects` | List all Vercel projects accessible to the authenticated user |
| `get_project` | Get detailed information about a specific project |

### Deployments
| Tool | Description |
|------|-------------|
| `list_deployments` | List deployments for a project or all deployments |
| `get_deployment` | Get detailed information about a specific deployment |
| `get_deployment_events` | Get build logs and events for a deployment |
| `cancel_deployment` | Cancel a deployment that is currently building |
| `promote_deployment` | Promote a deployment to production |
| `rollback_deployment` | Rollback a project to a previous deployment |

### Environment Variables
| Tool | Description |
|------|-------------|
| `list_environment_variables` | List all environment variables for a project |
| `create_environment_variable` | Create a new environment variable |
| `delete_environment_variable` | Delete an environment variable |

### Domains
| Tool | Description |
|------|-------------|
| `list_project_domains` | List all domains configured for a project |
| `add_project_domain` | Add a custom domain to a project |
| `remove_project_domain` | Remove a domain from a project |
| `verify_project_domain` | Verify a domain's DNS configuration |

### Teams & User
| Tool | Description |
|------|-------------|
| `list_teams` | List all teams the authenticated user is a member of |
| `get_team` | Get detailed information about a specific team |
| `get_user` | Get information about the authenticated user |

### Aliases
| Tool | Description |
|------|-------------|
| `list_aliases` | List all aliases (custom URLs) for a deployment or project |

## Usage with MCP Clients

### GitHub Copilot / Claude Desktop

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "vercel": {
      "url": "https://your-deployment.vercel.app/api/mcp"
    }
  }
}
```

### For clients requiring stdio transport

```json
{
  "mcpServers": {
    "vercel": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://your-deployment.vercel.app/api/mcp"]
    }
  }
}
```

## Tech Stack

- [Next.js](https://nextjs.org/) - React framework for serverless deployment
- [@vercel/mcp-adapter](https://www.npmjs.com/package/@vercel/mcp-adapter) - Vercel's MCP server adapter
- [Zod](https://zod.dev/) - TypeScript-first schema validation
- [Model Context Protocol](https://modelcontextprotocol.io/) - Open protocol for AI tool integration

## Security

- The `VERCEL_TOKEN` is kept server-side and never exposed to clients
- All API requests are authenticated using Bearer token authentication
- Input parameters are validated using Zod schemas

## License

MIT