Yevanchen_difyapp_as_mcp_server

Yevanchen_difyapp_as_mcp_server

3.5

Dify as MCP Server exposes Dify workflows as a Model Context Protocol (MCP) server to AI clients like Claude.

This project implements a Dify plugin that allows Dify workflows to be exposed via the Model Context Protocol (MCP) to AI clients supporting this protocol, such as Claude Desktop and Cursor. With this plugin, you can provide Dify workflows as tools to AI clients, enabling them to discover and use your workflows without modifying them. The project supports the latest MCP Streamable HTTP specification, ensuring secure and efficient communication.

Features

  • Supports MCP standard JSON-RPC interface
  • Automatic tool discovery and registration
  • Compatible with Claude Desktop/Cursor clients
  • Secure SSE connection implementation
  • Server-side session management

Usage with Different Platforms

Dify

Ensure your Dify application includes at least one workflow and is properly configured.

Client

1. Open the client
2. Go to Settings > MCP Server
3. Add a new MCP server with URL:
   
   https://your-dify-instance-address/difyapp_as_mcp_server
   
4. Save and enable the server

Cursor

1. Open Cursor
2. Go to Settings > AI > MCP
3. Add server address:
   
   https://your-dify-instance-address/difyapp_as_mcp_server
   
4. Save and enable
5. Use your tools in Cursor Agent

Frequently Asked Questions

What should I do if I encounter connection issues?

Ensure the URL is correct and accessible. Check if you are behind a firewall or proxy.

Why are my tools not visible?

Ensure the application ID is configured correctly, the workflow is published, and the Dify API key has sufficient permissions.

What if tool execution fails?

Check the Dify application logs and ensure the workflow runs correctly in Dify.