Enterprise MCP Design Patterns for LLM Productivity
A demonstration of how to design Model Context Protocol (MCP) servers that maximize AI agent productivity while maintaining backend system integrity, performance, security, and scale.
This sample application showcases enterprise-grade MCP architecture patterns that solve real-world challenges when integrating LLMs with backend systems:
Most MCP implementations give AI agents direct database access or expose raw APIs, leading to:
- β Poor performance - Agents make 10+ API calls for simple tasks
- β Data integrity issues - Agents create invalid state transitions
- β Security vulnerabilities - Overly permissive tool access
- β Scalability bottlenecks - No caching, retries, or rate limiting
- β Poor user experience - Slow responses, frequent failures
This project demonstrates a two-tier tool design that balances LLM flexibility with enterprise requirements:
π― Orchestrators (High-level tools) - Optimized for common scenarios
- Encode business rules and prerequisites
- Execute multi-step workflows in < 3 seconds
- Handle state transitions in correct dependency order
- Provide great UX for 80% of use cases
π§© Atomic Skills (Building blocks) - For edge cases and flexibility
- Single-responsibility operations
- Composable by AI agents at runtime
- Enable handling of unexpected scenarios
- Maintain proper authorization boundaries
Key Result: AI agents get fast, validated workflows for common tasks AND the flexibility to handle edge cases intelligently.

Enterprise MCP Architecture - Persona-based servers with orchestrators and atomic skills

