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.
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
logoutcommand, on purpose.vercel logoutdestroys 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 with0600(owner-only) permissions. auth.jsonis copied toauth.json.bakbefore every switch, so a bad switch is recoverable.- Nothing leaves your machine except calls to
api.vercel.comto identify a token. - No logout command exists, by design.
Development
uv venv
uv pip install -e ".[dev]"
uv run pytest -q
uv run ruff check .
License
MIT © 2026 Misha Lubich
Metadata
Release files for vercel-mcp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vercel_mcp-0.3.0.tar.gz | 96.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vercel_mcp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 110.8 kB
Release files / vercel_mcp-0.3.0.tar.gz
| Download URL | vercel_mcp-0.3.0.tar.gz |
|---|---|
| Size | 96.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16aac438d115fcad7f2e94a8d7689678ea4a192bf544c38d50dc42c51372f27e
|
|
BLAKE2b-256 checksum How to use checksums |
c09b33a93ea10130c15231da960a82c31489a8dcac7d3f24f93a59e4abc2c40b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vercel_mcp-0.3.0-py3-none-any.whl
| Download URL | vercel_mcp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7ab6b47a01f6c28782a162f4789d7c7c39bedc73e806cafa80336cde72fc463
|
|
BLAKE2b-256 checksum How to use checksums |
afac0d7836ff009fab14be8a4c2aea703cb861a8cad0f74ff07148c63fdced70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|