Dify MCP Plugin Guide: Automated Email Sending
Last updated
Last updated
This article will help you:
Install the MCP SSE plugin for your Dify workspace, remotely call the Zapier MCP service to enable automated email sending.
Anthropic introduced the Model Context Protocol (MCP) in late 2024. As an emerging open protocol, MCP builds a bidirectional communication channel between LLMs and external applications, functioning like a "USB-C" interface for AI, helping models discover, understand, and safely call various external tools or APIs.
This means: Developers no longer need to write complex custom interfaces to connect with each external service. Users can experience AI's ability to easily call a vast array of third-party applications, whether processing daily office tasks, analyzing data, or executing marketing automation. AI is moving from "intelligent conversation" to "efficient action."
In the Dify community, MCP has garnered significant attention. Community developers have contributed multiple MCP plugins to the plugin marketplace, allowing you to easily connect external MCP services to Dify Agent applications or workflows.
This article will use the MCP SSE plugin as an example to detail how to use MCP plugins within Dify to connect to Zapier and complete an automated email sending process.
Dify Cloud version / Dify Community version ≥ v1.0.0
Zapier account
Zapier's MCP Server packages its existing 7000+ applications and 30,000+ actions into a single MCP Server URL. You can select and configure the tools and actions you need in the Zapier backend, such as sending emails, creating records in CRM, sending notifications in Slack, etc. Simply enter the MCP Server URL into the Dify MCP plugin configuration, and the LLM can automatically call these tools to complete various tasks during conversations or processes.
Visit the .
Obtain the MCP Server URL, which will be entered into the Dify plugin configuration later.
Click "Edit MCP Actions" below the URL to enter the tools and actions addition page.
Click "Add a new action", search for Gmail: Send Email
. You can also choose to add different email operations based on your actual needs.
Taking "Send Email" as an example:
Click "Connect" under the Gmail account, then log in and authorize your Gmail inbox.
For email fields such as recipient (To), subject, and body, you can select "Have AI guess a value for this field", and the specific content will be dynamically determined by the Agent based on the actual conversation and scenario.
After completing the setup, you can continue to add different Actions to enrich the Agent's available toolkit.
Go to the Dify plugin marketplace, search for the MCP SSE plugin and click install.
Click the To Authorize button on the plugin page, and paste the Zapier MCP Server URL obtained earlier into the plugin. Reference address format:
Create an Agent-type application
From the navigation, select "Studio", choose "Create from Blank" in the application list and select the Agent application type, then complete the creation by entering an application name.
Add MCP tools
Add both Fetch MCP Tools
and Call MCP Tool
in the application toolbar.
Configure LLM
If you don't find the DeepSeek model in your model providers, please go to the Dify plugin marketplace to install the DeepSeek plugin.
After configuration, you can automatically generate email drafts and send them to specified recipients simply by chatting with the Agent.
Ask the LLM to complete the email sending task in the chat box. After the MCP finishes running, the email will be automatically sent to the recipient.
In addition to adding the MCP SSE plugin as a tool to the Agent, you can also use the MCP Agent Strategy plugin in Workflow. After installation, configure it in the corresponding Agent node as follows:
Use the following JSON structure as a template, replacing the url
value with the MCP Server address, then copy and paste the complete modified JSON into the MCP SERVER URL
configuration box:
Once configured, when the Workflow runs to that Agent node, it can execute tasks using the configured Zapier MCP Server according to the Prompt instructions. As shown below, calling Gmail to send an email:
To ensure service stability, we recommend using plugin version v0.0.4; you can adjust the version on the plugin details page in your workspace.
Using MCP may consume a large number of tokens, so it is recommended to use a more cost-effective LLM. This article will use the deepseek-chat
model as an example. You can apply for an API Key from and enter it in "Settings" → "Model Providers" → "DeepSeek".