Deploy from Claude Code, Cursor, or Windsurf
Varity works with AI coding tools. Install the MCP server once, and your AI editor can build and deploy apps to production without you ever leaving the chat.
Works with Claude Code, Cursor, Windsurf, VS Code (Copilot), and any other editor that supports the Model Context Protocol.
Install the MCP server
Section titled “Install the MCP server”Run this once from any directory:
claude mcp add varity -- npx -y @varity-labs/mcpClaude Code picks up the server automatically on the next conversation. Confirm it is registered:
claude mcp listYou should see varity in the list.
Create .cursor/mcp.json in your project root:
{ "mcpServers": { "varity": { "command": "npx", "args": ["-y", "@varity-labs/mcp"] } }}Restart Cursor. The Varity tools appear in the MCP tool list under the agent panel.
Add to ~/.codeium/windsurf/mcp_config.json:
{ "mcpServers": { "varity": { "command": "npx", "args": ["-y", "@varity-labs/mcp"] } }}Restart Windsurf to load the server.
Add to .vscode/mcp.json in your workspace:
{ "mcpServers": { "varity": { "command": "npx", "args": ["-y", "@varity-labs/mcp"] } }}Deploy with one prompt
Section titled “Deploy with one prompt”Once the MCP server is installed, type this in your AI editor:
Deploy this project to VarityYour AI editor calls varity_build and varity_deploy in sequence and returns the live URL. Varity builds from the project’s GitHub repository, so the project needs a GitHub origin. Without one, the deploy stops with NO_DEPLOY_SOURCE; ask your AI editor to push the project with varity_create_repo (this needs the GitHub CLI signed in or a GITHUB_TOKEN).
For a brand new project, ask your AI editor to build the app first, then deploy it:
Build a Next.js app called my-app with a dashboard, install dependencies, then deploy it to productionYour AI editor writes the app code, then the Varity tools handle dependency installation, the production build, and the deploy. You get a live URL when it is done.
Copy-paste prompts
Section titled “Copy-paste prompts”These prompts are tested and work out of the box in Claude Code, Cursor, and Windsurf.
Check environment
Check if my environment is ready for VarityBuild a new app
Build a Next.js app called my-project with a dashboard, install dependencies, start the dev server, and open it in my browserDeploy to production
Build my project and deploy it to Varity. Show me the live URL when done.Check status
Show me the status of my Varity deploymentsDebug a running app
Show me the runtime logs for my last Varity deploymentEstimate cost
How much does it cost to host this app on Varity?Full build-to-deploy flow
Check my Varity environment, then build this project, deploy it, and open the live URL in my browserWhat the MCP server can do
Section titled “What the MCP server can do”The Varity MCP server gives your AI editor a full set of tools. Here are the most useful ones for the build-to-deploy workflow:
| Tool | What to ask your AI |
|---|---|
varity_doctor | “Check if my environment is set up for Varity” |
varity_login | “Log in to Varity” |
varity_search_docs | “Search the Varity docs for Docker image deploys” |
varity_install_deps | “Install dependencies for this project” |
varity_dev_server | “Start the dev server and open it in my browser” |
varity_open_browser | “Open the deployed app in my browser” |
varity_build | “Build this project for production” |
varity_create_repo | “Create a GitHub repo and push this project” |
varity_deploy | “Deploy this to Varity” |
varity_deploy_status | “Show me my deployment status” |
varity_deploy_logs | “Show me the runtime logs” (dynamic apps only; static sites have no runtime logs) |
varity_set_env | Does not accept values; it points you to a secret-safe way to set them |
varity_redeploy | “Redeploy this app in place” |
varity_delete_deployment | “Tear down this deployment” |
varity_migrate | “Migrate my Vercel app to Varity” |
varity_cost_calculator | “How much does the web-app profile cost?” |
varity_list_templates | “What templates can Varity deploy?” |
varity_template_info | “What does this template need?” |
Full reference at MCP Server Spec.
Add Varity context to your project
Section titled “Add Varity context to your project”For Claude Code, add this to your project’s CLAUDE.md:
## Deployment
This project deploys to Varity. Use the Varity MCP server tools:- Deploy: ask "Deploy this project to Varity"- Check status: ask "Show me my Varity deployment status"- Logs: ask "Show me the runtime logs for my last deployment"For Cursor, save this as .cursor/rules/varity.mdc:
When the user asks to deploy, use the Varity MCP varity_deploy tool.When the user asks to check deployment status, use varity_deploy_status.When the user asks to see logs, use varity_deploy_logs.This tells your AI editor to route deploy-related requests to the Varity tools automatically.
Typical build-to-deploy session
Section titled “Typical build-to-deploy session”Here is a complete session from idea to live app, using only your AI editor:
-
Check your setup
Check if my environment is ready for VarityThe AI runs
varity_doctorand tells you if anything needs fixing. -
Build the app
Build a Next.js app called task-tracker. I want a dashboard where users can create and manage tasks.Your AI editor writes the project code: a Next.js app with a dashboard for creating and managing tasks.
-
Install dependencies
Install dependencies and start the dev serverThe AI runs
varity_install_depsandvarity_dev_server, then openslocalhost:3000. -
Build the feature
Work with your AI editor to build the task feature:
Add a tasks data model with title (string), status (string), and dueDate (string) fields. Include a dashboard page with a list and a create form. -
Deploy to production
Build and deploy this to VarityThe AI calls
varity_buildandvarity_deploy, then reports the live URL. -
Share the link
Show me the live URL for my deploymentDone. Send it to anyone.
Migrating from Vercel
Section titled “Migrating from Vercel”If you already have a Vercel app, one prompt migrates it to Varity:
Migrate my Vercel app at https://github.com/your-org/your-app to VarityThe AI calls varity_migrate, which clones the repository, removes Vercel-specific configuration, and deploys to Varity infrastructure. See Migrate from Vercel for details.
Browser-based AI tools (Claude.ai, ChatGPT)
Section titled “Browser-based AI tools (Claude.ai, ChatGPT)”The hosted endpoint mcp.varity.so is retired. Browser-based tools that only accept a remote MCP URL are not supported today; use the stdio package (npx -y @varity-labs/mcp) from Claude Code, Cursor, VS Code, or Windsurf, or the llms.txt context files for LLMs without MCP support.
Troubleshooting
Section titled “Troubleshooting”“varity not found” in your AI editor
Re-add the server and restart:
# Claude Codeclaude mcp add varity -- npx -y @varity-labs/mcpVerify with claude mcp list.
Deploy fails with “varitykit not found”
pipx install varitykitThen ask your AI to try again.
Cursor does not show the Varity tools
Check that .cursor/mcp.json is valid JSON, then restart Cursor. Cursor requires a full restart (not just reload) to pick up MCP config changes.
Server is registered but tools are not being called
Ask your AI directly:
Use the varity_doctor tool to check my environmentIf the AI is not picking up the tools automatically, being explicit about the tool name always works.
See MCP Server Spec for the full troubleshooting section.
Next steps
Section titled “Next steps”- MCP Server Spec: The full tool reference
- Deploy a Next.js App: Full Next.js deploy walkthrough
- Migrate from Vercel: One-command Vercel migration
- Auto-wired Services: What gets provisioned automatically