A self-healing browser automation MCP server for DoorDash ordering, built for GARZA OS - Jaden's unified AI intelligence infrastructure.
- Browse Restaurants - Organized by cuisine, filterable
- Recent Orders - View history and reorder with one click
- Restaurant Menus - Popular items prioritized
- Cart Management - Add items with customizations
- Order Placement - Explicit confirmation required
- Order Tracking - Real-time updates with Beeper notifications
- Self-Healing UI Patterns - Automatically adapts when DoorDash changes their UI
doordash-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── tools/ # MCP tool implementations
│ │ ├── browse_restaurants.ts
│ │ ├── recent_orders.ts
│ │ ├── restaurant_menu.ts
│ │ ├── cart_management.ts
│ │ ├── order_placement.ts
│ │ ├── order_tracking.ts
│ │ └── set_location.ts
│ ├── browser/ # Browser automation
│ │ ├── session.ts # Session management
│ │ ├── auth.ts # Authentication
│ │ └── navigation.ts # Smart navigation
│ ├── patterns/ # Self-healing pattern system
│ │ ├── ui-patterns.json # Pattern definitions
│ │ ├── pattern-matcher.ts
│ │ └── pattern-healer.ts # Claude-powered healing
│ ├── state/ # State management
│ │ ├── manager.ts
│ │ └── types.ts
│ ├── integrations/ # External service clients
│ │ ├── shopping-travel.ts
│ │ ├── beeper.ts
│ │ └── craft.ts
│ └── claude/
│ └── client.ts # Claude API for healing
├── Dockerfile
├── fly.toml
└── package.json
When browser automation fails due to DoorDash UI changes:
- Capture State - Takes ARIA snapshot + screenshot
- Claude Analysis - Asks Claude API to find the new element
- Update Patterns - Stores new working selectors
- Retry Operation - Continues with updated patterns
- Log Event - Records healing for review
{
"add_to_cart_button": {
"description": "Button to add menu item to cart",
"version": 3,
"strategies": [
{
"type": "aria_role",
"role": "button",
"textContains": "Add to Order",
"priority": 1
}
],
"healingHistory": [...]
}
}Browse DoorDash restaurants, organized by cuisine.
{
location?: string, // Delivery address
cuisine_filter?: string // mexican, italian, chinese, etc.
}Get order history with reorder capability.
Reorder a previous order by ID.
{
order_id: string
}Get restaurant menu with popular items first.
{
restaurant_id?: string,
restaurant_name?: string
}Add items to cart with customizations.
{
restaurant_id: string,
items: [{
name: string,
quantity?: number,
customizations?: string[],
special_instructions?: string
}]
}View current cart contents.
Clear all items from cart.
Review order before placing - shows fees, delivery options, tip.
Place order - REQUIRES explicit confirmation.
{
confirmation: "confirm" | "yes", // Required!
tip_amount?: number,
delivery_priority?: "standard" | "priority"
}Get current order status and ETA. Auto-sends Beeper notifications.
Set delivery address.
{
address: string
}This MCP server integrates with:
- Shopping & Travel MCP - Browser automation (
scraping_browser_*tools) - Beeper MCP - Order notifications
- Craft MCP - State persistence and logging
- Claude API - Self-healing pattern detection
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit .env with your credentials
# Build
npm run build
# Run (test mode)
TEST_MODE=true npm start# Create app
fly apps create doordash-mcp --org personal
# Set secrets
fly secrets set \
ANTHROPIC_API_KEY=sk-ant-... \
DOORDASH_EMAIL=your@email.com \
DOORDASH_PASSWORD=... \
BEEPER_CHAT_ID=!...:beeper.com \
CRAFT_SPACE_ID=... \
CRAFT_API_KEY=... \
CRAFT_STATE_DOC_ID=... \
CRAFT_PATTERN_DOC_ID=... \
CRAFT_ERROR_LOG_DOC_ID=...
# Deploy
fly deploy
# Check status
fly status
fly logs- Order Confirmation Required - Never places order without explicit "confirm" or "yes"
- Order Review - Always shows full summary before confirming
- Rate Limiting - Max 3 healing attempts per pattern per hour
- Error Logging - All errors logged to Craft
- Auto-Save - State saved every 5 minutes
- Test Mode - Set
TEST_MODE=trueto prevent real orders
# Set delivery address
> set_location address="123 Main St, Denver, CO 80202"
# Browse restaurants
> browse_restaurants cuisine_filter="mexican"
# View menu
> get_restaurant_menu restaurant_name="Illegal Pete's"
# Build cart
> build_cart restaurant_id="illegal-petes" items=[
{"name": "Mission Burrito", "quantity": 1, "customizations": ["carnitas", "guacamole"]}
]
# Review order
> review_order
# Place order (requires confirmation)
> place_order confirmation="confirm" tip_amount=5
# Track order
> track_order
- Check credentials in
.env - DoorDash may require 2FA - check email
- Check Craft error log for details
- Pattern may need manual update
- Verify Claude API key is valid
- Shopping & Travel MCP must be running
- Check browser session state
- Try clearing session and re-authenticating
MIT - Built for GARZA OS