Content
# dify-server MCP Server
A Model Context Protocol server that integrates the 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 processing
## Features
### Tools
- `antd-component-codegen-mcp-tool` - Generate Ant Design business component code
- Supports text and optional image input
- Handles image file uploads
- Supports streaming responses from the Dify AI API
## Development Guide
Install dependencies:
```bash
npm install
```
Development mode (automatic rebuild):
```bash
npm run watch
```
Build the server:
```bash
npm run build
```
## Installation Instructions
### Integration in Continue
Add the following configuration to `~/.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 to `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 MCP servers communicate via standard input/output (stdio), debugging can be difficult. We recommend using [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 accessible in the browser.
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
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.