Skip to main content
Glama

ZMP-MCP ๐Ÿš€

TypeScript Model Context Protocol Zalo Mini App License: MIT

ZMP-MCP is an official-grade Model Context Protocol (MCP) server engineered for Zalo Mini App (ZMP) development, automated validation, and cloud deployment.

It bridges AI Coding Assistants (Antigravity, Claude Desktop, Cursor, VS Code / Cline, Windsurf) directly with the Zalo Mini App Platform ecosystem.


๐ŸŒŸ Highlights & Solved Problems

  • ๐Ÿ”„ Bulletproof Cloud Deployment: Natively handles chunked uploads via Zalo Developer API. Fixes the notorious The 'versionStatus' is invalid bug by enforcing standard TESTING / DEVELOPMENT statuses.

  • โšก Zero-Config Asset Synchronization: Automatically inspects Vite / Webpack build outputs and synchronizes listCSS, listSyncJS, and listAsyncJS into app-config.json and app.json. Eliminates the common "No asset defined" deployment error.

  • ๐Ÿ›ก๏ธ Pre-flight Validation: Automatically checks bundle size constraints (max 10MB zip, max 3MB per file) and validates file extensions against Zalo's strict whitelist (.css, .js, .json, .png, .woff2, etc.) before uploading.

  • ๐Ÿ” Developer Authentication: Generate QR codes for mobile Zalo scanning directly in the terminal, check login status, and manage project .env tokens seamlessly.

  • ๐ŸŽจ Modern Project Scaffolding: Create production-ready Zalo Mini Apps with React 18, ZAUi, Vite, and Dark Mode zero-flicker compliance out of the box.


Related MCP server: Somewhere MCP

๐Ÿ› ๏ธ Available MCP Tools

Tool Name

Description

zmp_get_login_status

Check authentication status and developer identity with Zalo Platform.

zmp_request_login_qr

Request login session, generate QR code & link; optionally wait/poll until user scans.

zmp_wait_for_login

Poll for mobile Zalo QR confirmation and automatically persist ZMP_TOKEN into .env.

zmp_start_oauth_callback

