dify-plugin-mcp_server

MCP.Pizza Chef: hjlarry

dify-plugin-mcp_server is an MCP server extension that transforms a Dify workflow app into an MCP server endpoint. It enables real-time context sharing and interaction by exposing the app's input schema as structured data for LLMs. Designed for private network deployment, it ensures data security while integrating Dify apps into the MCP ecosystem, facilitating seamless model-driven workflows and tool integrations.

Use This MCP server To

Expose Dify workflow apps as MCP servers for LLM integration Securely share app context within private networks Enable LLMs to interact with custom Dify app endpoints Create structured input schemas for model-driven workflows Integrate Dify apps into multi-step reasoning pipelines

README

MCP Server

Author: hjlarry
Version: 0.0.3
Type: extension
Repo: https://github.com/hjlarry/dify-plugin-mcp_server
Feature Request: issues

A Dify endpoint plugin that change a dify app to a mcp server.

To keep your data secure, use this plugin exclusively within your private network.

Get Started

1. create a simple workflow app in dify.

1

2. add a endpoint and select this app.

2

The app's input schema must define its input parameters. For a chat dify app, ensure to include a query field in the input schema, formatted as follows:

{
    "name": "get_weather",
    "description": "Get weather status for a place.",
    "inputSchema": {
        "properties": {
            "place": {"title": "Place", "type": "string"}
        },
        "required": ["place"],
        "title": "get_weatherArguments",
        "type": "object"
    }
}

3. copy the endpoint url to your mcp client, like Cherry Studio

Option 1: Use the newest Streamable HTTP protocol (Recommended)

6 7

Option 2: Use the legacy SSE protocol

3 4

4. enjoy it!

5

Changelog

0.0.3

  • To fix sse get non-exist key get lots error logs on the plugin daemon.

0.0.2

  • Add a new Streamable HTTP protocol.
  • Update dify-plugin-sdk version.

dify-plugin-mcp_server FAQ

How do I convert a Dify app into an MCP server using this plugin?
Install the plugin, create a Dify workflow app with defined input schema, then add an endpoint selecting this plugin to expose it as an MCP server.
Is this plugin safe to use on public networks?
No, it is recommended to use this plugin exclusively within private networks to keep your data secure.
What input schema requirements must my Dify app meet?
Your app's input schema must define all input parameters clearly; for chat apps, include a 'query' field formatted as specified in the documentation.
Can this MCP server handle multi-step workflows?
Yes, by exposing structured input schemas, it supports complex workflows and multi-step reasoning with LLMs.
Where can I report issues or request features?
You can report issues or request features on the GitHub repository's issues page at https://github.com/hjlarry/dify-plugin-mcp_server/issues.
Does this plugin support real-time context updates?
Yes, it enables real-time context sharing by exposing the Dify app as an MCP server endpoint.
What versions of Dify is this plugin compatible with?
Compatibility details are available on the GitHub repo; generally, it works with Dify versions supporting workflow apps and endpoint plugins.
How do I define the input schema for chat-based Dify apps?
Include a 'query' field in the input schema formatted as a string to capture user queries effectively.