MCP Information
Complete guide to the Model Context Protocol (MCP) integration in Webpifier
What is MCP?
Model Context Protocol (MCP) is a standardized way for AI tools and web applications to securely communicate with content management systems. It allows Webpifier to send optimized images directly to your CMS without the need to download and re-upload them manually.
Key Benefits of MCP:
- Direct integration with your CMS (Content Management System)
- Eliminate manual downloading and uploading steps
- Preserve image metadata during transfers
- Secure authentication with your content platforms
- Streamlined workflow for content creators and developers
- Works with popular platforms like Webflow, WordPress, and Shopify
How MCP Works
MCP integration works through a secure API connection between Webpifier and your CMS or automation platform:
Authentication
Secure API credentials connect Webpifier to your CMS
Compression
Images are processed locally in your browser
Transfer
Optimized images are sent directly to your CMS
Confirmation
Success message with link to your uploaded image
Security Note
Your API credentials are stored locally in your browser's storage and are never sent to our servers. All communication happens directly between your browser and your CMS, ensuring maximum security and privacy.
Supported MCP Integrations
Webflow MCP
Connect directly to your Webflow collections and send optimized images directly to your site.
View setup guide →Zapier MCP
Use Zapier to create workflows that send your compressed images to hundreds of different platforms.
View setup guide →Custom MCP Server
Connect to your own custom MCP endpoint for specialized integration needs.
View setup guide →Setting Up Webflow MCP Integration
Follow these steps to connect Webpifier to your Webflow site:
Get your Webflow API Key
- Log in to your Webflow account
- Go to Account Settings → Integrations tab
- Generate a new API key with read/write permissions
Find your Site ID
- In your Webflow Dashboard, select your site
- Go to Site Settings → General
- Copy your Site ID from the info panel
Find your Collection ID (for uploads to a specific collection)
- Go to your Webflow Designer
- Open the CMS Collections panel
- Select the collection you want to upload to
- The Collection ID is in the URL:
webflow.com/design/[site-name]?t=published&collection=[collection-id]
Configure MCP in Webpifier
- Click the MCP icon in the Webpifier navigation
- Select "Webflow MCP" as the server type
- Enter your API Key, Site ID, and Collection ID
- Click "Connect" to test the connection
Important Notes for Webflow:
- Webflow API tokens have rate limits (typically 60 requests per minute)
- Make sure your API token has write permissions for asset uploads
- For collection uploads, verify that your collection allows the image field type
- Maximum file size for Webflow is 10MB per image
- Webflow only accepts certain file formats (JPEG, PNG, GIF, WebP)
Setting Up Zapier MCP Integration
Zapier MCP allows you to send compressed images to hundreds of platforms through Zapier's automation workflows:
Create a Zapier Account
If you don't already have one, sign up at zapier.com
Create a Webhook Zap
- In Zapier, create a new Zap
- Choose "Webhooks by Zapier" as the trigger app
- Select "Catch Hook" as the trigger event
- Set up the webhook and copy the provided webhook URL
Configure the Action
- Choose your destination app (WordPress, Shopify, Contentful, etc.)
- Select the appropriate action (e.g., "Upload Media" or "Create Asset")
- Map the incoming data from the webhook to the fields required by your action
Configure MCP in Webpifier
- Click the MCP icon in the Webpifier navigation
- Select "Zapier MCP" as the server type
- Paste your Zapier webhook URL in the Server URL field
- Click "Connect" to test the connection
Example Zapier Setup for WordPress:
Here's how you might set up a Zap that sends compressed images to WordPress:
- Trigger: Webhooks by Zapier - Catch Hook
- Action: WordPress - Upload Media
- Map the file data from the webhook to the WordPress upload field
- Optional: Add a second action to create a post with the uploaded image
Setting Up Custom MCP Server
For developers and advanced users, you can set up your own custom MCP server:
Create an MCP-compatible Endpoint
Your endpoint should accept POST requests with multipart/form-data containing the image file
Configure Authentication
Implement secure authentication for your endpoint (API key, OAuth, etc.)
Configure MCP in Webpifier
- Click the MCP icon in the Webpifier navigation
- Select "Custom MCP Server" as the server type
- Enter the full URL to your MCP endpoint
- Click "Connect" to test the connection
Custom MCP Server Requirements:
- Must accept POST requests with Content-Type: multipart/form-data
- Should expect a file field named "file" containing the image data
- May receive a "metadata" field containing a JSON string with image information
- Should return a JSON response with at minimum a "success" boolean field
- Should include a URL to the uploaded image (as "url", "imageUrl", "assetUrl", or "fileUrl")
Example MCP Server Response:
{ "success": true, "url": "https://your-cms.com/assets/compressed-image-12345.webp", "id": "asset_12345", "metadata": { "width": 1200, "height": 800, "format": "webp", "size": 62145 } }
Using MCP for Image Uploads
Once you've configured your MCP connection, using it to upload images is simple:
Compress your images as usual
Upload and optimize your images with your preferred settings
Use the MCP upload option
For each compressed image, you'll see an "Upload to CMS" button alongside the download button
Confirm the upload
Click the button to send the image directly to your connected CMS
View confirmation
You'll receive a success message with a link to view the image in your CMS
Batch Uploads
You can also upload multiple images to your CMS at once by using the "Upload All to CMS" button that appears when you have multiple compressed images.
Advanced MCP Features
MCP integration offers several advanced features for power users:
Metadata Preservation
When uploading to your CMS, Webpifier preserves important metadata such as the original filename, dimensions, format, and custom attributes you may have added.
Custom Field Mapping
With Zapier MCP, you can map compressed image data to specific fields in your CMS, allowing for automatic organization and tagging.
Naming Conventions
Configure how your uploaded files are named in your CMS by setting custom naming patterns in the advanced settings section.
Batch Processing
Upload entire batches of compressed images to your CMS at once, with options for parallel or sequential processing.
Troubleshooting MCP Connections
If you encounter issues with your MCP connection, try these solutions:
Connection Failures
- Check your API credentials: Ensure your API key and other credentials are correct and have the proper permissions
- Verify IDs: Double-check your Site ID and Collection ID for any typos
- Check endpoint URL: For Zapier or custom servers, ensure the URL is correct and accessible
- Browser restrictions: Some browsers block cross-origin requests; try using Chrome for best compatibility
Upload Failures
- Size limits: Your CMS might have file size limits that reject larger images
- Permission issues: Ensure your API key has write permissions for the target collection
- Rate limiting: Some APIs limit how many requests you can make in a certain timeframe
- Check response: Look at the error message in the console for specific details about the failure
Common Error Codes
- 401 Unauthorized: Invalid API key or token
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Invalid Collection ID or endpoint URL
- 413 Payload Too Large: Image exceeds size limits
- 429 Too Many Requests: Rate limit exceeded
Common Error Solutions
- "Unauthorized": Your API key is invalid or has expired
- "Collection not found": The Collection ID is incorrect
- "Rate limit exceeded": Wait a few minutes before trying again
- "File too large": Increase compression or reduce the dimensions of your images
- "CORS error": Your custom server needs to enable CORS headers for your domain
MCP Security Best Practices
When using MCP to connect to your content systems, follow these security best practices:
Use read-scoped API keys when possible
If you only need to read data from your CMS, use a read-only API key.
Create dedicated API keys
Create specific API keys for Webpifier rather than using your master key.
Regularly rotate credentials
Change your API keys periodically for enhanced security.
Use private devices
Avoid configuring MCP on public or shared computers.
Clear browser data
If you're on a shared device, clear your browser's local storage after use.
Monitor activity
Regularly check your CMS logs for any unexpected activity.