open-index/open-npm huggingface dataset:
npm package: @momo-kits/doctor
Description: Momo-kits doctor tool
Latest version: 0.1.31

# @momo-kits/doctor

> Momo Kits Doctor CLI tool for running health checks on your Mini App to ensure compatibility with the MoMo Platform.

[![npm version](https://img.shields.io/npm/v/@momo-kits/doctor.svg)](https://www.npmjs.com/package/@momo-kits/doctor)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
  - [Check](#check)
  - [Doctor](#doctor)
- [CLI Options](#cli-options)

## Installation

Install globally for CLI use:

```bash
npm install -g @momo-kits/doctor
# or
yarn global add @momo-kits/doctor
```

Install locally as a dev dependency:

```bash
npm install --save-dev @momo-kits/doctor
# or
yarn add --dev @momo-kits/doctor
```

## Usage

The CLI provides two core commands:

### Check

Run an interactive session to perform individual health checks:

```bash
momo-kits check
```

You will be prompted to select one of the following tasks:

- **Check core dependencies**: Verify usage of `@momo-kits/core`.
- **Scan native module usage**: Detect any native module imports or calls.
- **Calculate component adoption rate**: Analyze how many components used in Design System.
- **Scan for deprecated MaxAPI functions**: Identify MaxAPI calls that are removed or deprecated.

### Doctor

Run all checks in sequence and receive a final health summary:

```bash
momo-kits doctor
```

The tool will:

1. Check core dependencies
2. Scan native module usage
3. Calculate component adoption rate
4. Scan for deprecated MaxAPI usage
5. Output a summary indicating overall app health

## CLI Options

- `--help`        Show help information
- `--version`     Display the current CLI version
- `LOG_LEVEL`     Set log verbosity (`debug`, `info`, `warn`, `error`)
npm package: @momo-kits/mcp-expo
Description: MCP server: push AI-generated code to Expo and get LAN URL for Expo Go demo
Latest version: 2.0.0-beta.6

# MCP Expo — AI Code → Expo Go Demo

MCP server nhận code từ AI tool, ghi vào `expo-demo-template/App.tsx`, và trả URL để mở app trên Expo Go.

## Cấu trúc

```
/Users/sonnguyen/Documents/Momo/
├── expo-demo-template/   ← App Expo cố định (Metro đọc ở đây)
│   ├── App.tsx           ← File bị ghi đè mỗi lần gọi tool
│   ├── app.json
│   └── package.json
│
└── mcp-expo/            ← MCP server
    ├── server.mjs        ← MCP server (ESM, stdio)
    └── package.json
```

## Setup

```bash
cd /Users/sonnguyen/Documents/Momo/mcp-expo
npm install
```

## Chạy MCP

```bash
node server.mjs
```

Cấu hình MCP client (Claude Code / Claude Desktop):

```json
{
  "mcpServers": {
    "expo-demo": {
      "command": "node",
      "args": ["/Users/sonnguyen/Documents/Momo/mcp-expo/server.mjs"]
    }
  }
}
```

## Tools

### `push_screen_and_run`

Ghi code AI vào `App.tsx`, khởi động Metro nếu cần, trả URL.

```json
{
  "code": "import React from 'react';\nimport { View, Text } from 'react-native';\n\nexport default function Demo() {\n  return <View><Text>Hello!</Text></View>;\n}",
  "reset": false
}
```

| Param | Type | Mô tả |
|-------|------|--------|
| `code` | string | Nội dung TSX/JSX từ AI |
| `reset` | boolean | `true` = kill + restart Metro trước. Mặc định: `false` |

Response:
```json
{
  "ok": true,
  "message": "Code updated. App is reloading via HMR...",
  "expoUrl": "http://localhost:8081"
}
```

### `stop_expo`
Kill Metro server đang chạy.

### `get_expo_status`
Kiểm tra trạng thái:
```json
{
  "isRunning": true,
  "expoUrl": "http://localhost:8081",
  "pid": 12345
}
```

## Flow

1. AI gen code → gọi `push_screen_and_run`
2. MCP ghi code vào `App.tsx`
3. Metro bundler khởi động (hoặc reload HMR nếu đang chạy)
4. Trả URL → mở Expo Go trên điện thoại, trỏ vào URL đó
5. App hiện màn hình AI vừa gen

## Lưu ý

- Metro chạy ở `--lan` (cùng WiFi). URL: `http://<IP>:8081`
- Expo Go cần kết nối cùng mạng WiFi với máy tính
- `CI=1` được set tự động để tránh interactive prompts
- Nếu máy có firewall, allow port 8081