Skip to main content

vercel-mcp

Switch between Vercel accounts instead of logging out. A vgate CLI plus an MCP server, so scripts and AI agents can change accounts too.

PyPI Python License: MIT CI

Why

The Vercel CLI holds one login at a time, machine-wide. Work on a client account for ten minutes and your own project's vercel deploy quietly starts targeting the wrong place — or fails with Not authorized. The usual fix, vercel logout followed by vercel login, means an email round-trip every single time.

Worse is the silent version: a saved credential that has expired. You get a bare 401 with no hint that the token simply aged out, because the access token was snapshotted without the refresh token or the expiry that would have explained it.

vgate stores the complete credential — token, refresh token, and expiry — for every account, tells you at a glance which ones are still good, and switches between them instantly.

It has no logout command, on purpose. vercel logout destroys the only credential on the machine. Switch instead.

Install

# Homebrew
brew tap ml-lubich/tap && brew install vgate

# pipx
pipx install vercel-mcp

# uv
uv tool install vercel-mcp

Quickstart

Log in once per account, saving each one as you go:

vercel login you@personal.com   && vgate sync
vercel login you@client.com     && vgate sync

Then switch whenever you like:

$ vgate ls
  #  email               username   teams  token
  1  you@personal.com    you           2  valid     active
  2  you@client.com      you-client    1  expiring-soon

$ vgate switch you@client.com
switched to you@client.com

$ vgate whoami
you@client.com  valid
team: client-projects

switch takes an email, a username, or the row number — so it works unattended in scripts and CI, not just as an interactive picker.

Commands

Command What it does
vgate sync Save the currently active login into the store
vgate ls List stored accounts with credential status
vgate switch <selector> Activate an account by email, username, or index
vgate use <team> Set the team the Vercel CLI acts on
vgate whoami Show the active account and team
vgate doctor Check the local setup and flag expired credentials
vgate path Print the Vercel config and store locations
vgate rm <selector> Forget a stored account (asks y/N; --yes skips, delete is an alias)
vgate agent schema Machine-readable command list (JSON) for automation

Run vgate sync after every vercel login — that is what makes an account switchable later.

MCP server

Register vgate-mcp with any MCP client to let an agent manage accounts:

{
  "mcpServers": {
    "vgate": {
      "command": "vgate-mcp"
    }
  }
}

Tools exposed: list_accounts, switch_account, whoami, use_team, doctor.

How it compares

Prior art: khanakia/vercelgate, a Go tool with the same goal.

vercelgate vercel-mcp
Stores access token ✅ ✅
Stores refresh token + expiry ❌ ✅
Detects expired credentials ❌ ✅ (ls, doctor)
Non-interactive switch ❌ arrow-key prompt only ✅ switch <email>
Backs up auth.json before overwriting ❌ ✅
MCP server for AI agents ❌ ✅
Install Go / brew pip / pipx / uv / brew

Security

  • Credentials live in ~/.config/vercel-mcp/accounts.json, written with 0600 (owner-only) permissions.
  • auth.json is copied to auth.json.bak before every switch, so a bad switch is recoverable.
  • Nothing leaves your machine except calls to api.vercel.com to identify a token.
  • No logout command exists, by design.

Development

uv sync --locked --extra dev
uv run pytest -q
uv run ruff check .

The test command enforces an aggregate line-coverage floor of 80%.

The pytest configuration measures vercel_mcp and fails the suite below 80% aggregate line coverage. Tests use isolated temporary configuration and fake HTTP responses; they do not switch real Vercel accounts or call the live API.

License

MIT © 2026 Misha Lubich

Metadata

Release files for vercel-mcp 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vercel-mcp 0.3.1
File Size Uploaded Provenance
vercel_mcp-0.3.1.tar.gz 92.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vercel-mcp 0.3.1
File Interpreter ABI Platform
vercel_mcp-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 107.5 kB

Release files / vercel_mcp-0.3.1.tar.gz

Download URL vercel_mcp-0.3.1.tar.gz
Size 92.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6de09c84b3c3ede5df2ce578df884d0500f3a886e1404f12bee652022132cfe5
BLAKE2b-256 checksum
How to use checksums
82d6b472aeb82dfbc23d828258f6418127442a49747e4489896c6f118314c2d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / vercel_mcp-0.3.1-py3-none-any.whl

Download URL vercel_mcp-0.3.1-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93e4b12260de35eba56480682a2136742e6f0da72e866f12043ffa45f629c3b2
BLAKE2b-256 checksum
How to use checksums
30c114ce0d4b5f41f85ae6247bdaeb0189b29ed567412322568e0515d48cfac3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Security for vercel-mcp 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page