# V0 — how to use (mcp.ai)

Connect your V0 account and use 44 tools for artificial intelligence straight from your AI agent. Connect with your own API key. v0 is an AI-powered web development assistant built by Vercel, designed to generate real, production-ready code for modern web applications.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_v0?ms=1787291220000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `v0_assign_chat_to_project`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/v0`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/v0/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/v0/assign/chat/to/project` — Tool to assign a chat to a project. Use when you need to group a conversation under a shared project context for better organization.
  - body: { chatId: string, projectId: string }
- `POST https://api.mcp.ai/api/v0/chat/completions` — Tool to generate a chat model response given a list of messages. Use when you need AI-powered conversational replies via the v0 API. Note: This action uses the POST /chats endpoint which creates a per
  - body: { model?: string, tools?: object[], stream?: boolean, messages: object[], tool_choice?: string|object }
- `POST https://api.mcp.ai/api/v0/create/hook/v0` — Tool to create a new webhook subscription for receiving event notifications. Use when you need to listen for chat or message events from v0.
  - body: { url: string, name: string, chatId?: string, events: string[] }
- `POST https://api.mcp.ai/api/v0/create/project` — Tool to create a new v0 project container for chats and code generation. Use when you need to start a clean project with specific configuration.
  - body: { icon?: string, name: string, privacy?: string, description?: string, instructions?: string, vercelProjectId?: string, environmentVariables?: object[] }
- `POST https://api.mcp.ai/api/v0/create/project/env/vars` — Tool to create new environment variables for a v0 project. Use when you need to add environment variables to a project. By default, fails if any keys already exist unless upsert is set to true.
  - body: { upsert?: boolean, decrypted?: string, projectId: string, environmentVariables: object[] }
- `POST https://api.mcp.ai/api/v0/create/vercel/project` — Tool to link a Vercel project to an existing v0 project. Use when you need to enable Vercel-related features and deployment integration for a v0 project.
  - body: { name: string, projectId: string }
- `POST https://api.mcp.ai/api/v0/delete/chat` — Tool to permanently delete a specific chat by ID. Use when you need to remove a chat and all its contents irreversibly.
  - body: { chatId: string }
- `POST https://api.mcp.ai/api/v0/delete/deployment` — Tool to delete a deployment by ID from Vercel. Use when you need to remove a specific deployment permanently.
  - body: { deploymentId: string }
- `POST https://api.mcp.ai/api/v0/delete/hook` — Tool to delete a webhook by its ID. Use when you need to remove a webhook subscription. This action is irreversible.
  - body: { hookId: string }
- `POST https://api.mcp.ai/api/v0/delete/project/env/vars/v0` — Tool to delete multiple environment variables from a project by their IDs. Use when you need to remove environment variables from a v0 project.
  - body: { projectId: string, environmentVariableIds: string[] }
- `POST https://api.mcp.ai/api/v0/delete/v0/project` — Tool to permanently delete a v0 project by its ID. Use when you need to remove a project and optionally all its associated chats. This operation is irreversible.
  - body: { projectId: string, deleteAllChats?: string }
- `POST https://api.mcp.ai/api/v0/deploy/project` — Tool to deploy a specific v0 chat version to Vercel. Use when you need to create a live deployment with public URLs after generating code via v0.
  - body: { chatId: string, projectId: string, versionId: string }
- `POST https://api.mcp.ai/api/v0/download/chat/version` — Tool to download all files for a specific chat version as a zip or tarball archive. Use when you need to retrieve a complete downloadable archive of a version's files, optionally including deployment 
  - body: { chatId: string, format?: string, versionId: string, includeDefaultFiles?: string }
- `POST https://api.mcp.ai/api/v0/export/project/code` — Tool to export a deployable snapshot of a v0 chat version by retrieving all files (including default/deployment files). Use when you need to get the complete generated code for a specific version, rea
  - body: { chatId: string, versionId: string, includeDefaultFiles?: string }
- `POST https://api.mcp.ai/api/v0/favorite/chat` — Tool to mark a chat as favorite or remove the favorite status. Use when you need to organize and quickly access important chats.
  - body: { chatId: string, isFavorite: boolean }
- `POST https://api.mcp.ai/api/v0/find/chats` — Tool to retrieve a list of chats. Use when you need to list user chats with pagination and optional favorite filtering after authentication.
  - body: { limit?: integer, offset?: integer, isFavorite?: boolean }
- `POST https://api.mcp.ai/api/v0/find/projects` — Tool to retrieve a list of projects associated with the authenticated user. Use after obtaining a valid API key.
  - body: { after?: string, limit?: integer }
- `POST https://api.mcp.ai/api/v0/find/vercel/projects` — Tool to retrieve a list of Vercel projects linked to the user's v0 workspace. Use when you need to discover available Vercel projects for deployment or integration purposes.
  - body: { after?: string, limit?: integer }
- `POST https://api.mcp.ai/api/v0/fork/chat` — Tool to create a fork (copy) of an existing chat. Use when you need to explore alternative directions without modifying the original conversation.
  - body: { chatId: string, privacy?: string, versionId?: string }
- `POST https://api.mcp.ai/api/v0/get/chat` — Tool to retrieve the full details of a specific chat using its chatId. Use when you need to access chat messages, metadata, and configuration for a specific chat.
  - body: { chatId: string }
- `POST https://api.mcp.ai/api/v0/get/chat/project` — Tool to retrieve the v0 project associated with a given chat. Use when you need to determine the context or scope of a chat session.
  - body: { chatId: string }
- `POST https://api.mcp.ai/api/v0/get/deployment/errors` — Tool to retrieve errors for a specific deployment. Use when diagnosing and debugging deployment issues.
  - body: { deploymentId: string }