Check-in orchestrator: < 3 seconds, 6 API calls, validates prerequisites, ensures correct state transitions
Traditional Approach (LLM with raw Salesforce access):
Agent makes 15+ separate API calls:
1. Search for guest β 400ms
2. Validate guest exists β 200ms
3. Search for booking β 400ms
4. Check booking status β 200ms
5. Validate room number β 200ms
6. Search for room β 400ms
7. Check room status β 200ms
8. Update booking status β 300ms
9. Update room status β 300ms
10. Update opportunity β 300ms
... error handling, retries ...
Total time: 8-12 seconds
Failure rate: 15-20% (race conditions, validation errors)
Enterprise MCP Approach (Orchestrator):
Agent calls one orchestrator:
POST /check-in-guest {guest_email, check_in_date}
Orchestrator internally:
- Validates prerequisites in parallel (3 reads)
- Executes state transitions in order (3 updates)
- Handles errors gracefully
- Ensures data integrity
Total time: < 3 seconds
Failure rate: < 2% (only fails on legitimate business rule violations)
Result: 3-4x faster, 90% fewer errors, better user experience.
Scenario: Guest says "I need towels in room 101" but contact doesn't exist in system
Orchestrator-only approach:
- β Fails with "Contact not found" error
- β Agent can't proceed
- β Poor user experience
Compositional approach (Orchestrator + Atomic Skills):
- β Agent detects missing contact
- β
Agent composes:
create_contactβupsert_case - β Handles edge case with proper approval authority
- β Great user experience
Key Insight: Give agents both optimized workflows AND building blocks for flexibility.
All data movement flows through Workato integration hub
β DON'T: Hotel App β Salesforce (tight coupling)
β DON'T: Hotel App β Stripe (security risk)
β DON'T: LLM β Salesforce (no validation)
β
DO: Hotel App β Workato β Salesforce (orchestrated)
β
DO: LLM Agent β MCP Server β Workato β Backends (validated, secure)
Benefits:
- Performance: Workato handles caching, connection pooling, retries
- Security: Single integration layer with centralized auth
- Maintainability: Backend changes don't break frontend
- Observability: All integration traffic in one place
Organize tools by user role and "jobs to be done"
Guest MCP Server:
βββ Orchestrators: check_in_guest, checkout_guest, service_request
βββ Atomic Skills: search_contact, search_booking, upsert_case
Staff MCP Server:
βββ Orchestrators: maintenance_request, assign_room, update_case_status
βββ Atomic Skills: create_contact, search_room, update_room_status
Benefits:
- Security: Users only access tools appropriate for their role
- Performance: Smaller tool context = better LLM reasoning
- Usability: Relevant tools for each persona
- Scale: Independent servers can be optimized separately
Every orchestrator validates prerequisites and checks for duplicate operations
Example: Check-in orchestrator validates:
- β Guest exists (Contact.id)
- β Reservation exists (Booking.status = Reserved)
- β Room is available (Hotel_Room.status = Vacant)
- β No existing check-in for this booking (idempotency)
Benefits:
- Data integrity: No invalid state transitions
- Reliability: Retry-safe operations
- Error handling: Clear, actionable error messages
- Audit trail: All validation logged
Orchestrators minimize API calls and latency
Techniques demonstrated:
- Parallel execution: Read operations execute concurrently
- Dependency ordering: Updates execute in correct sequence
- Batch operations: Multiple updates in single transaction where possible
- Caching: Workato caches connection pools and reference data
- Circuit breakers: Fail fast on downstream outages
Result: Typical orchestrators complete in < 3 seconds with 4-6 API calls.
33 Recipes organized as MCP tools:
12 Orchestrators (High-level workflows):
check_in_guest- Multi-object state transition (< 3s, 6 API calls)checkout_guest- Payment processing + room releaseservice_request- Guest service case creationmaintenance_request- Staff maintenance workflowcreate_booking_orchestrator- Full booking with availability check- Additional orchestrators for case management, search workflows
21 Atomic Skills (Building blocks):
- Salesforce (15): search_contact, search_booking, search_room, create_contact, update_booking_status, upsert_case, etc.
- Stripe (6): create_customer, create_payment_intent, confirm_payment, retrieve_status, create_refund
- Guest Portal: Service requests, room controls, billing, AI assistant
- Manager Portal: Dashboard, maintenance management, room operations
- MCP Integration: Demonstrates how to call enterprise MCP servers from application code
- Local Database: SQLite for app-specific data (sessions, UI state)
- Salesforce: System of record (Bookings, Rooms, Cases, Contacts, Opportunities)
- Stripe: Payment processing (optional)
- Twilio: SMS notifications (optional)
Prerequisites:
- Node.js 20+, Python 3.8+
- Workato Developer sandbox (free Developer sandbox)
- Salesforce Developer org (free Developer Edition)
- Stripe Developer account (Stripe Developer sign up)
git clone <repo-url>
cd dewy-resort
npm installSalesforce is the system of record - deploy it first.
# Install CLI
make setup tool=salesforce
# Authenticate
bin/sf org login web --alias myDevOrg
# Deploy metadata and seed data
make sf-deploy org=myDevOrgπ See: docs/SALESFORCE_SETUP.md
Workato implements the enterprise MCP architecture.
# Install CLI
make setup tool=workato
# Add API token to .env (see guide for how to generate token)
WORKATO_API_TOKEN=your_token
WORKATO_API_EMAIL=your_email
# Deploy all recipes
make workato-init
# Configure connections in Workato UI (see guide)
# Start recipes
make start-recipesπ See: docs/WORKATO_SETUP.md
Now configure the hotel app to call your deployed Workato recipes:
# Copy env template
cp .env.example .envAdd Workato API Collection endpoint to .env:
# Workato API Collection URL (get from Workato UI)
# In Workato: Navigate to any recipe β API Collection tab β Copy base URL
WORKATO_API_COLLECTION_URL=https://apim.workato.com/your-collection-id
# Use same token as deployment
WORKATO_API_AUTH_TOKEN=your_token_from_step_3Initialize local database (for hotel app sessions, UI state):
npm run db:init
npm run db:seedNote: The local SQLite database stores hotel app-specific data (user sessions, device states). Backend data (bookings, rooms, cases) lives in Salesforce and is accessed via Workato recipes exposed as REST API endpoints.
About MCP: The Workato recipes implement the orchestrator and atomic skill patterns that would be exposed as MCP tools. The hotel app currently calls these recipes directly via REST API. For AI agent integration, these same recipes would be exposed via MCP server, so the recipes appear as tools to LLMs. This is what the hands-on workshop walks through in the initial unit. MCP servers are configured declaratively in Workato.
npm run devTest logins (mock mode):
- Guest: guest@example.com / password
- Manager: manager@example.com / password
Goal: Understand enterprise MCP design patterns
- Start here: Review architecture diagrams in
docs/architecture/ - Explore: Compare orchestrator vs atomic skill patterns
- Observe: Check-in orchestrator flow (prerequisites, state transitions, error handling)
- Experiment: Try edge cases (missing contact, double check-in, invalid room)
- Reflect: Why are orchestrators faster? Why do atomic skills matter?
Goal: Apply these patterns to your own projects
- Architecture: Study system-architecture.png
- Implementation: Review Workato recipes in
workato/directory - Patterns: Read WORKATO_SETUP.md for detailed pattern explanations
- Adaptation: Consider how to apply orchestrator + atomic skill pattern to your domain
β
Orchestrators for common scenarios - Fast, validated, great UX
β
Atomic skills for flexibility - Handle edge cases intelligently
β
Zero direct integrations - All through central hub
β
Persona-based servers - Security, performance, usability
β
Idempotency and validation - Data integrity, reliability
β
Performance optimization - Parallel reads, dependency ordering
- Salesforce Setup - Deploy custom objects and seed data
- Workato Setup - Deploy MCP server recipes
- Architecture Diagrams - Visual documentation of all workflows
- Stripe Integration - Payment processing
- Cognito Authentication - User auth (workshop convenience)
- Bedrock AI Chat - AI assistants (optional)
- Home Assistant Devices - IoT room controls
- Salesforce Metadata - Complete object and field documentation
- Project Structure - Codebase organization
- CLI Commands - Automation scripts
dewy-resort/
βββ workato/ # β MCP SERVER IMPLEMENTATION
β βββ atomic-salesforce-recipes/ # 15 atomic skills
β βββ atomic-stripe-recipes/ # 6 payment atomic skills
β βββ orchestrator-recipes/ # 12 high-level orchestrators
β βββ Salesforce/ # API Collection definitions
β βββ Workspace-Connections/ # Connection configs
βββ docs/
β βββ architecture/ # β ARCHITECTURE DIAGRAMS
β β βββ system-architecture.png
β β βββ guest-checkin-flow.png
β β βββ guest-checkout-flow.png
β β βββ guest-service-request-flow.png
β β βββ maintenance-request-flow.png
β βββ SALESFORCE_SETUP.md # Salesforce deployment guide
β βββ WORKATO_SETUP.md # MCP server setup guide
β βββ ...
βββ app/ # Next.js application
β βββ guest/ # Guest portal
β βββ manager/ # Manager portal
β βββ api/ # API routes (calls MCP server)
βββ salesforce/ # Salesforce metadata
β βββ force-app/ # Custom objects, fields, app
β βββ data/ # Seed data
βββ components/ # React components
# Setup
make setup # Install all CLIs
make setup tool=workato # Install Workato CLI only
make setup tool=salesforce # Install Salesforce CLI only
# Workato (MCP Server)
make workato-init # Deploy all recipes
make start-recipes # Start recipes (automated)
# Salesforce (Backend)
make sf-deploy org=<alias> # Deploy metadata and seed data
# Status
make status # Check all CLIsFor frontend development without backend setup:
# In .env
WORKATO_MOCK_MODE=true
# Restart server
npm run devFor workshops where participants don't have their own auth:
AUTH_PROVIDER=cognito
# Deploy Cognito User Pool
cd aws/cloudformation
./deploy.sh dev http://localhost:3000/api/auth/cognito/callback http://localhost:3000 dewy-hotelAI-powered chat assistants (demonstrates LLM + MCP integration):
# Deploy Identity Pool
cd aws/cloudformation
./deploy-identity-pool.sh dev <user-pool-id> <client-id>
# Configure in .env
COGNITO_IDENTITY_POOL_ID=your_pool_id- MCP Server: Workato (33 recipes organized as orchestrators and atomic skills)
- Backend Systems: Salesforce (CRM), Stripe (payments), Twilio (SMS)
- Application: Next.js 14, React, TypeScript, Tailwind CSS
- Database: SQLite (local app data only)
- Auth: Amazon Cognito (optional) or mock mode
- AI: Amazon Bedrock (optional chat assistants)
This sample uses Workato as the MCP server implementation, but the architectural patterns apply to any integration platform:
β
Visual recipe builder - Easy to understand workflows
β
Built-in connectors - Salesforce, Stripe, Twilio out of the box
β
API Collections - Native REST API exposure
β
Enterprise features - Error handling, retries, logging, monitoring
β
Workshop-friendly - Visual representation aids learning
The patterns work with: Custom APIs, serverless functions, other orchestration systems, etc.
MIT
This is a sample application for teaching enterprise MCP design patterns. The goal is to demonstrate how to build MCP servers that maximize LLM productivity while maintaining backend integrity, performance, security, and scale.
Focus areas:
- Why orchestrators matter for performance and UX
- When to use atomic skills vs orchestrators
- How to design persona-based MCP servers
- Patterns for idempotency and state validation
- Zero direct system integrations architecture
For implementation details, see the guides in docs/.