Prerequisites
- Dify (self-hosted v0.6+) or Dify Cloud — dify.ai
- Node.js 18+ on the Dify server
- Agent MCP Studio at agentmcp.studio
Step-by-Step Setup
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 → Settings → MCP Relay Bridge → click Connect.
-
Add MCP server in Dify Settings
In Dify: Settings (top right) → MCP Servers → Add 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.
-
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.