Skip to content
Back to search

dify-mcp-server

Model Context Protocol (MCP) Server for dify workflows

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/yanxingliu--dify-mcp-server/badge.svg)](/listings/yanxingliu--dify-mcp-server)

HTML

<a href="/listings/yanxingliu--dify-mcp-server"><img src="/api/listings/yanxingliu--dify-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

The server can be installed via [Smithery](https://smithery.ai/server/dify-mcp-server) or manually.

Step1: prepare config.yaml or enviroments

You can configure the server using either environment variables or a `config.yaml` file.

Method 1: Using Environment Variables (Recommended for Cloud Platforms)

Set the following environment variables:

export DIFY_BASE_URL="https://cloud.dify.ai/v1"
export DIFY_APP_SKS="app-sk1,app-sk2" # Comma-separated list of your Dify App SKs

* `DIFY_BASE_URL`: The base URL for your Dify API. * `DIFY_APP_SKS`: A comma-separated list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow you want to make available via MCP.

Method 2: Using `config.yaml`

Create a `config.yaml` file to store your Dify base URL and App SKs.

Example `config.yaml`:

dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
  - "app-sk1" # SK for workflow 1
  - "app-sk2" # SK for workflow 2
  # Add more SKs as needed

* `dify_base_url`: The base URL for your Dify API. * `dify_app_sks`: A list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow.

You can create this file quickly using the following command (adjust the path and values as needed):

# Create a directory if it doesn't exist
mkdir -p ~/.config/dify-mcp-server

# Create the config file
cat > ~/.config/dify-mcp-server/config.yaml <<EOF
dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
  - "app-your-sk-1"
  - "app-your-sk-2"
EOF

echo "Configuration file created at ~/.config/dify-mcp-server/config.yaml"

When running the server (as shown in Step 2), you will need to provide the path to this `config.yaml` file via the `CONFIG_PATH` environment variable if you choose this method.

Step2: Installation on your client

❓ If you haven't installed uv or uvx yet, you can do it quickly with the following command:

curl -Ls https://astral.sh/uv/install.sh | sh

✅ Method 1: Use uvx (no need to clone code, recommended)

{
"mcpServers": {
  "dify-mcp-server": {
    "command": "uvx",
      "args": [
        "--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server"
      ],
    "env": {
       "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
       "DIFY_APP_SKS": "app-sk1,app-sk2",
    }
  }
}
}

or

{
"mcpServers": {
  "dify-mcp-server": {
    "command": "uvx",
      "args": [
        "--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server"
      ],
    "env": {
       "CONFIG_PATH": "/Users/lyx/Downloads/config.yaml"
    }
  }
}
}

✅ Method 2: Use uv (local clone + uv start)

You can also run the dify mcp server manually in your clients. The config of client should like the following format:

{
"mcpServers": {
  "mcp-server-rag-web-browser": {
    "command": "uv",
      "args": [
        "--directory", "${DIFY_MCP_SERVER_PATH}",
        "run", "dify_mcp_server"
      ],
    "env": {
       "CONFIG_PATH": "$CONFIG_PATH"
    }
  }
}
}

or

{
"mcpServers": {
  "mcp-server-rag-web-browser": {
    "command": "uv",
      "args": [
        "--directory", "${DIFY_MCP_SERVER_PATH}",
        "run", "dify_mcp_server"
      ],
    "env": {
       "CONFIG_PATH": "$CONFIG_PATH"
    }
  }
}
}

Example config:

{
"mcpServers": {
  "dify-mcp-server": {
    "command": "uv",
      "args": [
        "--directory", "/Users/lyx/Downloads/dify-mcp-server",
        "run", "dify_mcp_server"
      ],
    "env": {
       "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
       "DIFY_APP_SKS": "app-sk1,app-sk2",
    }
  }
}
}

Enjoy it

At last, you can use dify tools in any client who supports mcp.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 157 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Model Context Protocol (MCP) Server for dify workflows
  2. A simple implementation of an MCP server for using [dify](https://github.com/langgenius/dify). It achieves the invocation of the Dify workflow by calling the tools of MCP.
  3. ## 📰 News
  4. * [2025/4/15] zNow supports directly using environment variables to pass `base_url` and `app_sks`, making it more convenient to use with cloud-hosted platforms.
  5. ## 🔨Installation
  6. The server can be installed via [Smithery](https://smithery.ai/server/dify-mcp-server) or manually.
  7. ### Step1: prepare config.yaml or enviroments
  8. You can configure the server using either environment variables or a `config.yaml` file.
  9. #### Method 1: Using Environment Variables (Recommended for Cloud Platforms)
  10. Set the following environment variables:
  11. ```shell
  12. export DIFY_BASE_URL="https://cloud.dify.ai/v1"
  13. export DIFY_APP_SKS="app-sk1,app-sk2" # Comma-separated list of your Dify App SKs
  14. ```
  15. * `DIFY_BASE_URL`: The base URL for your Dify API.
  16. * `DIFY_APP_SKS`: A comma-separated list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow you want to make available via MCP.
  17. #### Method 2: Using `config.yaml`
  18. Create a `config.yaml` file to store your Dify base URL and App SKs.
  19. Example `config.yaml`:
  20. ```yaml
  21. dify_base_url: "https://cloud.dify.ai/v1"
  22. dify_app_sks:
  23. - "app-sk1" # SK for workflow 1
  24. - "app-sk2" # SK for workflow 2
  25. # Add more SKs as needed
  26. ```
  27. * `dify_base_url`: The base URL for your Dify API.
  28. * `dify_app_sks`: A list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow.
  29. You can create this file quickly using the following command (adjust the path and values as needed):
  30. ```bash
  31. # Create a directory if it doesn't exist
  32. mkdir -p ~/.config/dify-mcp-server
  33. # Create the config file
  34. cat > ~/.config/dify-mcp-server/config.yaml <<EOF
  35. dify_base_url: "https://cloud.dify.ai/v1"
  36. dify_app_sks:
  37. - "app-your-sk-1"
  38. - "app-your-sk-2"
  39. EOF
  40. echo "Configuration file created at ~/.config/dify-mcp-server/config.yaml"
  41. ```
  42. When running the server (as shown in Step 2), you will need to provide the path to this `config.yaml` file via the `CONFIG_PATH` environment variable if you choose this method.
  43. ### Step2: Installation on your client
  44. ❓ If you haven't installed uv or uvx yet, you can do it quickly with the following command:
  45. ```
  46. curl -Ls https://astral.sh/uv/install.sh | sh
  47. ```
  48. #### ✅ Method 1: Use uvx (no need to clone code, recommended)
  49. ```json
  50. {
  51. "mcpServers": {
  52. "dify-mcp-server": {
  53. "command": "uvx",
  54. "args": [
  55. "--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server"
  56. ],
  57. "env": {
  58. "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
  59. "DIFY_APP_SKS": "app-sk1,app-sk2",
  60. }
  61. }
  62. }
  63. }
  64. ```
  65. or
  66. ```json
  67. {
  68. "mcpServers": {
  69. "dify-mcp-server": {
  70. "command": "uvx",
  71. "args": [
  72. "--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server"
  73. ],
  74. "env": {
  75. "CONFIG_PATH": "/Users/lyx/Downloads/config.yaml"
  76. }
  77. }
  78. }
  79. }
  80. ```
  81. #### ✅ Method 2: Use uv (local clone + uv start)
  82. You can also run the dify mcp server manually in your clients. The config of client should like the following format:
  83. ```json
  84. {
  85. "mcpServers": {
  86. "mcp-server-rag-web-browser": {
  87. "command": "uv",
  88. "args": [
  89. "--directory", "${DIFY_MCP_SERVER_PATH}",
  90. "run", "dify_mcp_server"
  91. ],
  92. "env": {
  93. "CONFIG_PATH": "$CONFIG_PATH"
  94. }
  95. }
  96. }
  97. }
  98. ```
  99. or
  100. ```json
  101. {
  102. "mcpServers": {
  103. "mcp-server-rag-web-browser": {
  104. "command": "uv",
  105. "args": [
  106. "--directory", "${DIFY_MCP_SERVER_PATH}",
  107. "run", "dify_mcp_server"
  108. ],
  109. "env": {
  110. "CONFIG_PATH": "$CONFIG_PATH"
  111. }
  112. }
  113. }
  114. }
  115. ```
  116. Example config:
  117. ```json
  118. {
  119. "mcpServers": {
  120. "dify-mcp-server": {
  121. "command": "uv",
  122. "args": [
  123. "--directory", "/Users/lyx/Downloads/dify-mcp-server",
  124. "run", "dify_mcp_server"
  125. ],
  126. "env": {
  127. "DIFY_BASE_URL": "https://cloud.dify.ai/v1",
  128. "DIFY_APP_SKS": "app-sk1,app-sk2",
  129. }
  130. }
  131. }
  132. }
  133. ```
  134. ### Enjoy it
  135. At last, you can use dify tools in any client who supports mcp.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.