Labsco
hellolucky logo

Vercel v0

β˜… 19

from hellolucky

Generate beautiful UI components using Vercel's v0 generative UI system.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

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

πŸ”§ 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

VariableRequiredDefaultDescription
V0_API_KEYβœ…-Your v0 API key
V0_BASE_URL❌https://api.v0.dev/v1v0 API base URL
V0_DEFAULT_MODEL❌v0-1.5-mdDefault model to use
V0_TIMEOUT❌60000API timeout (ms)
MCP_SERVER_NAME❌v0-mcpMCP server name
LOG_LEVEL❌infoLogging level

πŸ§ͺ 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:

Your support helps maintain and improve v0-mcp!

πŸ“„ License

MIT