This guide explains how to set up the dev3000 Vercel Integration to automatically verify PR changes and check performance on your Vercel preview deployments.
The dev3000 integration automatically:
- Detects when a PR has a Vercel preview deployment
- Analyzes which pages were affected by the PR changes
- Verifies that the PR does what it claims to do
- Checks performance metrics for affected pages
- Generates a comprehensive report
- Optionally posts results to the PR (if GitHub token is configured)
The integration works immediately without any manual configuration! Just:
- Deploy the dev3000 MCP server to Vercel
- Add the webhook URL to your project's Vercel Integration
cd mcp-server
vc deploy --prodNote your deployment URL (e.g., https://dev3000-mcp.vercel.sh)
- Go to your Vercel project settings
- Navigate to "Integrations" → "Webhooks"
- Click "Add Webhook"
- Configure:
- URL:
https://your-mcp-server.vercel.sh/api/integration/webhook - Events: Select
deployment.created - Projects: Select the projects you want to monitor
- URL:
That's it! The integration will now run on every PR deployment.
When a PR deployment is created:
- Webhook receives deployment event from Vercel
- Extracts GitHub metadata (owner, repo, branch, PR number)
- Fetches PR details and changed files
- Triggers AI-powered verification workflow
- Generates report and uploads to Vercel Blob
- Logs report URL to Vercel deployment logs
To view results: Check the Vercel deployment logs for your MCP server. Look for lines like:
[Webhook] Workflow completed: success
[Webhook] Report URL: https://oeyjlew0wdsxgm6o.public.blob.vercel-storage.com/pr-reports/...
[Webhook] Skipping GitHub comment (no GITHUB_TOKEN set)
If you want results posted directly to PRs:
-
Create a GitHub Personal Access Token:
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Select scopes:
repo(full control) - Copy the token
-
Add token to your MCP server:
cd mcp-server vc env add GITHUB_TOKEN # Paste your token when prompted
-
Redeploy:
vc deploy --prod
Now the integration will:
- Post a comment on the PR with results
- Set a GitHub check status (✅ or ❌)
- Include the full report URL in the comment
You can manually verify any PR using the CLI:
# Auto-detect PR from current branch
dev3000 cloud check-pr
# Specify PR number
dev3000 cloud check-pr 123
# Specify repo (useful for monorepos)
dev3000 cloud check-pr 123 --repo owner/repo
# Debug mode
dev3000 cloud check-pr --debugRequirements for CLI:
- Must be run from a git repository with GitHub remote
- Requires
ghCLI to be installed and authenticated - Requires
vcCLI to be installed and authenticated - PR must have a Vercel preview deployment
The workflow intelligently detects affected pages from:
- Next.js pages directory (
/pages/*.tsx) - Next.js app directory (
/app/*/page.tsx) - SvelteKit routes (
/routes/*.svelte) - URLs mentioned in the PR description
Claude Sonnet 4 analyzes:
- Whether the PR does what it claims to do
- Console errors or JavaScript errors
- Network errors or failed requests
- Visual rendering issues
- Unexpected behavior
Checks each page for:
- Load time (fast <500ms, acceptable <2s, slow >2s)
- Resource count
- Total payload size
- Identifies slow pages for optimization
Creates a markdown report with:
- Executive summary
- Detailed findings per page
- Performance metrics
- Recommendations
- Links to preview deployment
Example report structure:
# PR Verification Report
**PR**: #123 - Add user dashboard
**Project**: owner/repo
**Preview URL**: https://preview.vercel.app
## Summary
✅ All checks passed - PR changes work as described
## Verification Results
- ✅ Dashboard loads without errors
- ✅ User data displays correctly
- ✅ Navigation works as expected
## Performance Analysis
- ⚡ Fast: /dashboard (342ms)
- ⚡ Fast: /profile (458ms)
- ⚠️ Slow: /analytics (2.3s) - Consider optimization
## Recommendations
1. Optimize /analytics page load time
2. Consider lazy loading chart componentsAdd to your MCP server deployment:
# Optional: Enable GitHub integration
GITHUB_TOKEN=ghp_...
# Required: AI Gateway for verification
AI_GATEWAY_API_KEY=your_key
# Required: Blob storage for reports
BLOB_READ_WRITE_TOKEN=your_tokenDefault timeout is 5 minutes. To adjust:
Edit /mcp-server/app/api/cloud/check-pr/route.ts:
export const maxDuration = 300 // 5 minutes (default)- Check webhook configuration in Vercel project settings
- Verify webhook URL is correct
- Ensure
deployment.createdevent is selected - Check MCP server logs for errors
- Verify
BLOB_READ_WRITE_TOKENis set in MCP server - Check Vercel Blob storage quota
- Review MCP server logs for upload errors
- Ensure PR has GitHub metadata in Vercel deployment
- For private repos without token: PR details may be limited
- Check that branch name matches GitHub branch
- Verify preview URL is accessible
- Check for CORS issues in preview deployment
- Review crawl results in workflow logs
To support additional frameworks, edit the page detection patterns in:
/mcp-server/app/api/cloud/check-pr/route.ts
const pagePatterns = [
/\/pages\/(.*)\.(tsx?|jsx?)$/, // Next.js pages
/\/app\/(.*)\/(page|route)\.(tsx?|jsx?)$/, // Next.js app
/\/routes\/(.*)\.(tsx?|jsx?)$/, // SvelteKit
// Add your custom patterns here
]Edit performance check function:
const performanceCategories = {
fast: loadTime < 500, // Adjust threshold (ms)
acceptable: loadTime < 2000, // Adjust threshold (ms)
slow: loadTime >= 2000
}Want to trigger verification on PR events? Create .github/workflows/pr-check.yml:
name: PR Check
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wait for Vercel deployment
run: sleep 60 # Wait for deployment to be ready
- name: Install dev3000
run: npm install -g dev3000
- name: Run PR verification
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dev3000 cloud check-pr ${{ github.event.pull_request.number }}For issues or questions:
- GitHub Issues: https://github.com/vercel-labs/dev3000/issues
- Documentation: https://github.com/vercel-labs/dev3000
- Test with a sample PR to verify setup
- Review the first few reports to ensure accuracy
- Consider adding GitHub token for automatic PR comments
- Customize performance thresholds for your project
- Submit to Vercel Integration Marketplace (coming soon)