LLM App Builder · Open Source

Connect Dify Workflows to Browser-Based MCP Tools

Dify's open-source LLM app platform supports MCP tools in its Agent and Workflow nodes. Connect Agent MCP Studio's relay bridge to give your Dify apps access to browser-built Python scripts, SQL queries, and custom API integrations.

Share:

Prerequisites

Step-by-Step Setup

  1. Start bridge.js on the Dify server

    curl -O https://agentmcp.studio/bridge.js && npm install ws
    # Keep running (use pm2 for production):
    node bridge.js wss://agentmcp.studio/api/relay/YOUR-UUID

    Open the studio → SettingsMCP Relay Bridge → click Connect.

  2. Add MCP server in Dify Settings

    In Dify: Settings (top right) → MCP ServersAdd Server:

    • Name: Agent MCP Studio
    • Connection Type: stdio
    • Command: node /path/to/bridge.js wss://agentmcp.studio/api/relay/YOUR-UUID

    Save. Dify will list the available tools from Agent MCP Studio.

  3. Use tools in Dify workflows

    Open the Workflow editor, add a Tool node, and select tools from Agent MCP Studio in the tool provider dropdown. Wire the node into your workflow to call tools at any point in the pipeline.

    In Agent apps, enable the MCP tools in the agent's tool configuration — they'll be called automatically when the agent determines they're needed.

Frequently Asked Questions

Yes — Dify supports MCP as an external tool protocol. In your Dify workspace settings under Tools, add your Agent MCP Studio relay as an MCP tool server. Dify chatbots and workflows can then invoke your browser-built tools.

Yes — since the relay bridge uses outbound WebSocket connections (no inbound ports), it works with Dify Cloud, self-hosted Dify, and Dify on-premise installations without firewall changes.

Yes — Dify's Agent workflow node can call any configured MCP tool. Add your tools to Dify's tool registry, then use the Agent node in a workflow to have the LLM automatically select and call your browser tools.

Dify supports Claude, GPT-4o, Gemini, Mistral, and many others via its LLM provider system. Tool calling works with models that support function calling — Claude 3.5 Sonnet and GPT-4o have the most reliable tool call behavior.

Yes — Dify excels at combining RAG (knowledge bases) with agent tool calling. You can build workflows that retrieve from a knowledge base AND call Agent MCP Studio tools in the same conversation flow.

Related Integrations