Skip to content
wp2next, home
Skip to the page

MCP servers and command-line tools

wp2next talks to GitHub, Vercel and Sanity in two ways:

Your computer

Pick your computer's system. Steps that differ switch to it, and this browser remembers.

  • (CLIs): gh, vercel and sanity. These are required. wp2next runs them to create the repo, project and dataset, and wp2next doctor checks that you're logged in.
  • : connections that let your AI assistant read and change these services directly (for example, read deployment logs or look up Sanity docs). These are optional but helpful, especially when something breaks after deploy.

Both use your own login. Anything the assistant does through them, it does as you. Keep your assistant's confirmation prompts on for actions that change things.

Commands were checked in December 2026. Per-assistant details for adding MCP servers are in AI environments.

Quick setup

Install gh first:

Terminal
brew install gh

Then, the same on every system:

Terminal
gh auth login
npm i -g vercel
vercel login
npx sanity@latest login

# Check
gh auth status
vercel whoami
npx sanity@latest projects list

On Windows, vercel needs 's execution policy set once (Windows). Claude desktop users: quit and reopen the app after installing, so its sessions find the new tools.

Then run wp2next doctor (Claude desktop and : /wp2next:doctor; Codex: $wp2next doctor). It reports anything missing.

MCP in the Claude desktop app

The Claude desktop app's local Code sessions read the same MCP configuration as Claude Code in a (~/.claude.json and a project's .mcp.json) (desktop docs⁠ (external site), checked 2026-12). So the Claude Code rows below apply to the desktop app too: run the claude mcp add … commands once in a terminal (they need the Claude Code CLI; install it from the Code tab's Terminal pane as in AI environments), then start a new session. How the Code tab asks you to log in to a new server isn't documented (Not yet confirmed); if it doesn't prompt, run /mcp in the session or in claude.

The Claude app's other tabs (chat, Cowork) use connectors from your claude.ai account, not these files. When a tool such as vercel mcp offers "Claude desktop", that may mean the chat app's own configuration rather than the Code tab (Not yet confirmed); use the Claude Code command to be sure.

Vercel

CLI

Source: vercel.com, docs, cli⁠ (external site) (checked 2026-12)

Terminal
npm i -g vercel        # or: pnpm i -g vercel | yarn global add vercel | bun add -g vercel
vercel login
vercel whoami          # shows who you're logged in as
vercel switch          # pick the team wp2next should use
vercel doctor          # checks the CLI setup

Vercel's docs list only npm, , yarn and bun installs.

You'll mostly let wp2next run the rest (vercel link, vercel env add, vercel deploy). Never paste a token with --token on the command line. For automation, use the VERCEL_TOKEN , stored in your secret store (see Secrets: where wp2next keeps passwords and API keys).

vercel setup (optional)

vercel setup asks before each of two steps: it installs Vercel's plugin (for Claude Code, Codex and OpenCode) and connects your assistants to Vercel's AI Gateway. vercel setup skills separately writes a vercel-cli matching your CLI version; re-run it after upgrading the CLI. Add --dry-run to see what would change first (checked 2026-12, source⁠ (external site)). None of this is required for wp2next. Cursor gets the plugin with npx plugins add vercel/vercel-plugin.

On a wp2next project, don't run the plugin's /vercel-plugin:bootstrap command: it sets up a and Tailwind classes that clash with wp2next's rules. Which Vercel skills wp2next uses, and when, is in Companion skills.

MCP

The official Vercel MCP server is https://mcp.vercel.com. It works on every Vercel plan and logs in through your browser. Source: vercel.com, docs, agent resources, vercel mcp⁠ (external site)

AssistantAdd it
Any (detects installed assistants)npx -y add-mcp https://mcp.vercel.com -g
Claude Codeclaude mcp add --transport http vercel https://mcp.vercel.com, then /mcp to log in
Codexcodex mcp add vercel --url https://mcp.vercel.com (a browser window opens to log in)
CursorAdd "vercel": { "url": "https://mcp.vercel.com" } under mcpServers in ~/.cursor/mcp.json, then click Needs login

vercel mcp also sets it up for Claude Code, Claude desktop, Cursor and VS Code.

Vercel's security advice: check the URL is exactly mcp.vercel.com.

Sanity

CLI

Source: sanity.io, docs, cli⁠ (external site) (checked 2026-12)

You don't install it. Outside a project, put npx sanity@latest in front of each command. It runs on Node 24 (the toolchain baseline). Inside a project, use the 's own copy (pnpm --filter @<code>/studio exec sanity <command>, the same version the Studio builds with), not npx. pnpm dlx sanity@latest is only for the moment before the project's Studio exists.

Terminal
npx sanity@latest login                 # opens a browser; add --provider google|github|sanity if you like
npx sanity@latest projects list         # proves you're logged in

wp2next runs the rest for you (init, cors add, tokens create, schemas deploy, deploy). If you belong to more than one Sanity organization, wp2next asks which one to use.

MCP

The official Sanity MCP server is https://mcp.sanity.io. It includes Sanity's best-practice rules and docs search, which helps when the assistant writes schemas. Logins usually last about 7 days, then you log in again. Source: sanity.io, docs, ai, mcp server⁠ (external site)

AssistantAdd it
Any (detects installed assistants)npx sanity@latest mcp configure
Claude Codeclaude mcp add Sanity -t http https://mcp.sanity.io --scope user, then /mcp to log in
Codexnpx sanity@latest mcp configure
CursorAdd "Sanity": { "type": "http", "url": "https://mcp.sanity.io" } under mcpServers in mcp.json

mcp configure uses a browser login for Claude Code, Codex, Cursor, OpenCode and VS Code. For some other assistants it creates a token and writes it into that assistant's config file. If that happens, treat the config file as a .

Sanity's agent skills (optional)

Sanity publishes skills on schema and content-modeling best practices:

Terminal
npx skills add sanity-io/agent-toolkit                   # any assistant
/plugin install sanity@claude-plugins-official           # Claude Code plugin

Source: github.com, sanity io, agent toolkit⁠ (external site)

Which of these skills wp2next uses, and the rules it overrides (for example, no next/image), are in Companion skills.

GitHub

CLI

Source: github.com, cli.github.com⁠ (external site) (checked 2026-12)

Terminal
brew install gh        # macOS. Windows: winget install --id GitHub.cli -e. Linux: see cli.github.com
gh auth login          # choose GitHub.com, then log in with a web browser
gh auth status         # check

gh auth login stores your login in the system's credential store, not in a plain file. On Linux, GitHub rotated its package signing key on 2026-09-05; if an older install fails to update, follow the current Linux instructions.

If you'll create in an organization, make sure your account can create repos there (see Accounts and plans).

MCP

The official GitHub MCP server is https://api.githubcopilot.com/mcp/. wp2next doesn't need it, because gh covers everything. Add it if you want your assistant to work with issues and directly.

Claude Code, Codex and Cursor need a personal access token (PAT) for it. Create a fine-grained token at github.com, settings, tokens⁠ (external site) with access to only the repos you need, and store it in your .

AssistantAdd it
Claude Code (2.1.1+)claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'
Codexcodex mcp add github --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PAT_TOKEN
CursorAdd "github": { "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ${env:GITHUB_PAT}" } } under mcpServers in ~/.cursor/mcp.json

