=== NEW === - studio/ — MCPEngine Studio scaffold (Next.js monorepo, build plan) - docs/FACTORY-V2.md — Factory v2 architecture doc - docs/CALENDLY_MCP_BUILD_SUMMARY.md — Calendly MCP build report === UPDATED SERVERS === - fieldedge: Added jobs-tools, UI build script, main entry update - lightspeed: Updated main + server entry points - squarespace: Added collection-browser + page-manager apps - toast: Added main + server entry points === INFRA === - infra/command-center/state.json — Updated pipeline state - infra/command-center/FACTORY-V2.md — Factory v2 operator playbook
5.2 KiB
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-appsSDK 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)
- Zendesk (huge market, 100k+ customers)
- Mailchimp (email marketing leader)
- Pipedrive (popular CRM)
- ClickUp (project management)
- Trello (project management)
- Calendly (scheduling leader)
Tier 2 — Strong Market
- BigCommerce (ecommerce)
- FreshBooks (accounting)
- Keap (CRM + automation)
- Wrike (project management)
- Zendesk (support)
- Constant Contact (email marketing)
Tier 3 — Niche but Solid
- BambooHR (HR)
- Gusto (payroll)
- Rippling (HR platform)
- Basecamp (project management)
- ServiceTitan (field service)
- Housecall Pro (field service)
- Jobber (field service)
Tier 4 — Specialized
- Acuity Scheduling
- Clover (POS)
- FieldEdge (field service)
- Lightspeed (POS/ecommerce)
- Squarespace (website builder)
- Toast (restaurant POS)
- TouchBistro (restaurant POS)
- Wave (accounting)
Already Built (need apps added)
- Brevo — needs full rebuild (tools + apps)
- Close CRM — needs full rebuild (tools + apps)
- FreshDesk — needs full rebuild (tools + apps)
- HelpScout — needs full rebuild (tools + apps)
- Compliance GRC — needs apps
- Product Analytics — needs apps
Already Good
- GoHighLevel — 474 tools, 65 apps ✅
- CloseBot — 119 tools, 6 apps ✅
- Meta Ads — 55 tools, 11 apps ✅
- Twilio — 54 tools, 19 apps ✅
- Google Console — 22 tools, 5 apps ✅
- n8n — 8 apps ✅