dify
A Model Context Protocol server for Dify
claude mcp add --transport stdio ai-fe-dify-mcp-server node your/path/dify-server/build/index.js \ --env DIFY_API_KEY="***"
How to use
This MCP server integrates the Dify AI API to provide Ant Design component code generation capabilities through the Model Context Protocol (MCP). It accepts text prompts (and optional image inputs) and streams responses as the code for Ant Design business components is generated. The server enables chat-style interactions with the Dify AI model to refine and iterate on the generated code, with support for uploading images to inform the component design. The core tool exposed by this server is the antd-component-codegen-mcp-tool, which orchestrates the prompt handling, file uploads, and streaming of code results. To use it, you connect a client through MCP’s stdio interface, send a request, and receive a streaming response that progressively yields the generated code. The system is designed to work well in environments where you want live, interactive generation of UI components based on natural language descriptions and optional visual references.
How to install
Prerequisites:
- Node.js (LTS) installed
- npm installed
Installation steps:
- Clone or download the repository for the dify MCP server
- Install dependencies npm install
- (Optional) Run in development watch mode for automatic rebuilds npm run watch
- Build the server for production or deployment npm run build
- Run the server (example, adjust paths as needed) node build/index.js
Notes:
- Ensure you have a valid DIFY_API_KEY for integration with the Dify AI API and place it in the environment or config as required by the server setup.
- The server communicates via stdio when run in certain environments; verify your client is configured to connect via stdin/stdout as documented in MCP tooling.
Additional notes
Tips and common considerations:
- Set DIFY_API_KEY in the environment where the MCP server runs to enable access to Dify AI capabilities.
- The antd-component-codegen-mcp-tool supports text prompts and optional image inputs; use image inputs to influence component styling and structure when applicable.
- Streaming responses allow you to display partial code as it is generated, improving perceived latency.
- Debugging MCP servers can be challenging due to stdio communication; consider using MCP Inspector for browser-based debugging and to inspect message sequences.
- If integrating with Continue or Cline configurations, mirror the env and args shown in the README to ensure consistent behavior across environments.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.