lanhu-design-mcp — Claude Code MCP server: reads Lanhu designs
An MCP server that reads Lanhu projects and hands your agent a design's UI structure with units matched to the target platform.
claude mcp add lanhu-design-mcp -- uvx lanhu-design-mcpWhat lanhu-design-mcp does
The server talks to Lanhu and works through projects: it lists every design in one, analyses the design you pick, and returns the UI structure with sizes converted to Android dp, iOS pt, Web px or WeChat rpx. It also returns the full design plus fine-grained slices from Sketch, Figma and Photoshop, each with links for multiple densities. One tool bundles the assets and the analysis into a single context an agent can rebuild a screen from.
Login runs through a dedicated local Chrome profile. You call lanhu-design-mcp auth login once, finish signing in in the window that opens, and later MCP calls reuse that session without showing a browser. Cookies are not accepted any other way — no environment variables, no cookie file. Check the state with lanhu-design-mcp auth status; sign out with lanhu-design-mcp auth logout --confirm.
macOS is required, along with Google Chrome and Python 3.10 or newer. On anything else the server answers unsupported_platform, so Linux and Windows are out. A missing Chrome or Playwright library shows up as dependency_missing, which an upgrade of the package fixes. Pull signed asset URLs down into your project right away — building on those remote Lanhu links long term is a bad idea.
What it helps with
- pull a Lanhu design's structure into an agent
- convert design sizes into dp, pt, px or rpx
- export fine-grained slices from a design
- gather context for rebuilding a screen from a design
- check whether the server is signed in to Lanhu
Example prompts for the agent
- List every design in the Lanhu project
- Analyse this design and give me the structure in iOS units
- Build the UI rebuild context for this design
How to install lanhu-design-mcp
Platform CLI
claude mcp add lanhu-design-mcp -- uvx lanhu-design-mcpuvx runs the command named after the package; if the README names another one, use uvx --from lanhu-design-mcp <command>
Platform CLI
codex mcp add lanhu-design-mcp -- uvx lanhu-design-mcpuvx runs the command named after the package; if the README names another one, use uvx --from lanhu-design-mcp <command>
Config file
{
"mcpServers": {
"lanhu-design-mcp": {
"command": "uvx",
"args": [
"lanhu-design-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from lanhu-design-mcp <command>
Config file
{
"servers": {
"lanhu-design-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"lanhu-design-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from lanhu-design-mcp <command>
Platform CLI
gemini mcp add lanhu-design-mcp uvx lanhu-design-mcpuvx runs the command named after the package; if the README names another one, use uvx --from lanhu-design-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about lanhu-design-mcp
How do I install lanhu-design-mcp in Claude Code?
Run claude mcp add lanhu-design-mcp -- uvx lanhu-design-mcp, then sign in once with lanhu-design-mcp auth login.
What does lanhu-design-mcp do?
It reads Lanhu projects, lists their designs, analyses a chosen design into a platform-adjusted UI structure, and returns fine-grained slices with multi-density links.
Why won't the server start on Linux?
It only supports macOS. On another system it returns unsupported_platform.