Skip to main content
Glama

v0-mcp

English | δΈ­ζ–‡

Vercel v0 MCP Server for Claude Code - Generate beautiful UI components using AI through the Model Context Protocol.

✨ Collaborative Development: This project was built through innovative collaboration between Claude Code and Gemini CLI using Vibe Coding methodology - demonstrating the power of AI-assisted development workflows.

🎯 Features

  • Generate UI Components: Create React components from natural language descriptions

  • Image to UI: Convert design images into working React code

  • Chat-based Iteration: Iteratively refine components through conversation

  • Multiple Models: Support for v0-1.5-md, v0-1.5-lg, and v0-1.0-md

  • TypeScript Support: Full type safety with Zod schema validation

  • Streaming Support: Real-time generation progress

Related MCP server: ExpoSnap

πŸš€ Quick Start

# 1. Clone and enter the project
git clone <repository-url> && cd v0-mcp

# 2. Install dependencies
npm install

# 3. Create .env file and add your v0 API key
npm run setup
# Edit .env file with your V0_API_KEY

# 4. Build the project
npm run build

# 5. Add to Claude Code (ensure you are in the project root)
claude mcp add v0-mcp --env V0_API_KEY=$(grep V0_API_KEY .env | cut -d '=' -f2) -- node $(pwd)/dist/main.js

# 6. Start using it in Claude Code!
# Try: "Hey v0-mcp, create a login form with email and password fields"

πŸ›  Installation

1. Clone or Download

git clone <repository-url>
cd v0-mcp

2. Install Dependencies

npm install

3. Setup Environment

npm run setup
# Edit .env file with your v0 API key

4. Build Project

npm run build

βš™οΈ Configuration

πŸ”‘ Getting Your v0 API Key

Before configuring v0-mcp, you'll need a v0 API key:

  1. Visit the v0 Model API documentation

  2. Sign in to your Vercel account

  3. Navigate to the API Keys section

  4. Generate a new API key

  5. Copy and save your key securely

Claude Code Integration

πŸ“– Quick setup guide - choose the method that works best for you

  1. Add v0-mcp using the Claude Code CLI:

    # Navigate to your v0-mcp directory first
    cd /path/to/your/v0-mcp
    
    # Add the MCP server using current directory
    claude mcp add v0-mcp -- node $(pwd)/dist/main.js
  2. Set your v0 API key:

    Option A: Add key during CLI setup

    # When adding the server, include the API key (run from v0-mcp directory)
    claude mcp add v0-mcp --env V0_API_KEY=your_v0_api_key_here -- node $(pwd)/dist/main.js

    Option B: Edit .claude.json file after setup

    After running the claude mcp add command, edit the generated .claude.json file:

    {
      "mcpServers": {
        "v0-mcp": {
          "type": "stdio",
          "command": "node",
          "args": ["/absolute/path/to/your/v0-mcp/dist/main.js"],
          "env": {
            "V0_API_KEY": "your_v0_api_key_here"
          }
        }
      }
    }

    Option C: System environment variable (Most secure)

    # Add to your shell profile (.bashrc, .zshrc, etc.)
    echo 'export V0_API_KEY="your_v0_api_key_here"' >> ~/.zshrc
    
    # Reload your shell configuration
    source ~/.zshrc
  3. Verify your setup:

    claude mcp list
    node scripts/verify-claude-code-setup.js

    βœ… Expected Output:

    Verifying v0 API connection...
    βœ“ v0-mcp server found in Claude configuration
    βœ“ API key is configured
    βœ“ Successfully connected to v0 API
    Setup is complete! You can now use v0-mcp in Claude Code.

Method 2: Manual Configuration (Advanced)

  1. Create or edit the Claude Code configuration file:

    • macOS/Linux: ~/.claude.json

    • Windows: %USERPROFILE%\.claude.json

  2. Add the v0-mcp server configuration:

{
  "mcpServers": {
    "v0-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/v0-mcp/dist/main.js"],
      "env": {
        "V0_API_KEY": "your_v0_api_key_here"
      }
    }
  }
}
  1. Restart Claude Code for the changes to take effect.

