@winstonsias/dify-api-mcp-service

0.0.12 • Public • Published

Dify API MCP Service

A Model Context Protocol (MCP) service for Dify API integration.

Installation

You can install the package globally using npm:

npm install -g @winstonsias/dify-api-mcp-service

Or use npx to run it directly:

npx @winstonsias/dify-api-mcp-service

Usage

After installation, you can start the service using:

dify-api-mcp-service --base-url "https://api.dify.ai" --chat-api-key "your-chat-api-key" --workflow-api-key "your-workflow-api-key"

Command Line Arguments

The service accepts the following command line arguments:

  • --base-url: The base URL of your Dify API instance
  • --chat-api-key: Your Dify chat API key (comma-separated for multiple keys)
  • --workflow-api-key: Your Dify workflow API key (optional, comma-separated for multiple keys)

Example:

dify-api-mcp-service \
  --base-url "https://api.dify.ai" \
  --chat-api-key "key1,key2,key3" \
  --workflow-api-key "workflow-key1,workflow-key2"

Features

  • Chat message handling
  • Workflow execution
  • Dynamic tool registration based on app parameters
  • Comprehensive logging
  • 5-minute request timeout

Logging

Logs are written to daily files in the logs directory with the format YYYYMMDD.log.

License

MIT

Package Sidebar

Install

npm i @winstonsias/dify-api-mcp-service

Weekly Downloads

16

Version

0.0.12

License

MIT

Unpacked Size

16.4 kB

Total Files

8

Last publish

Collaborators

  • winstonsias