Manage multiple Vercel CLI logins on one machine, and let AI agents switch between them via MCP.
Project description
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
$ 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 |
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vercel_mcp-0.1.0.tar.gz.
File metadata
- Download URL: vercel_mcp-0.1.0.tar.gz
- Upload date:
- Size: 91.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5589ec95e44f8f04a291503224bffe5a72bc497a8786957326f1690887950cbd
|
|
| MD5 |
2dad6d3ef628ce6d1fef2afaecf109b4
|
|
| BLAKE2b-256 |
48fa37def95e7d31e5e599e93922bea6a95651a8595e4be1ec252494e5537a87
|
File details
Details for the file vercel_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vercel_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da4714b9ddad9546de941b3473a3aafeca3fc4c00feaa3b58f89607c696b73ec
|
|
| MD5 |
5158fc83aa7bc9c3b86cdd091ee03fea
|
|
| BLAKE2b-256 |
cae5f802291b7b595d402439822cf97cf4b1461be0495670f1fb3a56d4bdbcac
|