Verification

After configuration, you should see v0-mcp tools available in Claude Code:

  • βœ… v0_generate_ui - Generate UI components from text

  • βœ… v0_generate_from_image - Generate UI from image references

  • βœ… v0_chat_complete - Iterative UI development chat

  • βœ… v0_setup_check - Verify API connectivity

πŸ”— Why Use MCP (Model Context Protocol)?

MCP Benefits:

  • Seamless Integration: Tools appear natively in Claude without API juggling

  • Enhanced Context: Claude understands your v0 workflow and provides better assistance

  • Real-time Availability: Tools are always accessible during your coding sessions

  • Type Safety: Full parameter validation and error handling built-in

  • Persistent State: Maintains conversation context across tool calls

How It Works: When you mention v0-mcp or UI generation in Claude, the tools automatically become available. Claude can intelligently choose the right tool based on your request, making the development process feel natural and integrated.

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "v0-mcp": {
      "command": "node",
      "args": ["/path/to/v0-mcp/dist/main.js"],
      "env": {
        "V0_API_KEY": "your_v0_api_key_here"
      }
    }
  }
}

Cursor Integration

Add to your Cursor MCP configuration:

{
  "mcpServers": {
    "v0-mcp": {
      "command": "node",
      "args": ["/path/to/v0-mcp/dist/main.js"],
      "env": {
        "V0_API_KEY": "your_v0_api_key_here"
      }
    }
  }
}

πŸ”§ Available Tools

v0_generate_ui

Generate UI components from text descriptions.

Parameters:

  • prompt (required): Description of the UI component

  • model: v0 model to use (default: v0-1.5-md)

  • stream: Enable streaming response (default: false)

  • context: Optional existing code context

v0_generate_from_image

Generate UI components from image references.

Parameters:

  • imageUrl (required): URL of the reference image

  • prompt: Additional instructions

  • model: v0 model to use (default: v0-1.5-md)

v0_chat_complete

Chat-based UI development with conversation context.

Parameters:

  • messages (required): Array of conversation messages

  • model: v0 model to use (default: v0-1.5-md)

  • stream: Enable streaming response (default: false)

v0_setup_check

Validate v0 API configuration and connectivity.

πŸ”‘ Environment Variables

Variable

Required

Default

Description

V0_API_KEY

βœ…

-

Your v0 API key

V0_BASE_URL

❌

https://api.v0.dev/v1

v0 API base URL

V0_DEFAULT_MODEL

❌

v0-1.5-md

Default model to use

V0_TIMEOUT

❌

60000

API timeout (ms)

MCP_SERVER_NAME

❌

v0-mcp

MCP server name

LOG_LEVEL

❌

info

Logging level

πŸš€ Usage Examples

In Claude Code

Once configured, you can use v0-mcp in multiple ways:

Direct v0-mcp Usage

Simply mention v0-mcp in your request, and Claude will automatically select the appropriate tool:

Hey v0-mcp, create a modern login form with email and password fields
v0-mcp: Generate a dashboard component with charts and KPI cards
@v0-mcp convert this wireframe to a React component: [image URL]

Specific Tool Usage

Generate a Login Form
Use v0_generate_ui to create a modern login form with email, password fields, and a blue submit button with rounded corners.
Convert Design to Code
Use v0_generate_from_image with this Figma design URL: https://example.com/design.png
Iterative Development
Use v0_chat_complete to refine the previous login form by adding a "Remember me" checkbox and "Forgot password" link.
Check API Setup
Use v0_setup_check to verify your v0 API connection and configuration.

Advanced Usage Examples

Creating a Dashboard Component

Use v0_generate_ui with the following prompt:
"Create a modern dashboard component with a sidebar navigation, header with user profile dropdown, and a main content area with grid layout for cards. Include metrics cards showing KPIs with charts. Use shadcn/ui components and Tailwind CSS."

Building from a Wireframe

Use v0_generate_from_image with your wireframe image URL and add:
"Convert this wireframe into a fully functional React component. Add proper spacing, modern styling, and make it responsive for mobile devices."