Launch local HTTP OAuth server (e.g. http://localhost:8085/oauth/callback) to catch redirect codes with HTML feedback.

zmp_set_token

Safely write or update APP_ID and ZMP_TOKEN in the project .env.

zmp_get_app_info

Query Mini App metadata, quotas, and versions from Zalo API.

zmp_create_app

Scaffold a clean Zalo Mini App project template with Vite, React 18, and ZAUi.

zmp_build

Build project for production and automatically sync assets with app-config.json.

zmp_sync_config

Synchronize CSS/JS bundles from build output (www/assets) into app-config.json and app.json.

zmp_validate_project

Run pre-flight linting on app-config.json, file size quotas, and asset extensions.

zmp_deploy

Upload bundle to Zalo Cloud with chunked Resumable protocol, testing quota tracking, and instant preview links.

zmp_verify_webhook

Verify or generate Zalo Webhook signatures (x-zevent-signature, SHA-256 sorted fields, Decree 13 user deletion).

zmp_manage_webhook_listener

Start or manage a local webhook listener server with auto-signature checking for tunnels (ngrok/cloudflare).

zmp_get_webhook_docs

Get comprehensive technical documentation, event schemas, and integration guide for Zalo Mini App Webhook.

zmp_owasp_audit

Perform comprehensive OWASP Top 10 security audit on live Web/Webhook endpoints and local codebases.

zmp_policy_audit

Audit a project against the Zalo Mini App censorship policy: name rules, external links, permission requests on load, 3rd-party login, ads, cash-out, demo content, eval, HTTP, purchase without Checkout SDK. Returns file:line findings plus checks that must be done by hand.


๐Ÿ›ก๏ธ Policy Audit CLI

The same censorship-policy engine as zmp_policy_audit runs from the command line. It exits with code 1 when there is a violation, so CI can block a non-compliant build:

npx -y github:nguyenquocanhz/zmp-mcp audit ./my-mini-app        # text report
npx -y github:nguyenquocanhz/zmp-mcp audit ./my-mini-app --json # JSON report

npm run build also emits dist/zmp-audit.cjs, a dependency-free copy you can drop into a Mini App project as zmp-audit.js to run offline (node zmp-audit.js). Edit the rules in src/policy/engine.ts, never the copy.


๐Ÿš€ Quickstart & Setup (Zero Configuration via npx)

No need to clone or hardcode local paths. You can execute zmp-mcp directly via npx:

npx -y github:nguyenquocanhz/zmp-mcp

Configuration for AI Clients

1. Claude Code CLI & Claude Desktop

Via Claude Code CLI:

/mcp add zmp-mcp npx -y github:nguyenquocanhz/zmp-mcp

Via claude_desktop_config.json:

{
  "mcpServers": {
    "zmp-mcp": {
      "command": "npx",
      "args": ["-y", "github:nguyenquocanhz/zmp-mcp"]
    }
  }
}

2. OpenAI Codex CLI & Desktop

Via Codex CLI:

codex mcp add zmp-mcp -- npx -y github:nguyenquocanhz/zmp-mcp

Via ~/.codex/config.toml:

[mcp_servers."zmp-mcp"]
command = "npx"
args = [ "-y", "github:nguyenquocanhz/zmp-mcp" ]

3. Antigravity / Gemini CLI

Add to ~/.gemini/config/mcp_config.json:

{
  "mcpServers": {
    "zmp-mcp": {
      "command": "npx",
      "args": ["-y", "github:nguyenquocanhz/zmp-mcp"]
    }
  }
}

4. Cursor / Windsurf

In Cursor settings under Features > MCP Servers:

  • Name: zmp-mcp

  • Type: command

  • Command: npx -y github:nguyenquocanhz/zmp-mcp


๐Ÿ’ก Typical Agent Workflows

1. Create a New Zalo Mini App

"Agent, create a new Zalo Mini App named coffee-shop titled 'Quรกn Cร  Phรช Zalo' with template zaui-blank in D:/Projects/coffee-shop."

The agent calls zmp_create_app to generate the complete project with Dark Mode, ZAUi layout, and Vite setup.

2. Validate & Build

"Build the project and make sure all assets are registered in app-config.json."

The agent executes zmp_build, producing the bundle and automatically mapping assets/index.xxx.css and assets/index.xxx.js into app-config.json.

3. Deploy to Testing

"Deploy this mini app as a Testing version with description 'Release v1.0.0'."

The agent executes zmp_deploy, packaging www/, uploading chunks to https://zmp-api.developers.zalo.me/app/upload-chunk, and returning the test URL (https://zalo.me/s/...) with quota report.

4. Webhook Verification & Local Testing (Decree 13 Compliance)

"Start a webhook listener to test Zalo user data deletion events and verify signatures."

The agent executes zmp_manage_webhook_listener (with action: start, port: 8086), giving you a ready-to-test endpoint for tunneling (ngrok http 8086) and verifying signatures with zmp_verify_webhook.


๐Ÿ“„ License

MIT ยฉ Nguyen Quoc Anh

Available Tools

11 tools
zmp_buildB

Build the Zalo Mini App project and automatically synchronize bundle assets with app-config.json.

Inputs: projectDir (required), outputDirName, autoSyncAssets.

zmp_create_appA

Scaffold a new production-ready Zalo Mini App project with React 18, ZAUI, Vite, and Dark Mode zero-flicker.

Inputs: appName (required), appTitle (required), targetDir (required), appId, +1 more.

zmp_deployB

Deploy Zalo Mini App to Zalo Cloud with automatic asset synchronization, chunked upload, and testing quota tracking.

Inputs: projectDir (required), devMode, description, explicitToken, +2 more.

zmp_get_app_infoB

Retrieve Mini App metadata, quotas, and versions from Zalo Developer API.

Inputs: projectDir (required), appId, token.

zmp_get_login_statusC

Check authentication status with Zalo Mini App Platform for a given project directory or token.

Inputs: projectDir (required), token.

zmp_request_login_qrB

Request a new developer login session and generate a QR code for Zalo authorization. Can optionally wait/poll until scanned.

Inputs: appId, projectDir, timeoutSec, waitForScan.

zmp_set_tokenB

Save or update APP_ID and ZMP_TOKEN in the project local .env file.

Inputs: projectDir (required), appId, token.

zmp_start_oauth_callbackB

Start a local HTTP OAuth callback server (e.g. http://localhost:8085/oauth/callback) to capture redirect code/token.

Inputs: port, zaloAppId, projectDir, timeoutSec.

zmp_sync_configB

Synchronize CSS and JS build assets into app-config.json and app.json to prevent "No asset defined" errors.

Inputs: projectDir (required), outputDirName.

zmp_validate_projectB

Validate project configuration, app-config.json format, bundle size limits (10MB/3MB), and allowed file extensions.

Inputs: projectDir (required), outputDirName.

zmp_wait_for_loginA

Poll and wait for user to confirm mobile Zalo QR scan authorization, then automatically save ZMP_TOKEN into .env.

Inputs: zmpsk (required), projectDir (required), timeoutSec.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.5/5.0

    Scored across 11 tools

    Disambiguation3/5

    The auth tools (request_login_qr, wait_for_login, get_login_status, start_oauth_callback, set_token) have overlapping responsibilities, especially request_login_qr which can also wait/poll, blurring its boundary with wait_for_login. Build, sync_config, and deploy also all mention asset synchronization, which could cause misselection.

    Naming Consistency5/5

    All tools consistently use the zmp_ prefix with snake_case action-noun patterns (e.g., zmp_create_app, zmp_build, zmp_get_app_info). The convention is predictable and readable throughout.

    Tool Count5/5

    11 tools is well within the ideal range and each maps to a distinct step in the Zalo Mini App lifecycle (auth, create, build, validate, deploy). The count feels appropriately scoped for the server's purpose.

    Completeness4/5

    The surface covers the core development lifecycle from authentication through deployment, including project scaffolding, validation, and config sync. Minor gaps exist such as listing all apps or managing app metadata updates, but these are not critical for the primary workflow.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers