MCP Server
The v0 MCP (Model Context Protocol) server allows you to integrate v0's capabilities directly into your IDE, providing seamless access to v0's AI-powered code generation and assistance.
Overview
The v0 MCP server enables your IDE's AI assistant to:
- Create and manage v0 chats
- Access v0's code generation capabilities
- Leverage v0's design and development expertise
- Integrate v0 workflows into your development process
Supported IDEs
The v0 MCP server works with any IDE that supports the Model Context Protocol, including:
- Cursor - AI-powered code editor
- Claude Desktop - Anthropic's Claude desktop application
- VS Code (with MCP extensions)
- Any MCP-compatible IDE
Configuration
Prerequisites
- v0 API Key: Get your API key from your v0 account settings
- Environment Variable: Set your API key as an environment variable:
IDE Configuration
Add the following configuration to your IDE's MCP settings:
Cursor
Add to your Cursor settings (~/.cursor/mcp.json
):
Claude Desktop
Add to your Claude Desktop configuration (~/.config/claude-desktop/config.json
on Linux/macOS or %APPDATA%\Claude Desktop\config.json
on Windows):
VS Code
Install an MCP extension and add the v0 server configuration:
Usage
Once configured, your IDE's AI assistant will have access to v0's MCP tools. You can:
Create Chats
Ask your AI assistant to create new v0 chats with specific prompts:
Access Chat Information
Get details about existing chats:
Find Chats
Search through your v0 chats:
Send Messages
Continue conversations in existing chats:
Environment Variables
Make sure your V0_API_KEY
environment variable is properly set:
macOS/Linux
Windows
Troubleshooting
Common Issues
"Command not found: npx"
- Install Node.js and npm: https://nodejs.org/
"Permission denied"
- Ensure your API key is correctly set in the environment variable
- Verify the API key has the necessary permissions
"Connection failed"
- Check your internet connection
- Verify the MCP server URL:
https://mcp.v0.dev
- Ensure your firewall allows outbound connections
"Invalid API key"
- Regenerate your API key from v0 account settings
- Ensure the environment variable is properly exported
Next Steps
After configuring the MCP server, explore the Platform API documentation to understand the full range of capabilities available through v0's API.