Atlas / MCP servers / ai-fe / Dify

DifySAFE

mcp/ai-fe/dify-1

A Model Context Protocol server for Dify

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
1 0r · 1w · 0d
Transport
stdio
License
—
Stars
42
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

一个集成 Dify AI API 的 Model Context Protocol 服务器

这是一个基于 TypeScript 的 MCP 服务器,通过集成 Dify AI API 来提供 Ant Design 业务组件的代码生成能力。它展示了以下核心 MCP 概念:

  • 集成 Dify AI API 实现聊天完成功能
  • 支持文本和图片输入
  • 流式响应处理

功能特性

Tools

  • antd-component-codegen-mcp-tool - 生成 Ant Design 业务组件代码
  • 支持文本和可选的图片输入
  • 处理图片文件上传
  • 支持来自 Dify AI API 的流式响应

开发指南

安装依赖:

npm install

开发模式(自动重新构建):

npm run watch

构建服务器:

npm run build

安装说明

在 Continue 中集成

在~/.continue/config.json中添加以下配置:

{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "node",
"args": ["your/path/dify-server/build/index.js"],
"env": {
"DIFY_API_KEY": "***"
}
}
}
]
}
}

在 Cline 中集成

在your/path/cline_mcp_settings.json中添加以下配置:

{
"mcpServers": {
"dify-server": {
"command": "node",
"args": ["your/path/dify-server/build/index.js"],
"env": {
"DIFY_API_KEY": "***"
}
}
}
}

调试

由于 MCP 服务器通过标准输入输出(stdio)进行通信,调试可能会比较困难。我们推荐使用 MCP Inspector,可通过以下命令启动:

npm run inspector

Inspector 将提供一个可在浏览器中访问的调试工具 URL。

Read from source at commit c6106837a140OBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add dify-mcp-server --env DIFY_API_KEY=${DIFY_API_KEY} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "dify-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "DIFY_API_KEY": "${DIFY_API_KEY}"
      }
    }
  }
}
03

Exposed tools (1)

0 read · 1 write · 0 destructive.

ToolRiskDescription
antd-component-codegen-mcp-toolwriteSend a message to Dify chat API for generating antd biz components code
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (3 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (2)

LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
axios, eventsource-parser, form-data, @types/node, typescript
Why it matters. 5 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass, no_license.

Audited 2026-10-08 · audit v0.4.1 · source sha c6106837a140full audit observations/trust-audit/mcp-server/ai-fe__dify-1.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08c6106837a140SAFEB89first audit
06

Questions

What is the Dify MCP server?

A Model Context Protocol server for Dify

What tools does Dify expose?

1 in total: 0 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Dify safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does Dify need?

It reads DIFY_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Dify run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as dify-mcp-server at 0.1.0.

How current is this page?

The grade is for one exact copy of the source (c6106837a140), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement