Lanhu MCP Server
From a Lanhu design link an agent gets HTML with CSS, design tokens, layers and slices, with no manual export from the editor.
- 148 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The Lanhu account cookie opens every project and acts like a password.
- The server calls the Lanhu service on your behalf and passes it design links.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/mrdgbot-lanhu-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The Lanhu account cookie opens every project and acts like a password.
- The server calls the Lanhu service on your behalf and passes it design links.
This is third-party code. Review the repository files before installing.
What it does
`mcp-lanhu` is a Lanhu MCP server for Cursor, Windsurf, Claude Desktop and Claude Code. An agent gets a design link and reads the design: the `lanhu_design` tool in `analyze` mode returns HTML and CSS with design tokens ranked by usage, `tokens` returns only tokens, `slices` exports slices and icons, and `list` shows a project's designs. The `lanhu_page` tool parses PRDs and Axure prototypes, and `lanhu_resolve_invite` turns an invite link into a project URL. The `include` parameter picks what to return: `html`, `image`, `tokens`, `layout`, `layers` or `slices`, and `layer_depth` limits layer nesting. There is a `project-designs` resource and two prompts, `frontend-dev` and `design-review`.
Who it is for. Frontend developers who receive designs and requirements in Lanhu and want to build components from a link without opening the design editor.
Good fit when
- A developer pastes a design link and asks for a component built from it.
- A design's colors, fonts and shadows are needed as a token list.
- Icons and images are exported in bulk from a project.
- A PRD or Axure prototype goes to an agent for requirement-driven development.
Not a fit when
- Designs live in Figma or another service rather than Lanhu.
- The account cookie cannot be handed to a local server.
- You need a visual test of finished markup: the server reads designs and does not compare screenshots.
Example request
Analyze this Lanhu design: return HTML, CSS and color and font tokens, then build a component from it.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
LANHU_COOKIErequired, secret- Cookie header value from your Lanhu session.
Limitations
Sign-in uses your Lanhu account cookie: `LANHU_COOKIE` equals the `Cookie` header value copied from the browser developer tools. The cookie opens every project in the account, so keep it like a password and never commit it. The server runs over stdio and calls Lanhu on your behalf. Node.js 20 or newer is required. The README and docs are in Chinese, with an English version in `docs/README_EN.md`.
How to disable. Remove the `lanhu` entry from the client settings and sign out of the Lanhu session the cookie came from. Remove `LANHU_COOKIE` from the environment and the `.env` file.
FAQ
How do I get the cookie?
Sign in to Lanhu, open developer tools, go to the Network tab and copy the `Cookie` header of any request.
Which modes does `lanhu_design` have?
`list`, `analyze` (default), `tokens` and `slices`.
How do I limit layer depth?
Request `layers` and set `layer_depth`: the default is 4, `0` returns the top level and `"all"` the full tree.
Do I need to clone the repository?
No, `npx -y mcp-lanhu` fetches the package itself. Cloning is only for development.
How does it differ from `lanhu-mcp-server`?
It is a separate project with its own `mcp-lanhu` package. The `lanhu-mcp-server` card sits next to it in the catalog.
Discussion
No questions or reviews yet.
Related
MCP serversMCP server for the Lanhu design service: the agent reads Axure prototypes and designs, exports slices and shares a team board
A MasterGo MCP server that hands agents the DSL of a design file from a link so they rebuild the layout as HTML or a component.
A design studio for people and agents: dsa CLI, MCP endpoint and skill to edit layouts, slides, reports and 3D together.
The Arc UI MCP server: an agent searches animated React components, reads docs and props and gets the shadcn install command.
An MCP server and plugin to build UI with the agent: curated design systems, UI prompts and layout variations
A design-system MCP server and linter: the agent reads tokens and rules before generating UI, and a check returns violations
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Lanhu MCP Server (this card) | no | API key | 148 | |
| Lanhu MCP Server | no | API key | 2,571 | another Lanhu project covering Axure prototypes and designs, while this package adds design tokens, layer depth and review prompts |
| MasterGo Magic MCP | yes | API key | 289 | returns DSL from MasterGo files, while this server reads designs and requirement documents from Lanhu |
README in short
The README explains that the package connects Lanhu to editors and AI agents: installation through `npx`, getting the cookie, tool and mode descriptions, resources and prompts. A client compatibility table and the source build steps are given separately.