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

dify-mcp

v1.0.7

Published

Dify MCP Server

Readme

Dify MCP Server

这是一个符合 MCP (Model Context Protocol) 规范的 Dify Agent 服务器。

功能特点

  • 符合 MCP 协议规范
  • 提供标准的 MCP 接口
  • 支持与 Dify Agent 的集成
  • 包含健康检查接口
  • 支持用户标识

安装步骤

  1. 克隆项目
git clone [项目地址]
cd dify-mcp
  1. 安装依赖
pip install -r requirements.txt
  1. 配置环境变量
cp .env.example .env

然后编辑 .env 文件,填入你的 Dify API 密钥和 URL。

运行服务

python main.py

服务将在 http://localhost:8000 启动

MCP 接口

MCP 请求接口

  • 路径: /mcp
  • 方法: POST
  • 请求体:
{
    "query": "对话内容",
    "user": "可选的用户ID"
}

Schema 接口

  • 路径: /schema
  • 方法: GET
  • 返回服务器的参数定义

健康检查

  • 路径: /health
  • 方法: GET

MCP 配置示例

mcp_settings.json 中的配置示例:

{
  "dify-chat": {
    "command": "python",
    "args": ["main.py"],
    "schema": {
      "parameters": {
        "query": {
          "type": "string",
          "description": "Dify 对话内容"
        },
        "user": {
          "type": "string",
          "description": "用户 ID"
        }
      },
      "required": ["query"]
    }
  }
}

注意事项

  1. 确保已正确配置 Dify API 密钥
  2. 建议在生产环境中使用 HTTPS
  3. 可以根据需要调整端口号
  4. 确保服务器符合 MCP 协议规范