Content
# dify-server MCP Server
A Model Context Protocol server integrated with Dify AI API
This is a TypeScript-based MCP server that provides code generation capabilities for Ant Design business components by integrating the Dify AI API. It demonstrates the following core MCP concepts:
- Integration of Dify AI API to implement chat completion functionality
- Support for text and image input
- Streaming response handling
## Features
### Tools
- `antd-component-codegen-mcp-tool` - Generates Ant Design business component code
- Supports text and optional image input
- Handles image file uploads
- Supports streaming responses from Dify AI API
## Development Guide
Install dependencies:
```bash
npm install
```
Development mode (auto-rebuild):
```bash
npm run watch
```
Build the server:
```bash
npm run build
```
## Installation Instructions
### Integration in Continue
Add the following configuration in `~/.continue/config.json`:
```json
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "node",
"args": ["your/path/dify-server/build/index.js"],
"env": {
"DIFY_API_KEY": "***"
}
}
}
]
}
}
```
### Integration in Cline
Add the following configuration in `your/path/cline_mcp_settings.json`:
```json
{
"mcpServers": {
"dify-server": {
"command": "node",
"args": ["your/path/dify-server/build/index.js"],
"env": {
"DIFY_API_KEY": "***"
}
}
}
}
```
### Debugging
Since the MCP server communicates via standard input and output (stdio), debugging can be somewhat challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which can be started with the following command:
```bash
npm run inspector
```
The Inspector will provide a debugging tool URL that can be accessed in the browser.
Connection Info
You Might Also Like
MarkItDown MCP
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
Git
A Model Context Protocol server for Git automation and interaction.
Everything
Model Context Protocol Servers