- `POST https://api.mcp.ai/api/v0/get/deployment/logs` — Tool to retrieve logs for a specific deployment. Use when you need to debug or monitor deployment behavior by fetching log entries, optionally filtered by timestamp.
  - body: { since?: integer, deploymentId: string }
- `POST https://api.mcp.ai/api/v0/get/hook` — Tool to retrieve detailed information about a specific webhook by its ID. Use when you need to inspect webhook configuration, subscribed events, or target URL.
  - body: { hookId: string }
- `POST https://api.mcp.ai/api/v0/get/message` — Tool to retrieve detailed information about a specific message within a chat. Use when you need to access message content, metadata, attachments, or model configuration for a known message ID.
  - body: { chatId: string, messageId: string }
- `POST https://api.mcp.ai/api/v0/get/project` — Tool to retrieve the details of a specific v0 project by its ID, including associated chats and metadata. Use when you need to inspect project configuration or access related chats.
  - body: { projectId: string }
- `POST https://api.mcp.ai/api/v0/get/project/env/var` — Tool to retrieve a specific environment variable for a given project by its ID, including its value. Use when you need to get the details of a particular environment variable for a project.
  - body: { decrypted?: string, projectId: string, environmentVariableId: string }
- `POST https://api.mcp.ai/api/v0/get/rate/limits` — Tool to retrieve the current rate limits for the authenticated user. Use when you need to monitor usage limits and avoid throttling.
  - body: { scope?: string }
- `POST https://api.mcp.ai/api/v0/get/usage/report/v0` — Tool to retrieve detailed usage events including costs, models used, and metadata. Use when you need to access usage data from the dashboard, filter by chat/user, or analyze costs.
  - body: { limit?: integer, chatId?: string, cursor?: string, userId?: string, endDate?: string, messageId?: string, startDate?: string }
- `POST https://api.mcp.ai/api/v0/get/user` — Tool to retrieve the currently authenticated user's information. Use when you need to get the user's ID, name, email, avatar, or account metadata.
- `POST https://api.mcp.ai/api/v0/get/user/billing` — Tool to fetch billing usage and quota information for the authenticated user. Use when you need to check the user's billing details or usage metrics. Can be scoped to a specific project or namespace.
  - body: { scope?: string }
- `POST https://api.mcp.ai/api/v0/get/user/plan/v0` — Tool to retrieve the authenticated user's subscription plan details including billing cycle and balance. Use to check plan status and usage limits.
- `POST https://api.mcp.ai/api/v0/get/user/scopes` — Tool to retrieve all accessible scopes for the authenticated user, such as personal workspaces or shared teams. Use when you need to understand which workspaces the user can access.
- `POST https://api.mcp.ai/api/v0/init/v0/chat` — Tool to initialize a new chat from source content such as files, repositories, registries, zip archives, or templates. Use when you need to start a new v0 chat session with pre-populated content. Init
  - body: { zip?: object, name?: string, repo?: object, type?: string, files?: object[], registry?: object, projectId?: string, templateId?: string, chatPrivacy?: string }
- `POST https://api.mcp.ai/api/v0/list/chat/versions` — Tool to retrieve all versions (iterations) for a specific chat, ordered by creation date (newest first). Use when you need to view the history of a chat's generated versions with cursor-based paginati
  - body: { limit?: integer, chatId: string, cursor?: string }
- `POST https://api.mcp.ai/api/v0/list/deployments` — Tool to retrieve a list of deployments for a given project, chat, and version. Use when you need to check existing deployments for specific project versions.
  - body: { chatId: string, projectId: string, versionId: string }
- `POST https://api.mcp.ai/api/v0/list/hooks` — Tool to retrieve all webhooks tied to chat events or deployments. Use when you need to list configured webhooks after authentication.
  - body: { after?: string, limit?: integer }
- `POST https://api.mcp.ai/api/v0/list/messages` — Tool to retrieve all messages within a specific chat. Use when you need to list messages with content, role, and type information. Supports pagination for chats with many messages.
  - body: { limit?: integer, chatId: string, cursor?: string }
- `POST https://api.mcp.ai/api/v0/list/project/env/vars` — Tool to retrieve all environment variables for a project with optional decryption. Use when you need to view project configuration or secrets.
  - body: { decrypted?: string, projectId: string }
- `POST https://api.mcp.ai/api/v0/update/chat` — Tool to update metadata of an existing v0 chat. Use when you need to rename a chat or change its privacy setting after creation.
  - body: { name?: string, chatId: string, privacy?: string }
- `POST https://api.mcp.ai/api/v0/update/chat/version` — Tool to update source files of a specific chat version. Use when you need to manually edit generated files through the API.
  - body: { files: object[], chatId: string, versionId: string }
- `POST https://api.mcp.ai/api/v0/update/hook` — Tool to update the configuration of an existing webhook, including its name, event subscriptions, or target URL. Use when you need to modify webhook settings after creation.
  - body: { url?: string, name?: string, events?: string[], hookId: string }
- `POST https://api.mcp.ai/api/v0/update/project` — Tool to update the metadata of an existing v0 project using its projectId. Use when you need to change the project name, description, instructions, or privacy setting.
  - body: { name?: string, privacy?: string, projectId: string, description?: string, instructions?: string }
- `POST https://api.mcp.ai/api/v0/update/project/env/vars` — Tool to update environment variables for a v0 project. Use when you need to modify the values of existing environment variables.
  - body: { decrypted?: string, projectId: string, environmentVariables: object[] }

## Example prompts
- "What can I do in V0?"
- "Show me a summary of my V0 account"

## More
- Page: https://mcp.ai/v0
- Agent spec (llms.txt): https://mcp.ai/v0/llms.txt
- Postman collection: https://mcp.ai/v0/postman.json
