MCP Integration

Connect to Model Context Protocol (MCP) servers to seamlessly integrate your image compression workflow with Webflow, Zapier, or any custom CMS.

MCP Integration

What is MCP?

Model Context Protocol (MCP) allows AI and web tools to securely interact with content management systems like Webflow. With our MCP integration, you can compress images and send them directly to your CMS without the need to download and re-upload them manually.

Key Benefits of MCP:

  • Direct integration with your CMS
  • Eliminate manual downloading and uploading
  • Preserve image metadata during transfers
  • Secure authentication with your content platforms
  • Streamlined workflow for content creators and developers

MCP works by establishing a secure connection between Webpifier and your content management system. Once connected, optimized images can be sent directly to your CMS with a single click, saving you time and effort in your content workflow.

How MCP Works

The Model Context Protocol creates a secure bridge between web applications and content management systems:

1

Authentication

Secure API credentials connect Webpifier to your CMS

2

Compression

Images are processed locally in your browser

3

Transfer

Optimized images are sent directly to your CMS

4

Confirmation

Success message with link to your uploaded image

All API credentials are securely stored in your local browser storage and are never sent to our servers. The communication happens directly between your browser and your CMS, ensuring maximum security and privacy.

Setting Up Webflow MCP

  1. Get a Webflow API token from the Webflow API Playground

    Navigate to Account Settings → Integrations tab and generate a new API key with read/write permissions.

  2. Find your Site ID from your Webflow dashboard under Site Settings

    In your Webflow Dashboard, select your site and go to Site Settings → General. You'll find your Site ID in the info panel.

  3. Optional: Find your Collection ID if you want to upload directly to a specific collection

    Open your Webflow Designer, navigate to the Collections panel, and select the collection you want to upload to. The Collection ID is in the URL: webflow.com/design/[site-name]?collection=[collection-id]

  4. Enter these details in the MCP Configuration Panel above and click "Connect"

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

Setting Up Zapier MCP

  1. Create a Zapier account if you don't already have one
  2. Create a Webhook Zap with "Webhooks by Zapier" as the trigger

    Select "Catch Hook" as the trigger event and set up the webhook. Zapier will provide you with a unique webhook URL.

  3. Configure your destination app and actions

    Choose your destination app (WordPress, Shopify, Contentful, etc.) and 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.

  4. Enter your Webhook URL in the MCP configuration panel above and click "Connect"

Example Zapier Setup for WordPress:

Here's how you might set up a Zap that sends compressed images to WordPress:

  1. Trigger: Webhooks by Zapier - Catch Hook
  2. Action: WordPress - Upload Media
  3. Map the file data from the webhook to the WordPress upload field
  4. Optional: Add a second action to create a post with the uploaded image

Setting Up Custom MCP

If you're running your own MCP server, enter the server URL in the configuration panel. Your server should handle POST requests with image files and respond with a JSON object containing the uploaded image URL.

POST /your-mcp-endpoint
Content-Type: multipart/form-data

Response: {"success": true, "url": "https://your-domain.com/uploaded-image.webp"}

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
  }
}

Troubleshooting MCP Connections

Connection Failed

  • API credentials: Ensure your API key or token is correct and has the proper permissions
  • Verify IDs: Check your Site ID and Collection ID for typos
  • Endpoint URL: For Zapier or custom servers, verify the URL is correct and accessible
  • CORS issues: Custom servers need to have CORS headers properly configured

Upload Failed

  • Size limits: Most CMS platforms have file size limits (typically 5-10MB)
  • Format restrictions: Ensure your CMS accepts WebP or AVIF formats
  • Rate limiting: You may have exceeded API rate limits
  • Server error: Check your CMS server logs for specific error details

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

Security Best Practices

When using MCP to connect to your content systems, follow these security recommendations:

  • Create dedicated API keys for Webpifier rather than using your master keys
  • Use read-scoped API keys when possible to limit access permissions
  • Regularly rotate credentials to enhance security
  • Don't configure MCP on public or shared computers
  • Clear your browser's local storage after using Webpifier on shared devices