Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vercel-mcp

Official Vercel MCP integration for Prime Agent. The agent talks to Vercel's own MCP server — the same one used by Claude Code, ChatGPT, Cursor, and Codex CLI — so managing projects, deployments, runtime logs, and analytics works out of the box, no self-hosted proxy, no bridge, no API keys in config.

┌──────────────────────────────┐        ┌──────────────────────────────┐
│  Prime Agent kernel          │        │  Vercel (official, remote)   │
│  ┌────────────────────────┐  │  OAuth │  ┌──────────────────────────┐ │
│  │ from vercel import     │  │ 2.1    │  │ mcp.vercel.com           │ │
│  │   vercel               │  │ PKCE + │  │ projects · deployments   │ │
│  │ await vercel.list_…()  │──┼───────▶│  │ runtime logs · analytics │ │
│  └────────────────────────┘  │  dyn.  │  │ docs search · domains    │ │
│  auth.json: mcp:vercel       │  reg.  │  └──────────────────────────┘ │
└──────────────────────────────┘        └──────────────────────────────┘

Why the official server

  • Vercel-reviewed tools — 33 tools covering projects, deployments (including direct file deploys, no git/CLI needed), build logs, runtime logs, runtime errors, Web Analytics (visitors / page views / custom events), toolbar threads, domains & purchase quoting, Agent Runs observability, and documentation search.
  • Real OAuth, no tokens in your repo — a one-time browser approval issues a scoped token stored only in Prime Agent's auth.json, refreshed automatically. Nothing is committed, exported, or pasted into config.
  • Fully managed — remote, streamable-HTTP MCP. Nothing to host, update, or keep running.

Install

Requires Prime Agent with its Python kernel (bundled rlm runtime).

# 1. clone and link the skill into place
git clone https://github.com/gbrlpzz/prime-agent-vercel-mcp.git ~/prime-agent-vercel-mcp
rm -rf ~/.agents/skills/vercel
ln -s ~/prime-agent-vercel-mcp ~/.agents/skills/vercel

# 2. make the runtime aware (installs the skill + mcp SDK into the kernel venv)
~/.prime/agent/kernel-venv/bin/python -m pip install -e ~/vercel-mcp   # or: uv pip install --python ~/.prime/agent/kernel-venv/bin/python -e ~/vercel-mcp
uv pip install --python ~/.prime/agent/kernel-venv/bin/python mcp

# 3. tell Prime Agent about the server (one-time settings entry) and reload
#    mcpServers: { "vercel": { "type": "http", "url": "https://mcp.vercel.com/", "oauth": true } }
#    then run: /reload

# 4. authorize (one-time, opens your browser)
#    /mcp login vercel

For Prime Agent instances that already include this skill, steps 1–3 are done; just run /mcp login vercel.

Usage

From the agent kernel (or any Python session with rlm available):

from vercel import vercel, auth_status

auth_status()                        # {'enabled': True, 'expires_fresh': True, ...}
tools = await vercel.list_tools()    # full official tool inventory

# explicit call
out = await vercel.call_tool("list_projects", {"teamId": "team_..."})

# auto-bound call (names/args come from the live inventory)
out = await vercel.list_deployments(teamId="team_...", project="prj_...", limit=5)

Typical flow: list_teams → pick a teamIdlist_projects → project id → list_deployments / get_deployment / get_deployment_build_logs / get_runtime_logs / get_web_analytics.

Tool families (33 tools, Beta)

Family Tools
Projects list_projects, get_project, list_teams, deployment protection get/update
Deployments list_deployments, get_deployment, get_deployment_build_logs, deploy_to_vercel, get_access_to_vercel_url, web_fetch_vercel_url
Observability get_runtime_logs, get_runtime_errors, get_web_analytics
Agent Runs (eve) list_agent_run_projects, list_agent_runs, get_agent_run, get_agent_run_trace
Domains & purchases check_domain_availability_and_price, get_purchase_quote, buy_domain, get_domain_order, buy_pro, buy_credits, buy_addon
Toolbar list_toolbar_threads, get_toolbar_thread, reply_to_toolbar_thread, add_toolbar_reaction, edit_toolbar_message, change_toolbar_thread_resolve_status
Docs search_vercel_documentation

Run await vercel.list_tools() for live schemas.

Authentication & token lifecycle

  • The server implements the latest MCP Authorization + Streamable HTTP specs. Prime Agent's generic OAuth 2.1 client (PKCE S256 + dynamic client registration, RFC 7591) performs the login: it registers a local client (http://localhost:53700-53709/callback), opens your browser, and exchanges the code for a token.
  • The credential lives in ~/.prime/agent/auth.json under mcp:vercel as {type, access, refresh, expires, tokenEndpoint, clientId} (0600).
  • Refresh is automatic via the host (mcp.refresh). If the host provider was never registered, call the module-level refresh() (synchronous; wrap in asyncio.to_thread from the kernel) as a manual fallback.
  • Disconnect with /mcp logout vercel; re-authorize anytime with /mcp login vercel.

Development

python3 tests/test_skill.py        # standalone tests (no runtime needed for repo checks)
~/.prime/agent/kernel-venv/bin/python -m pytest tests/   # full suite incl. runtime-dependent tests

CI (.github/workflows/ci.yml) runs the standalone suite on every push.

Security

  • No credentials are stored in this repository or committed to git. The token is generated per-login and kept only in Prime Agent's private auth.json.
  • The integration connects only to https://mcp.vercel.com/ and Vercel's OAuth endpoints (vercel.com/oauth/*, vercel.com/api/login/oauth/*).
  • Purchasing tools (buy_*) always require a prior get_purchase_quote and never charge without an explicit quote-backed call.

License

MIT — see LICENSE. Vercel is a trademark of Vercel Inc.; this is an independent integration (see NOTICE).

About

Vercel MCP integration for Prime Agent: connects to Vercel's official MCP server (mcp.vercel.com) over OAuth to manage projects, deployments, runtime logs, Web Analytics, and docs search directly from agent sessions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages