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
Converting files and office documents to Markdown.
Time
Obtaining current time information and converting time between different...
Filesystem
Model Context Protocol Servers
Sequential Thinking
Offers a structured approach to dynamic and reflective problem-solving,...
Git
Model Context Protocol Servers
Context 7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors