mcpField
M
mcp-server-dify

mcp-server-dify

Local
github.com/yuru-shaAI & Agents11Updated 77w ago

About mcp-server-dify

mcp-server-dify connects MCP clients to Dify AI chat completion capabilities. Its tools include restaurant recommendations, conversation context, and streaming responses.

Key features

  1. 01Dify AI chat completion integration
  2. 02Restaurant recommendation tool
  3. 03Conversation context support
  4. 04Streaming responses

Use cases

  1. 01Request restaurant recommendations by location and budget
  2. 02Continue a conversation using its conversation ID

MCP support

It exposes Dify AI chat completion capabilities through MCP, including the meshi-doko restaurant recommendation tool and support for conversation context and streaming responses.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dify": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/dify"
]
}
}
}
Run commanddocker run -i --rm mcp/dify

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocimcp/dify

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-server-dify

CI Status

Model Context Protocol Server for Dify AI. This server enables LLMs to interact with Dify AI's chat completion capabilities through a standardized protocol.

Features

  • Integration with Dify AI chat completion API
  • Restaurant recommendation tool (meshi-doko)
  • Support for conversation context
  • Streaming response support
  • TypeScript implementation

Installation

Using 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

Usage

With Claude Desktop

Add the following configuration to your claude_desktop_config.json:

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

Replace your-dify-api-endpoint and your-dify-api-key with your actual Dify API credentials.

Tools
meshi-doko

Restaurant recommendation tool that interfaces with Dify AI:

Parameters:

  • LOCATION (string): Location of the restaurant
  • BUDGET (string): Budget constraints
  • query (string): Query to send to Dify AI
  • conversation_id (string, optional): For maintaining chat context

Development

# Initial setup
make setup

# Build the project
make build

# Format code
make format

# Run linter
make lint

License

This project is released under the MIT License.

Security

This server interacts with Dify AI using your provided API key. Ensure to:

  • Keep your API credentials secure
  • Use HTTPS for the API endpoint
  • Never commit API keys to version control

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.