Model Context Protocol (MCP) Server

Last updated: 27.05.2026


AI & DEVELOPERS

Wafrow ships a built-in Model Context Protocol (MCP) server, allowing autonomous AI agents, coding assistants, and custom LLM workflows to interact with your image templates and render high-performance dynamic banners as native tools.

Wafrow subscription needed. Compatible with any MCP client.

What is MCP?

The Model Context Protocol (MCP) is an open standard developed by Anthropic that enables large language models (LLMs) to securely connect to external data sources, services, and local developer environments.

Instead of writing custom API integration code for every script, you connect the Wafrow MCP server to your AI client, and your AI assistant immediately gains native, smart commands to list, pre-render, customize, and save image templates.


Connecting to Wafrow MCP

Wafrow utilizes the SSE (Server-Sent Events) / HTTP Transport standard. Any compatible MCP client can connect to your workspace.

  • Server Endpoint: https://wafrow.com/mcp/wafrow
  • Transport Protocol: HTTP
  • Authentication: Bearer token (use a personal access token generated under Settings -> API Access Tokens)
  • HTTP Headers:
    • Authorization: Bearer YOUR_SANCTUM_TOKEN (or just your raw token YOUR_SANCTUM_TOKEN — the Wafrow server will automatically handle prefixing for you!)
    • Content-Type: application/json

[!NOTE] Optional Prefixing: To make onboarding as seamless as possible for non-technical users, Wafrow automatically intercepts incoming API requests and prepends Bearer if it is missing. Your users can paste their raw token directly!


Agent-Led Onboarding & Free Trial

If you are building an AI agent or developer-facing tool, you can implement an interactive onboarding loop to easily sign up users and activate their tools:

  1. Automatic 14-Day Free Trial: Every new user account is automatically granted a free, full-access 14-day trial as soon as their account is created. No credit cards or subscription checkouts are required to test the API.
  2. Interactive Handshake: Your agent can guide the user to connect their account with a simple prompt:

    "I will configure Wafrow on your behalf. To get started with your automatic 14-day free trial, please Log In/Sign Up to generate an access token at Settings. Paste the token back to me here, and I will set up your templates!"

  3. Secure Delegation: Once the user provides the Sanctum personal access token, the agent securely stores and appends it to headers for all subsequent tool execution calls.

Setup Guides

1. Claude Desktop

To enable Claude to personalize images during your chats, edit your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add Wafrow under the mcpServers object:

{
  "mcpServers": {
    "wafrow": {
      "url": "https://wafrow.com/mcp/wafrow",
      "headers": {
        "Authorization": "Bearer YOUR_SANCTUM_TOKEN"
      }
    }
  }
}

Restart Claude Desktop, and you will see the Tool hammer icon light up!

2. Cursor IDE or Windsurf

Equip your AI pair programmer to create marketing banners or Open Graph templates directly in your code editor.

Cursor — create or edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-level):

{
  "mcpServers": {
    "wafrow": {
      "url": "https://wafrow.com/mcp/wafrow",
      "headers": {
        "Authorization": "Bearer YOUR_SANCTUM_TOKEN"
      }
    }
  }
}

Windsurf — open Settings → Cascade → MCP Servers and add a new server:

  • Name: Wafrow
  • Server Type: SSE
  • Endpoint URL: https://wafrow.com/mcp/wafrow
  • Add a custom header: Authorization: Bearer YOUR_SANCTUM_TOKEN

Available Tools

When connected, the following functions are loaded directly into the AI's context:

Tool Name Input Parameters Description
list_templates page (optional integer) Retrieves a list of available image templates including IDs and template names.
create_template name (required string)
layer_information (required object)
Creates a brand new image template with visual layers using Fabric.js properties.
pre_render_image template_id (required UUID)
personalize (optional object)
Performs a real-time ImageMagick render, returning the finalized visual as a base64 encoded string.
get_lazy_render_url template_id (required UUID)
campaign_id (optional UUID)
personalize (optional object)
Generates a persistent, public CDN URL for embedding directly in email <img> templates.
save_variant template_id (required UUID)
personalize (required object)
Saves a personalization preset (e.g. customized name, font weight, background colors) to generate a permanent campaign ID.

Example Prompt to Try in Claude or Cursor

Once configured, you can command your AI assistant:

"Wafrow has been loaded into your tools. Please list my active templates, find the checkout-reminder template, and generate a lazy-render banner URL where the customer's name is set to 'Sarah' and the background is a sleek dark navy blue. Output a markdown image tag so I can preview it."

The AI will handle the schema building, API headers, and response parsing automatically, rendering the result right in your workspace.