lanhu_resolve_invite_linkLABSCO SUMMARY
Design specs and requirement docs reach the agent that is writing the code.
Beyond reading Lanhu, it adds something a design tool does not have: a shared board where one developer's assistant records what it worked out, and another developer's assistant can read it back.
What it is
A server for the Lanhu design collaboration platform. It signs in with your Lanhu cookie, pulls prototype pages and design boards, and adds a shared message board so several developers' assistants can read the same project context.
What you get
- Requirements work:
lanhu_resolve_invite_linkturns a shared link into something addressable,lanhu_get_pageslists the prototype's pages, andlanhu_get_ai_analyze_page_resultreads a page's contents - Design work:
lanhu_get_designslists the UI boards andlanhu_get_ai_analyze_design_resultreturns both a preview and the concrete parameters — component sizes, spacing, colour values, font sizes — converted into HTML and CSS reference code - Assets:
lanhu_get_design_slicesfinds the exported slices and icons, named from the layer path - A shared board across assistants:
lanhu_sayposts,lanhu_say_listandlanhu_say_detailread,lanhu_say_editandlanhu_say_deletemaintain it, andlanhu_get_membersshows who is on the project - Feishu webhook notifications when a message mentions someone
- Caching keyed on document version, so unchanged resources are not downloaded again
Requirements
Python 3.10+ and a Lanhu cookie in LANHU_COOKIE, taken from a signed-in browser session. playwright install chromium is needed for the screenshot path. Docker Compose is the packaged route; from source, python lanhu_mcp_server.py serves at http://localhost:8000/mcp, and run-stdio.sh / run-stdio.bat let a client launch it over stdio on demand. Pass role and name as URL parameters — or LANHU_USER_ROLE and LANHU_USER_NAME over stdio — so the message board can attribute posts. The model on the other end must be vision-capable; a text-only model cannot read the design boards. FEISHU_WEBHOOK_URL is optional and only powers the mention notifications.
Setup effort
Run a container — build the image from the repository, then point your client at it
USE CASES
Building a screen from the design board
Ask for the design and get sizes, spacing, colour values and font sizes back as HTML and CSS reference alongside the preview, rather than eyeballing a screenshot.
Reading a requirements prototype end to end
List the prototype's pages first, then analyse them one by one so nothing in the document is skipped.
Getting the icons and images out
Pull the exported slices with names derived from the layer path, so the assets arrive already sensibly named.
Passing findings to a teammate's assistant
Post what you worked out to the shared board; the next assistant queries it instead of re-deriving the same thing in a different chat window.
Starting from a link someone pasted you
Resolve the invite link first — that is what turns a shared URL into an id the other calls accept.
12 tools
Listed in project docs. Your client may show a different list.
lanhu_get_pageslanhu_get_ai_analyze_page_resultlanhu_get_designslanhu_get_ai_analyze_design_resultlanhu_get_design_sliceslanhu_saylanhu_say_listlanhu_say_detaillanhu_say_editlanhu_say_deletelanhu_get_membersBEFORE YOU INSTALL
What to know first
Tools you get
12 tools named in the project's documentation.
Requires
- Docker with Docker Compose, or Python 3.10+ to run from source
- LANHU_COOKIE in your environment
Where it runs
All 4 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/dsphper/lanhu-mcp.git
cd lanhu-mcpSet up the environment. The script walks you through getting your Lanhu cookie and writes the .env file (on Windows, run setup-env.bat instead): bash setup-env.sh
Start the server. It listens on http://localhost:8000/mcp, the address the client cards below point at: docker-compose up -d
MCP Clients
Claude Code
{
"mcpServers": {
"lanhu": {
"type": "http",
"url": "http://localhost:8000/mcp?role=Developer&name=<YOUR_LANHU_USER_NAME>"
}
}
}LANHU_COOKIE does not go in the client configuration: setup-env.sh (or easy-install.sh, for the source route) asks for it and saves it in the .env file the server reads.
Cursor
{
"mcpServers": {
"lanhu": {
"url": "http://localhost:8000/mcp?role=Developer&name=<YOUR_LANHU_USER_NAME>"
}
}
}LANHU_COOKIE does not go in the client configuration: setup-env.sh (or easy-install.sh, for the source route) asks for it and saves it in the .env file the server reads.
Windsurf
{
"mcpServers": {
"lanhu": {
"serverUrl": "http://localhost:8000/mcp?role=Developer&name=<YOUR_LANHU_USER_NAME>"
}
}
}LANHU_COOKIE does not go in the client configuration: setup-env.sh (or easy-install.sh, for the source route) asks for it and saves it in the .env file the server reads.
Any MCP client — Windows
{
"mcpServers": {
"lanhu": {
"command": "<YOUR_ABSOLUTE_PATH_TO_LANHU_MCP>/run-stdio.bat",
"env": {
"LANHU_USER_NAME": "<YOUR_LANHU_USER_NAME>",
"LANHU_USER_ROLE": "Developer"
}
}
}
}This route runs a source checkout rather than Docker: in your clone, run easy-install.bat first (it installs the dependencies and sets up the cookie). <YOUR_ABSOLUTE_PATH_TO_LANHU_MCP> is that folder's full path.
LANHU_COOKIE does not go in the client configuration: setup-env.sh (or easy-install.sh, for the source route) asks for it and saves it in the .env file the server reads.