dsphper/lanhu-mcp
⚡ 需求分析效率提升 200%!全球首个为 AI 编程时代设计的团队协作 MCP 服务器,自动分析需求自动编写前后端代码,下载切图
📚 Overview
Lanhu MCP Server is an open‑source bridge that lets AI‑powered development assistants (e.g., Cursor, Claude Code, Windsurf) read and act on data stored in the Lan‑Hu design‑collaboration platform. It implements the Model Context Protocol (MCP), exposing a HTTP/STDIO API that returns structured information about requirement documents, UI mock‑ups, and design assets. The server also provides a shared “team knowledge board” so multiple AI agents can reuse each other’s analysis results.
✨ Core Features (as described in the README)
| Feature | What it does | Why it matters |
|---|---|---|
| Requirement‑document analysis | Downloads Axure pages from Lan‑Hu, extracts text, annotations and visual evidence, and runs a vision‑capable LLM to produce developer‑, tester‑ or explorer‑oriented reports. | Turns raw design specs into actionable specs without each AI re‑parsing the same document. |
| UI‑design support | Retrieves design drafts, slices images, extracts layout parameters (size, spacing, colour, font) and generates a HTML + CSS scaffold. | Gives AI agents concrete UI data they can turn into code. |
| Team knowledge board | Centralised message store (knowledge, tasks, questions, urgent alerts) with @‑mentions, Feishu webhook notifications and per‑user access tracking. | Enables multiple AI assistants to share insights and avoid duplicated work. |
| Performance optimisations | Version‑based caching, incremental updates, concurrent page‑screenshot and asset download. | Keeps latency low even for large design projects. |
| FastMCP framework | Built on the open‑source FastMCP server that implements the MCP protocol over HTTP or stdio. | Allows AI IDEs that understand MCP to connect either via a long‑running HTTP service or a short‑lived stdio process. |
| Docker & local deployment | One‑click Docker compose, an easy‑install script, and a single‑file lanhu_mcp_server.py for quick local use. |
Lowers the barrier for teams to run the service on‑premise. |
| Configurable hooks | Environment variables for Lan‑Hu cookie, Feishu webhook, server host/port, viewport size, time‑outs, etc. | Makes the server adaptable to different network and UI‑testing setups. |
🛠️ Getting Started (quick summary)
- Obtain a Lan‑Hu cookie – log into the Lan‑Hu web UI and copy the
Cookieheader. - Clone the repo and either:
- Run
docker compose up -d --build(recommended), or - Run the
easy‑install.sh/easy‑install.batscript to set up a Python 3.10+ virtual‑env, install dependencies, and launch the server.
- Run
- Start the service – either the HTTP server (
lanhu-mcp --transport http) or the stdio wrapper (run-stdio.sh). - Configure your AI IDE – add an MCP entry pointing to
http://localhost:8000/mcp(or the stdio command) and includeroleandnamequery parameters. - Interact – ask the AI assistant to
mcpa Lan‑Hu document URL; the server will return the structured analysis, design previews, or slice assets.
📦 Project Structure (high‑level)
lanhu-mcp-server/
├─ lanhu_mcp_server.py # Main FastMCP entry point (large monolithic file)
├─ requirements.txt # Python dependencies (FastMCP, Playwright, etc.)
├─ Dockerfile, docker-compose.yml
├─ easy-install.sh / .bat # Helper scripts for local setup
├─ config.example.env # Example environment variables
├─ docs/ (README_EN.md, RELEASE_NOTES_*.md, …)
└─ tools/ # Individual MCP tool implementations (e.g., lanhu_get_designs)
🎯 Who Should Use It?
- Teams that already store product requirements and UI mock‑ups in Lan‑Hu and want their AI coding assistants to consume that data automatically.
- Developers building custom AI‑agent workflows that need a shared knowledge base across multiple agents.
- Organizations that prefer an on‑premise bridge rather than a SaaS solution, because the server only requires a Lan‑Hu cookie and runs behind the team’s firewall.
⚠️ Limitations & Open Questions (from the README)
- The server requires a vision‑capable LLM (Claude, GPT‑4‑Vision, Gemini‑Vision, etc.). Pure text models will not work.
- Access to Lan‑Hu data is gated by a user‑specific cookie; each team member must provide a valid cookie for the server to fetch resources.
- Security‑sensitive operations are limited to read‑only queries; the knowledge board enforces a whitelist of safe actions.
📚 Further Reading
- Model Context Protocol (MCP): https://modelcontextprotocol.io/
- FastMCP framework: https://github.com/jlowin/fastmcp
- Lan‑Hu platform documentation (linked from the repo’s README).
All information above is taken directly from the repository’s README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project