Iterative Refinement

Use v0_chat_complete with conversation history:
[
  {"role": "user", "content": "Create a pricing table component"},
  {"role": "assistant", "content": "[Previous pricing table code]"},
  {"role": "user", "content": "Add a popular plan highlight and annual/monthly toggle"}
]

πŸ§ͺ Development

# Development mode with hot reload
npm run dev

# Type checking
npm run lint

# Run tests
npm test

# Test with coverage
npm run test:coverage

# Test in CI mode
npm run test:ci

# Clean build artifacts
npm run clean

# Test configuration
npm run test:config

# Test basic functionality
npm run test:basic

# Verify Claude Code setup
npm run verify:claude-code

πŸ›‘οΈ Enhanced Features

Structured Logging

  • Winston-based logging with JSON format

  • Contextual information for API calls and tool usage

  • Error tracking with stack traces and metadata

  • Configurable log levels via LOG_LEVEL environment variable

Advanced Error Handling

  • Categorized error types (API, Network, Timeout, Rate Limit, etc.)

  • Retry logic with exponential backoff for transient errors

  • User-friendly error messages with actionable guidance

  • Comprehensive error metadata for debugging

Testing Infrastructure

  • Jest testing framework with TypeScript support

  • Comprehensive unit tests for all core components

  • Test coverage reporting with configurable thresholds

  • Mock implementations for external dependencies

Improved Reliability

  • Input validation using Zod schemas

  • Graceful error handling for all failure modes

  • Performance monitoring with request timing

  • Health checks for API connectivity

πŸ’– Support This Project

If you find this project helpful, please consider supporting it:

Buy Me A Coffee

Your support helps maintain and improve v0-mcp!

πŸ“„ License

MIT

Available Tools

4 tools
v0_chat_completeA

Have a conversation with v0 for iterative UI development. Allows back-and-forth refinement of UI components.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNov0 model to use for generationv0-1.5-md
streamNoWhether to stream the response
messagesYesConversation history for context-aware generation

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It only states the high-level purpose (conversation for UI refinement) but does not disclose behavioral details such as whether it is read-only, if it modifies resources, how it handles conversation history, or what the response format is. This is similar to the update_drive example where mutation details were omitted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary purpose, and contains no filler. Every word contributes to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The schema covers parameters well, but the description is thin on return value and behavioral specifics. It lacks an output schema, and the description does not explain what the tool returns (e.g., a completion message), which would be helpful for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides full descriptions for all three parameters (model, stream, messages), so the description adds no additional parameter meaning. Baseline of 3 is appropriate since schema coverage is 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb+resource: 'Have a conversation with v0 for iterative UI development.' It distinguishes from sibling tools by emphasizing 'back-and-forth refinement of UI components,' which contrasts with the generation-focused tools like v0_generate_ui and v0_generate_from_image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for use: iterative UI development and refinement. However, it does not explicitly mention alternatives or when not to use this tool, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

v0_generate_from_imageA

Generate UI components from an image reference. Analyzes the provided image and creates corresponding React components.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNov0 model to use for generationv0-1.5-md
promptNoOptional additional instructions for the generation
imageUrlYesURL of the image to analyze and convert to UI components

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears the full burden of behavioral disclosure. It only restates the action (analyzes and creates React components) without mentioning side effects, prerequisites, failure modes, or security implications of fetching an image URL. This is insufficient for a tool that performs an external network request.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences that front-load the core purpose and add no redundant words. Every sentence earns its place, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a low-complexity tool with a clear schema and no output schema, the description adequately conveys that it takes an image URL and produces React components. It lacks a few contextual hints (e.g., need for accessible URL), but overall it is sufficient for an agent to understand what happened.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with descriptions for all three parameters, including the enum and format for model and imageUrl. The description adds no extra parameter meaning beyond the schema, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb and resource: 'Generate UI components from an image reference.' It distinguishes itself from the sibling 'v0_generate_ui' by explicitly referencing image input, making its scope obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage context is implied by the descriptionβ€”use this tool when you have an image referenceβ€”but there is no explicit guidance on when to prefer it over alternatives like 'v0_generate_ui' or when not to use it. No exclusions or alternative tool references are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

