lanhu-context-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-context-mcpprovide implementation context for this Lanhu design: https://lanhuapp.com/design/abc123"
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.
lanhu-context-mcp
Simplified Chinese | English
✨ Organizes Lanhu design drafts into context for AI to generate code and reconstruct pages.
Features
🎨 Supports outputting
HTML+CSSorHTML+Tailwind, allowing you to choose the more suitable format based on your project's tech stack.🖼️ Returns image asset mappings and download commands, reducing the steps of manually processing image assets one by one.
🧱 Includes
Design Tokensand design previews to facilitate downstream models in implementation and visual verification.🧭 Provides implementation guidance for downstream AI, clarifying priorities, adaptation methods, and constraints.
⚙️ Supports configuring
Tailwindoutput, skipping image slicing, unit scaling, and prompt language via CLI arguments and environment variables.
Related MCP server: lanhu-mcp-server
Documentation
For full documentation, please visit lanhu.refineup.com.
Quick Start
Environment Requirements
Node.js
^20.19.0 || >=22.12.0
Design Draft Transcoding
Design drafts must have the transcoding feature enabled before being uploaded to Lanhu.
Step 1. Prepare Environment Variables
First, create a .env.local file.
You will need a valid Lanhu login token. Refer to Getting Lanhu Token.
LANHU_TOKEN=your_lanhu_token_hereStep 2. Configure MCP
Write the MCP configuration for the corresponding client below into the appropriate file:
Codex (.codex/config.toml)
[mcp_servers.lanhu-context-mcp]
cwd = "/absolute/path/to/current-project"
command = "npx"
args = ["-y", "lanhu-context-mcp"]Claude Code (.mcp.json) / Cursor (.cursor/mcp.json)
{
"mcpServers": {
"lanhu-context-mcp": {
"command": "npx",
"args": ["-y", "lanhu-context-mcp"]
}
}
}The MCP configuration for Codex is unique; it requires an additional cwd setting, which should be filled with the absolute path of the current project. Since this path usually varies by user, it is generally not recommended to commit .codex/config.toml to Git. It is suggested to add it to your Git ignore and have each developer maintain it locally.
Windows
If the npx configuration above fails to start on Windows, you can use the following syntax instead:
Codex (WSL2)
[mcp_servers.lanhu-context-mcp]
cwd = "/absolute/path/to/current-project"
command = "npx"
args = ["-y", "lanhu-context-mcp"]Codex (Native)
[mcp_servers.lanhu-context-mcp]
cwd = "C:\\absolute\\path\\to\\current-project"
command = "C:\\Program Files\\nodejs\\npx.cmd"
args = ["-y", "lanhu-context-mcp"]
[mcp_servers.lanhu-context-mcp.env]
APPDATA = "C:\\Users\\{your-name}\\AppData\\Roaming"
LOCALAPPDATA = "C:\\Users\\{your-name}\\AppData\\Local"
USERPROFILE = "C:\\Users\\{your-name}"
HOME = "C:\\Users\\{your-name}"
SYSTEMROOT = "C:\\Windows"
COMSPEC = "C:\\Windows\\System32\\cmd.exe"Claude Code (.mcp.json) / Cursor (.cursor/mcp.json)
{
"mcpServers": {
"lanhu-context-mcp": {
"command": "cmd",
"args": ["/c", "npx", "-y", "lanhu-context-mcp"]
}
}
}For Codex native fallback reference:
openai/codex#2555
Step 3. Install Lanhu Helper Google Chrome Extension
After installing Lanhu Helper, you can right-click in Lanhu to copy selected layer links or example prompts directly.
Step 4. Send Lanhu Links and Prompts to AI
请根据这个蓝湖设计稿实现
@https://lanhuapp.com/web/#/item/project/detailDetach?tid={tid}&pid={pid}&project_id={project_id}&image_id={image_id}https://lanhuapp.com/web/#/item/project/detailDetach?tid={tid}&pid={pid}&project_id={project_id}&image_id={image_id}You can write prompts according to your own ideas, but the Lanhu URL must be complete and correct; otherwise, the tool cannot be called properly.
View more detailed documentation
Ecosystem
Lanhu Helper — The companion Lanhu Chrome browser extension, which allows you to right-click in Lanhu to copy selected layer links and example prompts.
License
Copyright (c) 2026-present, REFINIST
This server cannot be deployed
Maintenance
Related MCP Connectors
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
- miromiroOAuthapp.miromiro
Turn any live website into brand colors, fonts, design tokens, SVGs, Lottie and paste-ready code.
Turns any URL into SEO metadata, contacts, tech stack, and AI-ready Markdown, in one call.
AI-powered design and management for Webflow Sites
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI to directly read and analyze Lanhu design drafts and requirement documents to generate HTML, CSS, and structural analyses. It allows users to extract design slices and process prototype pages directly within AI clients.3199 npm127MIT
- AlicenseAqualityBmaintenanceEnables AI coding tools to read Lanhu design data and automate Design to Code, including project browsing, layer tree extraction, DDS semantic components, and code generation.1468 npm2MIT
- AlicenseBqualityBmaintenanceFetches Lanhu UI design specs and assets with minimal tokens, enabling coding agents to implement high-fidelity UI by providing precise coordinates, styles, and downloaded resources.22MIT
- AlicenseAqualityCmaintenanceProvides AI coding agents with structured access to Lanhu design data, enabling direct inspection of artboards, extraction of pixel-perfect layer styles and CSS attributes, and downloading of design assets without vision token overhead.9MIT