The Codex and Cursor forms are the safest: the token stays in an environment variable instead of a config file. The Claude Code command, as GitHub documents it, writes the token into ~/.claude.json, which then contains a secret: don't share or back it up somewhere public. (Claude Code does expand ${VAR} in a project's .mcp.json, but don't a GitHub MCP entry into a client's repo.)

If your organization uses Copilot Business or Enterprise, an admin must enable the "MCP servers in Copilot" policy.

Source: docs.github.com: Set up the GitHub MCP server⁠ (external site), github.com, github, github mcp server⁠ (external site)

Next.js DevTools MCP (optional, after parity sign-off)

Next.js 16 ships an MCP endpoint in its dev server, and the next-devtools-mcp server lets your assistant read build errors, routes and docs from it. wp2next uses it only during optimize, after you sign off .

Terminal
npx add-mcp next-devtools-mcp@latest      # detects your assistants

Or add {"next-devtools": {"command": "npx", "args": ["-y", "next-devtools-mcp@latest"]}} under mcpServers in the project's .mcp.json (checked 2026-12, source⁠ (external site)).

1Password MCP (optional)

If you use 1Password for secrets, its MCP server lets your assistant create 1Password Environments and add secrets without ever seeing the values: it only returns names. It is in beta, runs locally, and needs the Environments feature turned on in your 1Password account.

AssistantAdd it
Claude Code/plugin marketplace add 1Password/1password-claude-plugin, then /plugin install 1password@1password, restart, and check with /mcp
Codex (Mac and Linux)In Codex's MCP settings, choose + Add server and enter 1password-mcp as the command
CursorInstall the "1Password Developer Tools" plugin

Source: 1password.dev, environments, mcp server⁠ (external site). Other secret managers are covered in Secrets: where wp2next keeps passwords and API keys.

Forms services: Resend, HubSpot, monday.com

The new site talks to these services from its own server code (/api/contact), using keys kept in your secret store and in Vercel's environment variables. wp2next needs no CLI or MCP server for any of them. Which accounts to use and who should own them: Accounts and plans. Step-by-step setup and testing: Forms, email and CRM.

