// mcp server · stdio · 3 tools

Generate UI from the tools you already use.

v0's model behind an MCP server. Prompt a component, iterate a chat, deploy to production — over stdio, in any MCP client.

cursor · ~/.cursor/mcp.json
{
  "mcpServers": {
    "v0": {
      "command": "npx",
      "args": ["-y", "v0-mcp-server"],
      "env": {
        "V0_API_KEY": "your-key"
      }
    }
  }
}
claude code
claude mcp add v0 -e V0_API_KEY=your-key -- npx -y v0-mcp-server
01

Three tools

Three tools over MCP, spoken over stdio. Your editor or agent sends a tool name and arguments; the server returns structured responses.

  • generate01

    Prompt → UI. Returns chatId, webUrl, and files (path + content). Pass chatId to iterate an existing chat.

  • request02

    Generic {resource, action, params} dispatcher — deploy, chats, versions, projects, env vars, reports.

  • search03

    On-demand manifest of every resource, action, and parameter. Ask before an unfamiliar request.

02

Example

Call generate with a prompt. The response includes chatId, webUrl, and files (path + content).

request
{
  "tool": "generate",
  "arguments": {
    "prompt": "A responsive card component with an avatar, name, role, and follow button."
  }
}
response
// components/profile-card.tsx
import { Avatar, AvatarImage, AvatarFallback }
  from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"

interface ProfileCardProps {
  name: string
  role: string
  avatarUrl?: string
}

export function ProfileCard({
  name,
  role,
  avatarUrl,
}: ProfileCardProps) {
  return (
    <div className="flex items-center justify-between
      rounded-xl border border-border bg-card p-4
      shadow-sm">
      <div className="flex items-center gap-3">
        <Avatar>
          <AvatarImage src={avatarUrl} alt={name} />
          <AvatarFallback>
            {name.slice(0, 2).toUpperCase()}
          </AvatarFallback>
        </Avatar>
        <div>
          <p className="text-sm font-medium
            text-foreground">{name}</p>
          <p className="text-xs text-muted-foreground">
            {role}
          </p>
        </div>
      </div>
      <Button size="sm" variant="outline">
        Follow
      </Button>
    </div>
  )
}
03

Next steps