5.2 KiB

MCP Factory V2 — GHL-Quality Standard

Quality Bar (The GHL Standard)

Every MCP server must match GoHighLevel's quality:

Architecture

src/
├── server.ts              # MCP server setup (HTTP + stdio)
├── main.ts                # Entry point with transport selection
├── clients/               # API client classes (one per service)
│   └── {service}.ts       # Auth, request handling, error mapping
├── tools/                 # Tool definitions (one file per domain)
│   ├── contacts-tools.ts
│   ├── deals-tools.ts
│   └── ...
├── types/                 # TypeScript interfaces
│   └── index.ts
├── apps/                  # structuredContent HTML templates (legacy)
│   └── templates/
├── ui/                    # MCP Apps (React + Vite, per-app bundled)
│   └── react-app/
│       ├── src/
│       │   ├── apps/      # One dir per app (App.tsx + index.html + vite.config.ts)
│       │   ├── components/ # Shared component library
│       │   ├── hooks/     # Shared hooks (useCallTool, useDirtyState, etc.)
│       │   └── styles/    # Shared CSS
│       └── package.json
├── package.json
└── tsconfig.json
tests/
├── tools/
├── clients/
└── mocks/

Minimum Requirements

  • Tools: Comprehensive API coverage (30-100+ tools depending on API surface)
    • Organized into domain files (contacts, deals, campaigns, etc.)
    • Full CRUD for every major entity
    • Search/filter/list with pagination
    • Proper input schemas with descriptions
  • MCP Apps: 10-65 React apps depending on platform complexity
    • Dashboards, detail views, list/grid views, form builders
    • Shared component library across apps
    • Client-side interactivity (sorting, filtering, drag-drop)
    • Proper text fallbacks for non-UI hosts
  • API Client: Proper auth handling (OAuth2/API key), error mapping, rate limiting
  • Types: Full TypeScript types for all API responses
  • Tests: Unit tests for tools and clients
  • README: Comprehensive setup, tool reference, app showcase
  • Package: bin entry, prepublishOnly, npm pack clean
  • Dual Transport: Both HTTP and stdio support

MCP Apps Quality Standard

  • Use @modelcontextprotocol/ext-apps SDK
  • registerAppTool() + registerAppResource() pattern
  • Each app is a standalone Vite-bundled HTML file
  • Client-side state first (Pattern 1), callServerTool as enhancement
  • Host CSS variable integration
  • Graceful degradation with 5s timeout
  • ALWAYS provide text content fallback

Build Process (Per MCP)

Phase 1: API Research (30 min)

  • Map complete API surface (endpoints, entities, auth)
  • Identify all CRUD operations per entity
  • Note auth flow (OAuth2, API key, Bearer)
  • List all entities and relationships

Phase 2: Architecture (15 min)

  • Design tool groupings (one file per domain)
  • Plan API client structure
  • Identify app opportunities (dashboards, detail views, forms)
  • Estimate tool count and app count

Phase 3: Build Server (2-4 hours)

  • Implement API client with proper auth
  • Build all tools organized by domain
  • TypeScript types for all responses
  • Compile clean, proper error handling

Phase 4: Build MCP Apps (2-4 hours)

  • Shared component library (or import from existing)
  • React apps per the patterns catalog
  • Vite single-file bundling
  • Register tools + resources in server

Phase 5: Quality Check (30 min)

  • TypeScript compiles clean
  • npm pack works
  • README complete
  • Tests pass
  • Push to mcpengine-repo AND individual GitHub repo

Parallelization Strategy

Build 3-5 MCPs simultaneously using sub-agents:

  • Each sub-agent gets one MCP to build end-to-end
  • Sub-agents follow this exact spec
  • Main agent reviews output and commits

Priority Order (by market value)

Tier 1 — High Value (Build First)

  1. Zendesk (huge market, 100k+ customers)
  2. Mailchimp (email marketing leader)
  3. Pipedrive (popular CRM)
  4. ClickUp (project management)
  5. Trello (project management)
  6. Calendly (scheduling leader)

Tier 2 — Strong Market

  1. BigCommerce (ecommerce)
  2. FreshBooks (accounting)
  3. Keap (CRM + automation)
  4. Wrike (project management)
  5. Zendesk (support)
  6. Constant Contact (email marketing)

Tier 3 — Niche but Solid

  1. BambooHR (HR)
  2. Gusto (payroll)
  3. Rippling (HR platform)
  4. Basecamp (project management)
  5. ServiceTitan (field service)
  6. Housecall Pro (field service)
  7. Jobber (field service)

Tier 4 — Specialized

  1. Acuity Scheduling
  2. Clover (POS)
  3. FieldEdge (field service)
  4. Lightspeed (POS/ecommerce)
  5. Squarespace (website builder)
  6. Toast (restaurant POS)
  7. TouchBistro (restaurant POS)
  8. Wave (accounting)

Already Built (need apps added)

  1. Brevo — needs full rebuild (tools + apps)
  2. Close CRM — needs full rebuild (tools + apps)
  3. FreshDesk — needs full rebuild (tools + apps)
  4. HelpScout — needs full rebuild (tools + apps)
  5. Compliance GRC — needs apps
  6. Product Analytics — needs apps

Already Good

  1. GoHighLevel — 474 tools, 65 apps
  2. CloseBot — 119 tools, 6 apps
  3. Meta Ads — 55 tools, 11 apps
  4. Twilio — 54 tools, 19 apps
  5. Google Console — 22 tools, 5 apps
  6. n8n — 8 apps