# lanhu-design-mcp [Health: Active]

**Category:** 📐 Architecture & Design  
**Repository:** https://github.com/blantian/lanhu-design-mcp  
**GitHub Stars:** 5  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/lanhu-design-mcp

## Description
Read Lanhu design specs and export fine-grained UI assets with platform-adjusted units

## Tools
Capabilities this server exposes over MCP:

- **lanhu_health_check** — 返回本地配置状态，不访问网络且不暴露 Cookie 值。
- **lanhu_get_designs** — 获取项目的所有设计图列表。
- **lanhu_analyze_design** — 分析指定设计稿并返回平台调整后的 UI 结构。
- **lanhu_get_design_assets** — 返回完整设计图与细粒度可下载切图资源。
- **lanhu_export_ui_context** — 返回包含资产和分析的完整 Agent UI 还原上下文。
- **lanhu_auth_login** — 打开专属 Chrome Profile 进行交互式 Lanhu 登录。
- **lanhu_auth_status** — 报告托管认证状态，不含凭据信息。
- **lanhu_auth_logout** — 登出并删除托管 Profile，需要 confirm=true 确认。

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "lanhu-design-mcp": {
    "command": "uvx",
    "args": ["lanhu-design-mcp"]
  }
}
```

## Documentation

## What lanhu-design-mcp MCP server does

The lanhu-design-mcp MCP server connects MCP-compatible clients to Lanhu design projects on macOS. It can enumerate the designs in a project, inspect a selected design, and provide structured information for rebuilding an interface. Analysis adjusts measurements to the target platform: Android uses dp, iOS uses pt, web uses px, and WeChat Mini Programs use rpx.

Asset retrieval covers the full design image as well as fine-grained downloadable resources associated with Sketch, Figma, and Photoshop exports. The UI context export combines design analysis and assets into a response intended for agent-assisted interface reconstruction. Resource URLs are signed, so callers should download the files into their local project instead of treating those remote URLs as permanent dependencies.

## How it works

The package runs as a local stdio MCP process. MCP clients invoke tools through the configured executable, while the server uses a managed Chrome Profile to authenticate with Lanhu. The first login is interactive: a separate local Chrome window opens, and the completed session is reused by later processes. Normal design queries do not open a visible browser.

The available operations include project design listing, platform-aware design analysis, asset retrieval, and combined UI-context export. Health and authentication status checks report local state without exposing credentials. Logging out removes the managed Profile only after explicit confirmation.

## Setup and configuration

Use macOS with Google Chrome installed and Python 3.10 or newer. Install the package with:

```bash
pip install lanhu-design-mcp
```

Authenticate before connecting an agent:

```bash
lanhu-design-mcp auth login
lanhu-design-mcp auth status
```

Add the executable as a stdio server in the MCP client configuration. The command path must point to the installed `lanhu-design-mcp` executable, for example:

```json
{
  "mcpServers": {
    "lanhu-design-mcp": {
      "type": "stdio",
      "command": "/Users/your-name/.local/bin/lanhu-design-mcp",
      "args": []
    }
  }
}
```

No cookie environment variable or cookie file is supported. To remove the managed login session, run `lanhu-design-mcp auth logout --confirm` or invoke the logout tool with `confirm=true`.

## Tools and capabilities

The lanhu-design-mcp MCP server provides these tools:

- `lanhu_health_check` checks local configuration without network access.
- `lanhu_get_designs` lists all designs in a project.
- `lanhu_analyze_design` returns platform-adjusted UI structure for a selected design.
- `lanhu_get_design_assets` returns the complete design and fine-grained downloadable assets.
- `lanhu_export_ui_context` combines analysis and assets for UI reconstruction.
- `lanhu_auth_login`, `lanhu_auth_status`, and `lanhu_auth_logout` manage the hosted Chrome authentication session.

Common failures include expired authentication, an unsupported non-macOS platform, missing Playwright or Chrome dependencies, a locked Profile, a cancelled login, or a five-minute login timeout. Re-authenticate, update the package, close competing processes, or retry the interactive login according to the reported status.

_Full upstream README: https://allmcps.com/mcp/lanhu-design-mcp/readme_