v0_generate_uiA

Generate UI components using v0 AI. Creates React components with TypeScript and Tailwind CSS based on natural language descriptions.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNov0 model to use for generationv0-1.5-md
promptYesDetailed description of the UI component to generate (e.g., "A modern login form with email, password fields and a blue submit button")
streamNoWhether to stream the response (shows generation progress)
contextNoOptional context or existing code to build upon

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the output type but does not clarify whether the tool writes files, returns code, or has side effects. It lacks important details like permissions, rate limits, or what happens on invocation, creating ambiguity for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that front-load the primary purpose. There is no wasteful or repetitive content; every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose and tech stack, but without an output schema, it should clarify what the tool returns or does with the generated components. The schema handles parameter details, but the overall operational context (e.g., response format, side effects, or integration behavior) is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% parameter coverage, so the baseline is 3. The description's mention of 'natural language descriptions' aligns with the 'prompt' parameter, but adds no additional meaning beyond what the schema already specifies. The schema's descriptions are sufficiently detailed for each parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Generate', 'Creates') and resource ('UI components', 'React components with TypeScript and Tailwind CSS'). It also distinguishes itself from the sibling v0_generate_from_image by specifying 'based on natural language descriptions', which signals the input type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for text-based UI generation but does not explicitly state when to use this tool vs alternatives like v0_generate_from_image. There is no mention of exclusions or alternative tools, leaving the agent to infer usage from the description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

v0_setup_checkA

Check v0 API configuration and connectivity. Validates API key and endpoint accessibility.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool validates API key and endpoint accessibility, implying a read-only connectivity test. However, it doesn't disclose return format, success/failure behavior, or whether any side effects occur.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no filler. Front-loads the purpose and adds a clarifying detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a simple 0-parameter check tool, but without an output schema, it should ideally mention what the response includes (e.g., status or error details). This omission makes it slightly incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the base score is 4. The schema is empty with 100% coverage, and no parameter semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Check' and identifies the resource as 'v0 API configuration and connectivity'. It further clarifies it validates API key and endpoint accessibility, which clearly distinguishes it from sibling generation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternative guidance is provided. Usage is implied from the tool being a 'check' step, but it doesn't state when to run it versus the generation tools. This makes it adequate but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • First observedv0_chat_complete
    • First observedv0_generate_from_image
    • First observedv0_generate_ui
    • First observedv0_setup_check

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: one-shot text generation, image-based generation, setup validation, and conversational refinement. No two tools overlap in a way that would confuse an agent.

Naming Consistency4/5

The naming pattern is mostly consistent with v0_<verb>_<target> (generate_ui, generate_from_image, chat_complete), but v0_setup_check deviates slightly as a noun phrase rather than verb-first. Overall still readable and predictable.

Tool Count5/5

With 4 tools, the server is well-scoped for its purpose of UI generation. Each tool covers a necessary mode of interaction (text, image, chat, configuration), and there are no redundant or excessive additions.

Completeness5/5

The tool surface covers the core workflow: generating from text or image, iterating via chat, and verifying setup. There are no obvious dead ends for typical usage, and the domain is fully addressed.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables developers to generate beautiful, modern UI components through natural language descriptions. Integrates with popular IDEs to instantly create and customize React components inspired by 21st.dev's component library.
    4
    18
    ISC
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to view and analyze screenshots from React Native/Expo applications for AI-powered mobile UI development. Integrates with Claude, Cursor, VS Code and other MCP-compatible editors.
    20
    15
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Transforms design inputs (URLs, screenshots, descriptions) into production-ready React components following G2's Elevate 2.0 design system, providing both an MCP server for Claude Code and a web interface.
    1
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI-powered UI component generation from natural language descriptions, integrating with IDEs like Cursor, Windsurf, and VS Code.
    4
    16,596
    ISC

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hellolucky/v0-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server