4,500+ servers built on MCP Fusion
Vinkius
Dify logo
Vinkius
CrewAI logo

How to Use the Dify MCP in CrewAI

Coordinate cooperative agent teams using CrewAI to execute complex Dify workflows autonomously.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Dify MCP on Cursor AI Code Editor MCP Client Dify MCP on Claude Desktop App MCP Integration Dify MCP on OpenAI Agents SDK MCP Compatible Dify MCP on Visual Studio Code MCP Extension Client Dify MCP on GitHub Copilot AI Agent MCP Integration Dify MCP on Google Gemini AI MCP Integration Dify MCP on Lovable AI Development MCP Client Dify MCP on Mistral AI Agents MCP Compatible Dify MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
CrewAI

Connect Dify MCP to CrewAI

Create your Vinkius account to connect Dify to CrewAI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Coordinate Multi-Agent Teams via CrewAI and Dify

The `chat` tool allows your specialized CrewAI agents to interact with Dify's managed LLM runtimes. In a multi-agent setup, your Researcher agent can gather context, while your Writer agent uses this tool to generate the final response. This splits the cognitive load across multiple specialized roles instead of relying on a single prompt. CrewAI's shared memory system keeps track of the conversation state across these handoffs. Each agent knows what the previous agent accomplished. This ensures the output remains coherent even when multiple models contribute to the final answer.

Extract Chat History for Crew Context

The `list_messages` and `list_conversations` tools inject historic context directly into the CrewAI short-term memory system. Before a crew starts a new task, a coordinator agent runs these tools to read what was previously discussed. This prevents the crew from repeating research or asking duplicate questions. You don't need to manually pass history arrays between Python classes. The MCP Server exposes the history natively, allowing your crew to self-correct based on past interactions. This keeps your autonomous operations running smoothly over long-lived sessions.

Ingest Files for Team Analysis

The `upload_file` tool uploads documents directly to the platform so your entire crew can access the same source files. When a user uploads a PDF, a routing agent triggers this tool to store the document in the shared space. From there, any agent in the crew can query the file content during execution. This eliminates the need to write custom file-parsing scripts for each agent. The platform handles the document processing, while your CrewAI team focuses on analyzing the extracted data. This design keeps your Python codebase lean and focused on agent logic.

Setup guide

Set up Dify MCP in CrewAI

Prerequisites

  • Python 3.10+ installed
  • crewai package (pip install crewai)
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install CrewAI

    Run pip install crewai to install the framework. MCP support is built-in via the mcps parameter.

  2. 2

    Add the MCP URL to your agent

    Pass your Vinkius endpoint directly to the mcps list. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. CrewAI handles tool discovery and caching automatically.

  3. 3

    Kick off your crew

    Create a Crew with your agent and tasks. Call crew.kickoff() — the agent will automatically invoke Dify tools as needed.

crew.py
from crewai import Agent, Task, Crew

agent = Agent(
    role="Dify Analyst",
    goal="Access and analyze Dify data via MCP.",
    backstory="Expert analyst with direct Dify access.",
    mcps=[
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
    ],
)

task = Task(
    description="List recent Dify transactions",
    agent=agent,
    expected_output="A summary of recent activity",
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
print(result)

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about Dify MCP in CrewAI

You pass the server URL directly into the agent's `mcps` parameter during initialization. CrewAI connects to the MCP Server and registers tools like `chat` and `upload_file` automatically.
Yes, you can. By using `MCPServerHTTP` from `crewai.mcp` and defining a `tool_filter`, you can expose specific tools like `feedback` to only your manager or supervisor agents.
CrewAI schedules tool execution based on the task dependency graph. If multiple agents need to run tools via this MCP Server, the framework executes them sequentially or hierarchically as defined by your crew's process.
Yes, they do. The text retrieved via `list_messages` can be indexed into CrewAI's local vector memory, allowing agents to reference historical facts during subsequent tasks.
All raw file bytes sent via `upload_file` and message logs fetched via `list_messages` are processed inside secure, isolated V8 instances. This ensures your proprietary documents and chat histories remain strictly private and inaccessible to third parties.

Start using the Dify MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 6 tools

We've already built the connector for Dify. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 6 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.