npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iflow-mcp/difybase-dify-mcp4

v1.0.0

Published

Dify Connect MCP Server - MCP server for interacting with Dify API

Downloads

42

Readme

Dify Connect MCP

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.shrun-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"