v0-dev-mcp
v1.0.0
Published
MCP server for v0 AI UI generation using OpenAI-compatible API
Readme
v0-mcp
MCP (Model Context Protocol) server for v0 AI UI generation using v0's OpenAI-compatible API.
Features
- One-shot UI generation - Generate React components from text prompts without chatId management
- Image-to-code - Convert screenshots and design mockups to React components
- Iterative refinement - Multi-turn chat for refining components
- Multiple models - Support for v0-1.5-md (default), v0-1.5-lg, v0-1.0-md
Installation
npm install v0-mcpConfiguration
Set your v0 API key:
export V0_API_KEY="your-api-key-here"Optional environment variables:
V0_BASE_URL- API base URL (default:https://api.v0.dev/v1)V0_DEFAULT_MODEL- Default model (default:v0-1.5-md)V0_TIMEOUT- Request timeout in ms (default:120000)
Usage
With mcp-proxy (Recommended)
Add to your .mcp-proxy.json:
{
"childServers": {
"v0": {
"command": "npx",
"args": ["-y", "v0-mcp"],
"env": {
"V0_API_KEY": "${V0_API_KEY}"
}
}
}
}Standalone
npx v0-mcpWith Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"v0": {
"command": "npx",
"args": ["-y", "v0-mcp"],
"env": {
"V0_API_KEY": "your-api-key"
}
}
}
}Available Tools
v0_generate_ui
Generate a UI component from a text prompt.
Parameters:
prompt(required): Description of the UI component to generatecontext(optional): Additional context about design system, styling guidelinesmodel(optional): v0 model to use (v0-1.5-md,v0-1.5-lg,v0-1.0-md)stream(optional): Whether to stream the response
Example:
Generate a modern login form with email, password, and social login buttonsv0_generate_from_image
Convert an image to React component code.
Parameters:
imageUrl(required): URL of the image to convertprompt(optional): Additional instructions for the conversionmodel(optional): v0 model to use
Example:
Convert this Figma screenshot to a responsive React componentv0_chat_complete
Raw chat completion for iterative refinement.
Parameters:
messages(required): Array of chat messages with role and contentmodel(optional): v0 model to usestream(optional): Whether to stream the response
v0_check_setup
Check API connectivity and configuration.
Parameters: None
Model Selection
| Model | Description | Use Case |
|-------|-------------|----------|
| v0-1.5-md | Default, balanced | General UI components |
| v0-1.5-lg | Larger, more capable | Complex components, detailed designs |
| v0-1.0-md | Legacy | Compatibility with older prompts |
License
MIT
