A comprehensive Model Context Protocol (MCP) server that provides complete access to the v0 Platform API. This server enables AI agents to create and manage chats, projects, deployments, integrations, webhooks, and interact with the full v0 development infrastructure on behalf of users.
- π Simple Authentication: Pass your v0 API key via
keyquery parameter - π¬ Complete Chat Management: Full CRUD operations for AI chat sessions, messages, and versions
- π Project Management: Create and organize v0 projects with full lifecycle management
- π Deployment Management: Deploy to Vercel, manage deployments, view logs and errors
- π Integration Support: Vercel project integrations for seamless deployments
- π£ Webhook Management: Complete webhook/hook management for event-driven workflows
- π€ User Management: Access user information, billing, plans, and scopes
- β±οΈ Rate Limit Monitoring: Monitor API usage and avoid throttling
This MCP server uses:
- Official v0-sdk v0.6.2: Latest v0 Platform SDK for all API interactions
- Query Parameter Authentication: Simple
keyquery parameter for API key authentication - Full API Coverage: Implements all available tools from the v0 Platform API
- Type Safety: Complete TypeScript implementation with proper error handling
Simply pass your v0 API key in the key query parameter with each request.
- Go to v0.dev
- Sign in to your account
- Navigate to your account settings
- Generate and copy your API key
Configure your MCP client to use the key query parameter:
{
"mcpServers": {
"v0": {
"command": "node",
"args": ["/path/to/your/mcp-client.js"],
"env": {
"MCP_SERVER_URL": "https://your-worker.your-subdomain.workers.dev/mcp?key=your_v0_api_key_here",
"V0_API_KEY": "your_v0_api_key_here"
}
}
}
}Or use curl directly:
curl -X POST "https://your-worker.your-subdomain.workers.dev/mcp?key=your_v0_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_chat",
"arguments": {
"message": "Create a Next.js login form"
}
}
}'To use this MCP server with Cursor IDE, add the following to your ~/.cursor/mcp.json:
{
"mcpServers": {
"v0-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse?key=YOUR_V0_API_KEY_HERE"
]
}
}
}Important: Replace YOUR_V0_API_KEY_HERE with your actual v0 API key from v0.dev.
For production deployment, use your deployed worker URL:
{
"mcpServers": {
"v0-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://your-worker.your-subdomain.workers.dev/sse?key=YOUR_V0_API_KEY_HERE"
]
}
}
}create_chat: Create new AI-powered chat sessions with system prompts and model configurationfind_chats: List and search existing chat sessions with pagination and filteringinitialize_chat: Initialize chats from zip archives for context-rich conversationsget_chat: Retrieve detailed information about specific chatsupdate_chat: Update chat metadata including names and settingsfavorite_chat: Mark/unmark chats as favorites for organizationfork_chat: Create chat branches from specific versions for alternate directionssend_message: Send messages to chats with attachments and model configurationfind_chat_messages: Retrieve all messages from chats with paginationget_chat_message: Get detailed message information including content and filesfind_chat_versions: List all versions/iterations of chat conversationsget_chat_version: Retrieve specific version details with files and contentupdate_chat_version_files: Directly edit generated files in chat versionsresume_message: Resume interrupted or incomplete message generationdelete_chat: Permanently delete chat sessions
create_project: Create new v0 projects with descriptions and instructionsfind_projects: List all v0 projects with paginationget_project_by_id: Retrieve specific project details by IDget_project_by_chat_id: Find project associated with a chat sessionupdate_project: Update project metadata and settingsassign_project_to_chat: Link projects to chat sessions for organization
find_deployments: Search deployments by project and chat IDscreate_deployment: Deploy chat versions to Vercel with project associationget_deployment: Retrieve deployment details including URLs and statusdelete_deployment: Remove deployments from Vercelfind_deployment_logs: Access deployment logs with timestamp filteringfind_deployment_errors: Retrieve deployment errors for debugging
create_vercel_project: Create Vercel project integrations for deploymentsfind_vercel_projects: List existing Vercel project integrations
find_hooks: List all configured webhooks in workspacecreate_hook: Create new webhooks for event monitoringget_hook: Retrieve detailed webhook configurationupdate_hook: Modify webhook settings and event subscriptionsdelete_hook: Remove webhook configurations
get_user_info: Retrieve authenticated user information and metadataget_user_billing: Access billing usage and quota informationget_user_plan: Get current subscription plan and feature limitsget_user_scopes: List accessible scopes and team permissions
check_rate_limits: Monitor API rate limits and usage quotas
- Node.js 18+
- Wrangler CLI
- v0 API key
-
Clone the repository
-
Install dependencies:
npm install
-
Configure your environment:
# Copy the example configuration cp wrangler.jsonc.example wrangler.jsonc # Edit wrangler.jsonc with your settings
-
Deploy to Cloudflare Workers:
npm run deploy
Run the server locally:
npm run devThe server will be available at http://localhost:8787
POST /mcp?key=YOUR_API_KEY: MCP server endpoint (requireskeyquery parameter)GET /sse?key=YOUR_API_KEY: Server-sent events endpointPOST /sse/message?key=YOUR_API_KEY: SSE message endpoint
The server provides comprehensive error handling:
- 401 Unauthorized: Missing
keyquery parameter - Rate Limit Errors: When API rate limits are exceeded
- Validation Errors: Invalid parameters or missing required fields
- Network Errors: Connection issues with the v0 API
All errors include descriptive messages to help with debugging.
curl -X POST "http://localhost:8787/mcp?key=your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_chat",
"arguments": {
"message": "Create a Next.js login form with validation",
"system": "You are an expert in React and form validation",
"modelId": "v0-1.5-md"
}
}
}'curl -X POST "http://localhost:8787/mcp?key=your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "create_deployment",
"arguments": {
"chatId": "chat_123",
"versionId": "version_456",
"projectId": "project_789"
}
}
}'If you're using an MCP client library, configure it to include the key query parameter:
const client = new MCPClient({
serverUrl:
"https://your-worker.your-subdomain.workers.dev/mcp?key=your_v0_api_key_here",
});
// Create a chat
const result = await client.callTool("create_chat", {
message: "Build a todo app with React and TypeScript",
modelId: "v0-1.5-md",
});- π Official v0-sdk Integration: Migrated from custom implementation to official v0-sdk v0.6.2
- π Complete API Coverage: All 40+ tools from the v0 Platform API now available
- π§ Enhanced Deployment Management: Full deployment lifecycle with logs and error tracking
- π£ Webhook Support: Complete webhook management for event-driven workflows
- π Vercel Integration: Native Vercel project integration support
- π‘ Improved Type Safety: Full TypeScript implementation with comprehensive error handling
- π Advanced Chat Management: Version control, forking, and file editing capabilities
- π₯ User & Billing Tools: Complete user management and billing information access
- π Simplified Authentication: Clean query parameter-based API key authentication
- API Key Protection: Never commit your v0 API key to version control
- HTTPS: Always use HTTPS in production
- Rate Limiting: Monitor usage to avoid hitting v0 API rate limits
- Environment Variables: Store API keys in secure environment variables
- Query Parameter Security: Be aware that API keys in query parameters may be logged in server logs
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- v0.dev for the comprehensive Platform API
- Model Context Protocol for the MCP specification
- Cloudflare Workers for the serverless platform