lanhu-design-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lanhu-design-mcp list designs from project 'MobileApp'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
蓝湖设计 MCP
项目简介
面向 macOS 的蓝湖设计读取与细粒度 UI 资源导出 MCP 服务器。
Related MCP server: ui-design-to-code-mcp
功能
读取蓝湖设计项目,列出所有设计图
分析设计稿并返回平台调整后的 UI 结构(Android dp / iOS pt / Web px / 微信 rpx)
返回完整设计图与 Sketch、Figma、Photoshop 细粒度切图资源及多倍率地址
导出包含资产和分析的完整 Agent UI 还原上下文
托管 Chrome Profile 自动登录,无需手动复制 Cookie
系统要求
macOS
Google Chrome(已安装)
Python 3.10 及以上
安装
pip install lanhu-design-mcp首次登录
lanhu-design-mcp auth login
lanhu-design-mcp auth status首次运行打开独立的本地 Chrome Profile,完成一次交互式 Lanhu 登录。后续 MCP 进程自动重用会话,正常设计工具调用不会打开可见浏览器。认证仅使用托管 Chrome Profile,不需要也不支持通过 Cookie 环境变量或 Cookie 文件配置凭据。
lanhu-design-mcp auth logout --confirmMCP 配置
{
"mcpServers": {
"lanhu-design-mcp": {
"type": "stdio",
"command": "/Users/your-name/.local/bin/lanhu-design-mcp",
"args": []
}
}
}将 /Users/your-name 替换为你的本机用户名。此配置适用于 cc-switch 导入。
工具
工具 | 说明 |
| 返回本地配置状态,不访问网络且不暴露凭据 |
| 获取项目的所有设计图列表 |
| 分析指定设计稿并返回平台调整后的 UI 结构 |
| 返回完整设计图与细粒度可下载切图资源 |
| 返回包含资产和分析的完整 Agent UI 还原上下文 |
| 打开专属 Chrome Profile 进行交互式 Lanhu 登录 |
| 报告托管认证状态,不含凭据 |
| 登出并删除托管 Profile,需要 confirm=true |
使用规范
调用方应将返回的签名资源 URL 下载到本地项目,不要生成对远程 Lanhu 签名 URL 的长期依赖。
不得在日志、异常或 MCP 响应中记录或输出凭据信息。
登出必须调用
lanhu_auth_logout并传confirm=true,或 CLI--confirm,仅删除托管的标记 Profile。托管 Chrome Profile 仅存在于本地;认证凭据从不通过 MCP 网络传输。
常见错误
状态 | 说明 | 处理 |
| 凭据无效或过期 | 运行 |
| 仅在 macOS 支持 | 使用 macOS 设备 |
| Playwright Python 库或 Chrome 不可用 |
|
| 托管 Profile 被其他进程占用 | 等待完成后重试 |
| 登录窗口在认证完成前关闭 | 重新运行 |
| 登录窗口 5 分钟内未完成认证 | 重新运行 |
开发验证
git clone https://github.com/blantian/lanhu-design-mcp
cd lanhu-design-mcp
uv sync --dev
uv run pytest许可证
MIT
Available Tools
8 toolslanhu_analyze_designA
分析指定设计稿并返回平台调整后的 UI 结构。
Inputs: url (required), target_platform, design_name_or_index. Returns: object
lanhu_auth_loginB
打开专属 Chrome Profile 进行交互式 Lanhu 登录。
Inputs: no named parameters. Returns: object
lanhu_auth_logoutA
登出并删除托管 Profile,需要 confirm=true 确认。
Inputs: confirm. Returns: object
lanhu_auth_statusC
报告托管认证状态,不含凭据信息。
Inputs: session_id. Returns: object
lanhu_export_ui_contextB
返回包含资产和分析的完整 Agent UI 还原上下文。
Inputs: url (required), target_platform, design_name_or_index. Returns: object
lanhu_get_design_assetsC
返回完整设计图与细粒度可下载切图资源。
Inputs: url (required), target_platform, design_name_or_index. Returns: object
lanhu_get_designsC
获取项目的所有设计图列表。
Inputs: url (required). Returns: object
lanhu_health_checkA
返回本地配置状态,不访问网络且不暴露 Cookie 值。
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: authentication (login, status, logout) and design operations (list, analyze, get assets, export context). There is no overlap, and descriptions clarify any potential confusion between get_design_assets and export_ui_context.
All tools follow a consistent 'lanhu_' prefix with a verb_noun pattern (e.g., lanhu_auth_login, lanhu_get_designs, lanhu_export_ui_context). The only deviation is lanhu_health_check, which is still a common compound noun and does not break consistency.
With 8 tools, the server is well-scoped for its domain of authentication and design retrieval/analysis. Each tool serves a necessary function without redundancy, and the count is within the ideal 3-15 range.
The tool surface covers authentication, health, listing, analysis, and asset retrieval. A minor gap is the lack of a dedicated 'get_design' tool for basic design details without analysis, but the list and analysis tools effectively cover this need.
Maintenance
Related MCP Connectors
An MCP server that provides asset auto generator
MCP server for Appcircle mobile CI/CD platform.
MCP server for LingoHub — localization projects, resources, exports and repository pushes.
The Figma MCP server brings Figma design context directly into your AI workflow.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal MCP server for Tencent CoDesign sharing links, exposing artboards, layer specs, preview images, and exported slices to support design-to-code workflows.860 npm23MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for ingesting UI screenshots, Figma MCP node JSON, or hybrid Figma-plus-screenshot sources into a cross-platform design-to-code artifact pipeline.109 npmMIT
- AlicenseDqualityCmaintenanceAI-powered MCP server for analyzing UI designs and bug reports from Lanhu and Zentao platforms.220 npmMIT
- FlicenseAqualityDmaintenanceRead-only MCP server that converts Lanhu project/design links into design context consumable by Codex or other AI agents.31-