Dify AI协议服务器

一个为Dify AI提供标准化协议交互的服务器,支持聊天完成API集成、上下文对话和流式响应。

  • by guten-tag-100
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 yosuke-kuroki/mcp-server-dify

使用说明

mcp服务器dify

Dify AI的模型上下文协议服务器。该服务器使LLM能够通过标准化的协议与Dify人工智能的聊天完成功能进行交互。

特性

  • 与Dify AI聊天完成API集成
  • 餐厅推荐工具(meshi-doko)
  • 支持对话上下文
  • 流媒体响应支持
  • TypeScript实现

安装

使用Docker

# Build the Docker image
make docker

# Run with Docker
docker run -i --rm mcp/dify https://your-dify-api-endpoint your-dify-api-key

用法

使用克劳德桌面

将以下配置添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "dify": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-dify",
        "https://your-dify-api-endpoint",
        "your-dify-api-key"
      ]
    }
  }
}

替换 your-dify-api-endpoint 和 your-dify-api-key 使用您的实际Dify API证书。

工具

多科小姐

与Dify AI接口的餐厅推荐工具:

参数:

  • LOCATION (string):餐厅的位置
  • BUDGET (字符串):预算限制
  • query (string):要发送给Dify AI的查询
  • conversation_id (string,可选):用于维护聊天上下文

发展

# Initial setup
make setup

# Build the project
make build

# Format code
make format

# Run linter
make lint

许可证

该项目发布于 MIT许可证.

安全

此服务器使用您提供的API密钥与Dify AI交互。确保:

  • 确保API证书的安全
  • 对API终结点使用HTTPS
  • 永远不要将API密钥提交到版本控制

贡献

欢迎投稿!请随时提交拉取请求。