Atlas / MCP servers / difybase / Dify Connect

Dify ConnectSAFE

mcp/difybase/dify-connect
Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
2 2r · 0w · 0d
Transport
stdio
License
—
Stars
32
01

Overview

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

Dify APIと連携するModel Context Protocol (MCP) サーバー。

概要

このMCPサーバーは、Dify APIと連携して、チャットアプリケーションにクエリを送信し、結果を取得する機能を提供します。

機能

  • dify-chat: Difyチャットアプリにクエリを送信し、応答を取得します
  • knowledge-base-query: Difyの知識ベースにクエリを送信し、応答を取得します

セットアップ

前提条件

  • Node.js (v16以上)
  • npm
  • Dify APIキー

インストール

  1. 依存関係をインストールします:
npm install
  1. TypeScriptコードをコンパイルします:
./build.sh

設定

以下の環境変数を設定する必要があります:

  • DIFY_BASE_URL: Dify APIのベースURL(デフォルト: https://api.dify.ai/v1)
  • DIFY_SECRET_KEY: Dify APIキー(必須)
  • NODE_ENV: 実行環境(development/production)
  • LOG_LEVEL: ログレベル(debug/info/warn/error)

これらの環境変数は、.envファイルで設定できます:

  1. .env.exampleファイルを.envにコピーします:
cp .env.example .env
  1. .envファイルを編集して、実際のDify APIキーを設定します:
# Dify API設定
DIFY_BASE_URL=https://api.dify.ai/v1
DIFY_SECRET_KEY=your_actual_dify_secret_key_here

# サーバー設定
NODE_ENV=production
LOG_LEVEL=info

スクリプト(start-mcp.shとrun-mcp.sh)は自動的に.envファイルから環境変数を読み込みます。

実行

サーバーを起動するには:

./start-mcp.sh

MCPサーバーの設定

Clineで使用するには、MCPサーバー設定ファイルに以下を追加します:

{
"mcpServers": {
"dify-connect-mcp": {
"command": "/bin/bash",
"args": ["/run-mcp.sh"],
"disabled": false,
"autoApprove": []
}
}
}

``は、実際のリポジトリのパスに置き換えてください。

この設定では、run-mcp.shスクリプトが.envファイルから環境変数を読み込むため、MCPサーバー設定ファイルに直接APIキーを記述する必要はありません。

使用例

MCPサーバーが設定されると、以下のようなコマンドでDifyにクエリを送信できます:

dify-chat "こんにちは、今日の天気は?"

または知識ベースにクエリを送信:

knowledge-base-query "製品の特徴について教えてください" "knowledge_base_id_here"
Read from source at commit b01e2eaf26f2OBSERVED · 2026-10-08
Advertisement
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-mcp4 --env DIFY_SECRET_KEY=${DIFY_SECRET_KEY} -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "dify-mcp4": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "DIFY_SECRET_KEY": "${DIFY_SECRET_KEY}"
      }
    }
  }
}
03

Exposed tools (2)

2 read · 0 write · 0 destructive.

ToolRiskDescription
dify-chatreadDifyチャットアプリにクエリを送信し、応答を取得します
knowledge-base-queryreadDifyの知識ベースにクエリを送信し、応答を取得します
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 (1 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
@modelcontextprotocol/sdk, axios, dotenv, express, winston, @types/express, @types/node, ts-node
Why it matters. 9 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 b01e2eaf26f2full audit observations/trust-audit/mcp-server/difybase__dify-connect.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-08b01e2eaf26f2SAFEB89first audit
06

Questions

What tools does Dify Connect expose?

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

Is Dify Connect 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 Connect need?

It reads DIFY_SECRET_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 Connect run?

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

How current is this page?

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

Advertisement