Generates Apple-style mobile app prototypes following Apple's Human Interface Guidelines (HIG) design specifications
Compatible with Coze platform as an MCP client for seamless integration of diagram and prototype generation capabilities
Integrates with Google Gemini API to power AI-driven diagram and prototype generation using Google's Gemini language models
Integrates with OpenAI's API to generate AI-driven diagrams and prototypes using OpenAI's language models for intelligent content creation
AI Diagram & Prototype Generator (MCP Server)
一个专业的、AI驱动的图表与原型绘制MCP服务器。它深度集成了智谱AI、OpenAI、Gemini等多种大语言模型,能够根据自然语言描述,智能生成多种风格的 draw.io
格式图表和 HTML
交互式产品原型。
✨ 功能特性 (Features)
- 🤖 AI 驱动生成:内置多种强大的AI模型,智能理解复杂需求。
- 🎨 多图表类型:不仅能画架构图、流程图,还能生成多种风格的UI/UX原型。
- 📱 风格化原型 (Styled Prototypes):内置苹果HIG、微信小程序等专业设计规范,一句话生成“苹果味”或“微信味”的精准原型。
- 🧊 动态提示词系统:独创的
(意图+格式)
组合式提示词系统,精确、稳定地指导AI进行创作。 - 🔧 Draw.io & HTML 兼容:可生成
.drawio
文件用于二次编辑,或生成可直接运行的.html
文件进行交互演示。 - 🤯 智能回退机制:在AI生成Draw.io图表失败或内容过简时,自动切换到内置的规则引擎,保证总有产出。
- 🤝 MCP 协议:基于 Model Context Protocol,可无缝与支持MCP的AI助手(如OpenAI的Assistants、Coze、Dify、各种IDE插件等)集成。
🚀 支持的图表与原型
本工具通过 prompt_id
(意图) 和 file_type
(输出格式) 的组合来驱动。以下是目前支持的组合:
功能/意图 (Intent) | prompt_id | 支持格式 (file_type ) |
---|---|---|
生成技术架构图 | architecture | draw.io |
生成业务流程图 | flowchart | draw.io |
生成通用UI/UX原型 | UI_UX | draw.io (线框图), html |
生成苹果风格App原型 | APPLE_MOBILE_APP | html |
生成微信小程序原型 | WEIXIN_MINIAPP | html |
🚀 效果
以下范例通过chatwise 配合本mcp,使用glm-4.5模型生成
对话过程
生成的架构图
生成的业务流程图
生成的APP原型
⚙️ 安装与配置
1. 环境要求
- Python 3.10+
pip
或uv
等Python包管理工具- 支持 MCP 的 AI 客户端(如 Coze, Dify, 或其他兼容的Agent)
2. 安装依赖
3. 配置 API Key
获取API Key
你需要获取以下至少一个服务商的API Key:
- 智谱AI (ZhipuAI): 智谱AI开放平台
- OpenAI: OpenAI Platform
- Google Gemini: Google AI for Developers
配置 .env
文件
这是最重要也是最推荐的配置方式。
4. 配置 MCP 客户端
在你的AI助手的设置中,添加一个MCP服务器。以下是一个更简洁、更安全的配置示例:
说明:
command
: 直接使用python
命令。args
: 提供mcp_server.py
文件的绝对路径。env
: 非必需。.env
文件是首选。只有当你需要为这个特定的客户端覆盖.env
中的设置时(例如,强制它使用openai
),才在这里添加配置。不推荐在此处直接粘贴API Key。
📖 使用方法
在AI助手中,通过清晰的指令调用工具。请确保你的指令包含了做什么 (prompt_id
)、生成什么格式 (file_type
) 和 保存到哪里 (output_file
) 的关键信息。
示例1:生成架构图
示例2:生成苹果风格原型
API 参考
你的AI助手将会调用以下工具:
generate_diagram
根据指定的意图和格式,生成图表或原型。
参数:
prompt_id
(string, 必需): 意图ID。通过list_support_diagram_types
工具获取。file_type
(string, 必需): 输出文件格式。description
(string, 必需): 对图表或原型的详细描述。output_file
(string, 必需): 输出文件的完整路径。diagram_name
(string, 可选): 图表或HTML页面的标题。
示例调用 (AI后台的实际调用格式):
list_support_diagram_types
列出当前支持的所有 prompt_id
及其对应的 file_type
组合。
项目结构
[+]
常见问题 (FAQ)
Q: 如何扩展更多图表类型或Prompt模板?
A: 非常简单!只需两步:
- 添加Prompt文件: 在
prompts/
目录下,创建一个新的.md
文件,写入你的指令。例如my_custom_diagram.md
。 - 更新配置字典: 打开
mcp_server.py
,修改TOOLS_PROMPT_DICT
字典:重启MCP服务器即可生效!
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables generation of professional diagrams and interactive prototypes from natural language descriptions using multiple AI models. Supports creating draw.io diagrams, HTML prototypes, and styled mobile app interfaces with Apple HIG and WeChat Mini Program design standards.
Related MCP Servers
- AsecurityFlicenseAqualityAn AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.Last updated -43,6613,313TypeScript
- AsecurityFlicenseAqualityAI-driven tool that helps developers create beautiful UI components instantly through natural language descriptions, integrating with popular IDEs like Cursor, Windsurf, and VSCode.Last updated -32
- AsecurityFlicenseAqualityA powerful AI-driven tool that helps developers create beautiful, modern UI components instantly through natural language descriptions.Last updated -43,661TypeScript
- AsecurityFlicenseAqualityA simple AI development tool that helps users interact with AI through natural language commands, offering 29 tools across thinking, memory, browser, code quality, planning, and time management capabilities.Last updated -3115TypeScript