Introduction
Leverage the power of the Model Context Protocol (MCP) in Dify to connect your agents with Zapier’s extensive application library and automate complex workflows. Before we dive into the integration steps, let’s quickly clarify the key players involved:
- Dify: This is an LLMops platform designed to help you easily build, deploy, and manage AI-powered applications and agents. It supports various large language models and provides tools for creating complex AI workflows.
- Zapier: Think of Zapier as a universal translator and automation engine for web applications. It connects thousands of different apps (like Gmail, Slack, Google Sheets, etc.) allowing you to create automated workflows between them without needing to write code.
- MCP (Model Context Protocol): This is essentially a standardized ‘language’ or set of rules. It allows AI agents, like those built in Dify, to understand what external tools (like specific Zapier actions) do and how to use them correctly.
Now that we understand the components, let’s explore how to bring these powerful tools together.
Integrating Zapier with Dify via MCP
Zapier Setup
- Visit Zapier MCP Settings.
- Copy your unique MCP Server Endpoint link.
- Click “Edit MCP Actions” to add new tools and actions.
- Click “Add a new action”.
- Select and configure specific actions like “Gmail: Reply to Email”.
- To set up:
– Click “Connect to a new Gmail account”, log in, and authorize your account.
– For fields like thread, to, and body, select “Have AI guess a value for this field”.
- Repeat to expand your toolkit with “Gmail: Send Email” action.
MCP Plugins on Dify
- MCP SSE: A plugin that communicates with one or more MCP Servers using HTTP + Server-Sent Events (SSE), enabling your Agent to discover and invoke external tools dynamically.
- MCP Agent Strategy: This plugin integrates MCP directly into Workflow Agent nodes, empowering agents to autonomously decide and call external tools based on MCP-defined logic.
MCP SSE
Customize the JSON template below by inputting your Zapier MCP Server URL in place of the existing one. Paste the resulting complete JSON configuration into the installed plugin.
{
“server_name”: {
“url”: “https://actions.zapier.com/mcp/*******/sse”,
“headers”: {},
“timeout”: 5,
“sse_read_timeout”: 300
}
}
After setting things up, proceed to create a new Agent app. Ensure you enable your configured MCP SSE plugin under ‘Tools’. This allows the Agent to automatically trigger relevant tools based on the user’s intent, such as drafting and sending emails via an integrated Gmail action.
MCP Agent Strategy
Besides the SSE plugin, the MCP Agent Strategy plugin puts MCP right into your workflow’s Agent nodes. After installing it, set up the MCP Server URL just like before. This allows your workflow agents to automatically use Zapier MCP on their own to do tasks like sending Gmail emails within your automated workflows.
Final Notes
Currently (April 2025), Dify’s MCP capabilities are thanks to fantastic community plugins – our sincere thanks to the contributors! We’re also developing built-in MCP support to make setting up services like Zapier MCP and Composio within Dify even easier. This will unlock more powerful integrations for everyone. More updates are coming soon!
References: Dify MCP Plugin Hands-On Guide: Integrating Zapier for Effortless Agent Tool Calls