npm package: @leonai/make-scenario-mcp
Description: MCP server for building Make.com scenarios with LeonAI-Priority ERP knowledge base. 16 tools, 303 modules, 2914 Priority tables, auto-healing, and deployment.
Author: LeonAI
Latest version: 1.0.2

# @leonai/make-scenario-mcp

MCP server for building, validating, auto-healing, and deploying Make.com scenarios. Deep knowledge of LeonAI-Priority ERP integration.

## Features

- **16 MCP tools** for scenario building, search, validation, and deployment
- **303 Make.com modules** across 53 apps (built-in catalog)
- **52 LeonAI-Priority operations** with mapper schemas and real examples
- **Auto-healing** — fixes missing metadata, coordinates, module versions, router filters
- **Blueprint validation** — duplicate IDs, broken references, missing connections
- **Blueprint generation** — compose importable Make.com JSON from steps
- **8 workflow patterns** — customer upsert, order creation, Shopify sync, WhatsApp notifications, and more
- **Direct deployment** to Make.com via API
- **Priority ERP metadata** — 2,914 tables, 35,688 fields with types and descriptions (optional)
- **Hebrew search** — full support for Hebrew text in scenario names and fields

## Quick Start

```bash
npx -y @leonai/make-scenario-mcp
```

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "make-scenario-builder": {
      "command": "npx",
      "args": ["-y", "@leonai/make-scenario-mcp"]
    }
  }
}
```

Works out of the box with 303 modules, auto-healing, validation, and blueprint generation.

## Optional Configuration

All environment variables are optional. The server works progressively — each one unlocks more features:

| Env Variable | What it adds |
|-------------|-------------|
| `BLUEPRINTS_DIR` | Path to a folder of Make.com `.blueprint.json` files. Indexes them for search, pattern extraction, and real usage examples. |
| `PRIORITY_DB_PATH` | Path to a Priority ERP metadata SQLite database. Adds 2,914 tables with 35,688 typed fields. |
| `MAKE_API_KEY` | Your Make.com API token. Enables deploying scenarios directly to Make.com. |
| `MAKE_TEAM_ID` | Your Make.com team ID. Required together with `MAKE_API_KEY`. |

### Full config example

```json
{
  "mcpServers": {
    "make-scenario-builder": {
      "command": "npx",
      "args": ["-y", "@leonai/make-scenario-mcp"],
      "env": {
        "BLUEPRINTS_DIR": "/path/to/your/blueprints",
        "PRIORITY_DB_PATH": "/path/to/priority_metadata.db",
        "MAKE_API_KEY": "your-make-api-key",
        "MAKE_TEAM_ID": "12345"
      }
    }
  }
}
```

## Tools

### Scenario Knowledge

| Tool | Description |
|------|-------------|
| `search_scenarios` | Full-text search across indexed blueprints (Hebrew + English) |
| `analyze_scenario` | Human-readable flow breakdown of any blueprint |
| `get_module_examples` | Real mapper/filter configs from production blueprints |
| `suggest_flow` | Business goal to suggested modules and patterns |

### LeonAI-Priority

| Tool | Description |
|------|-------------|
| `list_leonai_operations` | All 52 LeonAI ops with schemas, categories, examples |
| `list_priority_forms` | Priority ERP forms with full field details (types, keys, RO flags) |
| `search_priority_tables` | Search 2,914 Priority tables by name or description |
| `search_priority_fields` | Search 35,688 fields across all tables |

### Make.com Module Catalog

| Tool | Description |
|------|-------------|
| `search_make_modules` | Search 303 modules across 53 apps |
| `get_make_module` | Detailed module info with parameters |
| `list_make_apps` | All apps with module counts |

### Build & Deploy

| Tool | Description |
|------|-------------|
| `build_scenario` | Generate importable Make.com blueprint JSON |
| `get_pattern` | 8 reusable workflow templates |
| `validate_blueprint` | Check for errors before importing |
| `heal_blueprint` | Auto-fix missing metadata, coordinates, versions |
| `deploy_scenario` | Deploy directly to Make.com (requires API key) |

## Architecture

```
@leonai/make-scenario-mcp
  src/
    catalog/        # LeonAI ops, Make modules, Priority forms, operators
    generator/      # Blueprint JSON builder (IDs, positions, metadata)
    healing/        # Auto-healer (8 fixes) + verified module versions
    indexer/        # Blueprint parser, flow walker, index builder
    makeapi/        # Make.com REST API client
    metadata/       # Priority ERP database reader
    patterns/       # 8 workflow pattern templates
    search/         # Full-text search with Hebrew support
    tools/          # Blueprint validator
    server.ts       # MCP server with 16 tools
    index.ts        # Entry point (stdio transport)
```

## License

MIT