Purpose
hap-mcp is an MCP (Model Context Protocol) server provided by Mingdao for the HAP (Hyper Application Platform) low-code platform, designed to enable AI clients (such as Cursor) to directly call HAP application APIs, achieving seamless integration between AI and HAP applications.
Main Capabilities
- Provides 28 preset tools covering HAP application operations:
- Worksheet records: create, delete, update, batch create/update, list query (with filtering and pagination support), record details, record count, operation logs, share link generation, related worksheet record queries, and pivot table data retrieval.
- Worksheet management: list worksheets, create worksheets, and get field information.
- Application information: get application information (including groups, worksheets, and custom pages).
- Roles and permissions: list roles, create roles, delete roles, add/remove role members, get role details, and remove users from applications.
- Option set management: create, get, update, and delete option sets.
- Geographic region information queries.
- Supports both stdio and HTTP (SSE) transport methods; stdio is suitable for local personal development, while HTTP is suitable for team sharing and remote deployment.
- Built on the FastMCP framework and developed in TypeScript, with full type safety, an extensible architecture, and support for custom tools, resources, and prompts.
Usage
- Environment requirements: Node.js 18+.
- Configure MCP in Cursor:
- Standard SaaS version: create or edit
~/.cursor/mcp.json, and add the configuration. - Private deployment version: create
.cursor/mcp.jsonin the project root directory, and set theHOSTenvironment variable to the actual private deployment server address (e.g.,https://www.nocoly.com); API calls will usehost/apiinstead of the defaulthttps://api.mingdao.com.
- Standard SaaS version: create or edit
- Environment variables:
APPKEY(required): Mingdao application key.SIGN(required): Mingdao signature.HOST(optional): only required for private deployment.
- Install dependencies: you can use npm, yarn, pnpm, or bun to install.
- Start the server:
- stdio mode:
npm start - HTTP mode:
npm run start:http(default port 3001, can be changed via thePORTenvironment variable) - Development mode (auto reload):
npm run devornpm run dev:http
- stdio mode:
- Connect in Cursor:
- Open Settings → Features → MCP Servers → Add a new MCP server.
- stdio mode: select command as the type, and the command is the server executable path (e.g.,
npm start). - SSE mode: select url as the type, and the URL is
http://localhost:3001/sse. - You can also use the project root directory or global
~/.cursor/mcp.jsonConfiguration.
- After configuration is complete, enable the hap-mcp tool in the AI conversation to use all HAP API tools.
Applicable scenarios
- Directly operate HAP application data and structure in AI programming assistants (such as Cursor).
- Development and automation scenarios integrating enterprise low-code platforms with AI.
- Team collaboration scenarios that require batch processing of HAP worksheet records, managing role permissions, or option sets.
Limitations
- Requires a Node.js 18+ environment.
- Private deployment requires correct configuration of
HOSTenvironment variables. - The default script uses Bun as the runtime; if using another runtime, you need to modify
package.jsonscripts in . - The project uses the MIT license.
- The materials do not provide specific pricing, cost, or performance data.