Storing the keys

Store each key once, through the secret store, so it never appears in chat, code or a command line:

Terminal
SKILL=~/.agents/skills/wp2next      # or wherever wp2next is installed (see below)
python3 "$SKILL/scripts/secrets.py" put RESEND_API_KEY      # hidden prompt; paste the key, press Enter
python3 "$SKILL/scripts/secrets.py" put HUBSPOT_SK          # only if forms go to HubSpot
python3 "$SKILL/scripts/secrets.py" put MONDAY_API_TOKEN    # only if forms go to monday.com
python3 "$SKILL/scripts/secrets.py" list                    # names only, never values

The plugin keeps its copy in Claude's own plugin folder; version.py locations lists every copy (see Scripts). In practice your prints the exact command with the right path for you.

Run these inside the new project's folder (the secret store needs its wp2next.json). doctor then reports each one as present or missing, by name only. In 11 wp2next copies them into the Vercel project's environment variables without printing them.

Resend MCP, plugin and skills (optional)

These help your assistant with itself (checking domains, reading sending logs). The form works without them (checked 2026-12, resend.com, docs, mcp server⁠ (external site), github.com, resend, resend skills⁠ (external site)):

WhatHow
Hosted MCP server (recommended)https://mcp.resend.com/mcp, sign in with your Resend account (OAuth). Claude Code: claude mcp add --transport http resend https://mcp.resend.com/mcp, then /mcp to sign in (command form Not yet confirmed for Resend specifically; it follows Claude Code's standard pattern)
Claude Code pluginclaude plugin install resend@claude-plugins-official (or /plugin install resend@claude-plugins-official in a session)
Skills, any assistantnpx skills add resend/resend-skills (installs resend, react-email, email-best-practices, resend-cli, agent-email-inbox)
Local MCP servernpx -y resend-mcp. It reads RESEND_API_KEY from its environment, so the key would sit in your MCP config file. Prefer the hosted server

Connect the MCP server to the client's Resend account only with their agreement, and never paste a Resend key into chat to "let the assistant set it up".

HubSpot and monday.com

wp2next uses plain calls to HubSpot's and monday.com's APIs from the site. Whether either company's own MCP servers or AI connectors are useful here was not checked (Not yet confirmed, 2026-12). To read board, group and column IDs in monday.com, turn on Developer mode (avatar → monday.labs) or let migrate look them up with the token once it is stored. To find a HubSpot form's GUID, open the form in HubSpot's form editor: it is usually the long ID in the address bar, and Forms, email and CRM shows other ways. Both are IDs, not secrets, and go in wp2next.json.

Other tools doctor checks

ToolWhyInstall
Node.js 24 (LTS)Runs everything; new projects pin it in .nvmrc and enginesmacOS and Linux: fnm (fnm install 24) or nvm (nvm install 24); not brew install node@24, which is keg-only. Windows: winget install --id OpenJS.NodeJS.24 -e (not OpenJS.NodeJS.LTS, which is now 26). See Quick start
pnpm 11.10.0The new project's package manager (new projects pin pnpm@11.10.0 in packageManager)npm install -g pnpm@11.10.0 (no Corepack)
Python 3Runs the helper scripts and reads the WordPress database exportxcode-select --install on macOS; the Python install manager on Windows (Windows)
GitVersion controlxcode-select --install on macOS; winget install --id Git.Git -e --source winget on Windows
LocalRuns the WordPress copylocalwp.com⁠ (external site). See Getting a WordPress site into Local.
PlaywrightTakes screenshots to compare old and new pageswp2next installs it in the new project; the browser download is pnpm --filter @<code>/web exec playwright install chromium
Google Chrome (or Chromium)Lighthouse speed and accessibility scores for the old and new sitegoogle.com, chrome⁠ (external site). wp2next adds Lighthouse to each new project itself. Without Chrome it falls back to Playwright's Chromium
Companion skills (optional)Sanity, Vercel, Next.js and Playwright guidance for the assistantwp2next init offers them. See Companion skills
impeccable (optional)Design critique, audit and polishpnpm dlx impeccable install from the project folder. See Facelift: new design, same site.

Checking it all works

In your assistant:

Code
/wp2next doctor          # Claude desktop and Claude Code plugin: /wp2next:doctor

doctor also says whether a newer wp2next is out and whether it's installed twice. See Updating wp2next and your sites.

For MCP servers specifically: Claude desktop and Claude Code claude mcp list (or /mcp in a session), Codex codex mcp list, Cursor's MCP settings page. Each server should show as connected.

If a login keeps failing, see Troubleshooting.