UberEats MCP Server Enhanced

UberEats MCP Server Enhanced

A production-ready MCP server for UberEats automation, featuring Redis-backed sessions, n8n integration, and enterprise-grade security, enabling login, item addition, address setting, and checkout.

Category
Visit Server

README

UberEats MCP Server Enhanced

A modern, production-ready Model Context Protocol (MCP) server for UberEats automation built with TypeScript, Redis, and enterprise-grade security features.

๐Ÿš€ Features

Core Functionality

  • MCP Protocol Compliance: Native MCP server with tools, resources, and prompts
  • Session Management: Redis-backed sessions with JWT authentication
  • n8n Integration: Seamless workflow orchestration with circuit breakers
  • Type Safety: Full TypeScript implementation with strict mode
  • Security: Input validation, rate limiting, encryption, and audit logging

Performance & Scalability

  • Horizontal Scaling: Stateless design with Redis session storage
  • Circuit Breakers: Fault tolerance for external services
  • Connection Pooling: Efficient resource management
  • Caching: Redis-based caching for optimal performance
  • Monitoring: Built-in health checks and metrics

Developer Experience

  • Hot Reload: Development mode with automatic restarts
  • Comprehensive Logging: Structured logging with pino
  • Error Handling: Centralized error management
  • Code Quality: ESLint, Prettier, and TypeScript strict mode
  • Documentation: Complete API documentation and examples

๐Ÿ“‹ Prerequisites

  • Node.js 20.0.0 or higher
  • Redis 7.0 or higher
  • n8n workflow automation platform
  • Docker (optional, for containerized deployment)

๐Ÿ›  Installation

Option 1: Local Development

# Clone the repository
cd ubereats_mcp_server_enhanced

# Install dependencies
npm install

# Copy environment configuration
cp .env.example .env

# Edit configuration
nano .env

# Build the project
npm run build

# Start Redis (if not running)
redis-server

# Start the server
npm start

Option 2: Docker Deployment

# Copy environment configuration
cp .env.example .env

# Edit configuration for production
nano .env

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f ubereats-mcp

โš™๏ธ Configuration

Environment Variables

Create a .env file based on .env.example:

# Security (REQUIRED for production)
JWT_SECRET=your-super-secure-jwt-secret-key-change-in-production
SESSION_SECRET=your-session-secret-key-change-in-production
ENCRYPTION_KEY=your-32-character-encryption-key-change-this

# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

# n8n Integration
N8N_BASE_URL=http://localhost:5678
N8N_API_KEY=

# Server Configuration
NODE_ENV=production
PORT=5001
LOG_LEVEL=info

MCP Client Configuration

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "ubereats": {
      "command": "node",
      "args": ["/path/to/ubereats_mcp_server_enhanced/dist/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

๐Ÿ”ง Usage

MCP Tools

Login Tool

{
  "name": "ubereats_login",
  "arguments": {
    "username": "user@example.com",
    "password": "password",
    "manualMode": false
  }
}

Add Items Tool

{
  "name": "ubereats_add_items",
  "arguments": {
    "sessionId": "session-uuid",
    "restaurantName": "McDonald's",
    "items": [
      {
        "name": "Big Mac",
        "quantity": 2,
        "options": {
          "size": "large",
          "extras": ["cheese"]
        }
      }
    ]
  }
}

Set Address Tool

{
  "name": "ubereats_set_address",
  "arguments": {
    "sessionId": "session-uuid",
    "address": {
      "street": "123 Main St",
      "city": "Anytown",
      "state": "CA",
      "zipCode": "90210"
    }
  }
}

Checkout Tool

{
  "name": "ubereats_checkout",
  "arguments": {
    "sessionId": "session-uuid",
    "paymentMethodId": "saved_card_123",
    "tipAmount": 5.00
  }
}

MCP Resources

Health Check

URI: ubereats://health

Returns server health status, system metrics, and service availability.

Session Information

URI: ubereats://sessions

Returns information about active sessions and session counts.

Prompts

Quick Order

{
  "name": "quick_order",
  "arguments": {
    "restaurant": "Pizza Hut",
    "items": "Large pepperoni pizza, 2 liter Coke",
    "address": "123 Main St, Anytown, CA 90210"
  }
}

๐Ÿ— Architecture

System Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   MCP Client    โ”‚โ—„โ”€โ”€โ–บโ”‚   MCP Server    โ”‚โ—„โ”€โ”€โ–บโ”‚   Redis Cache   โ”‚
โ”‚   (Claude)      โ”‚    โ”‚  (TypeScript)   โ”‚    โ”‚   (Sessions)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   n8n Server    โ”‚โ—„โ”€โ”€โ–บโ”‚   Playwright    โ”‚
                       โ”‚  (Workflows)    โ”‚    โ”‚  (Browser)      โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Component Details

  • MCP Server: TypeScript server implementing MCP protocol
  • Session Service: Redis-backed session management with JWT
  • n8n Service: Workflow orchestration with circuit breakers
  • Tools: MCP tools for UberEats operations
  • Resources: Information endpoints for monitoring
  • Prompts: Pre-defined interaction templates

๐Ÿ”’ Security Features

Authentication & Authorization

  • JWT token-based session management
  • Session validation on all protected operations
  • Secure session storage with Redis TTL

Input Validation

  • Zod schema validation for all inputs
  • XSS protection and sanitization
  • SQL injection prevention (Redis NoSQL)

Rate Limiting

  • Per-endpoint rate limiting
  • Global rate limiting
  • Configurable limits and windows

Data Protection

  • AES-256 encryption for sensitive data
  • Secure cookie handling
  • Password exclusion from logs and storage

Monitoring & Auditing

  • Comprehensive audit logging
  • Security event tracking
  • Performance monitoring

๐Ÿ“Š Monitoring & Observability

Health Checks

# Check server health
curl http://localhost:5001/health

# Docker health check
docker-compose ps

Logging

  • Structured JSON logging with pino
  • Configurable log levels
  • Request/response logging with sensitive data redaction

Metrics

  • Redis connection health
  • n8n service availability
  • Circuit breaker status
  • Session statistics

๐Ÿงช Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run tests in watch mode
npm run test:watch

# Lint code
npm run lint

# Format code
npm run format

# Type check
npm run type-check

MCP Inspector

The MCP Inspector is a powerful debugging tool that allows you to test and interact with your MCP server directly. It provides a web-based interface to:

  • Test MCP tools with custom parameters
  • View available resources and prompts
  • Monitor server responses and errors
  • Validate MCP protocol compliance

Running the MCP Inspector

# Build the project first
npm run build

# Start the MCP Inspector
npm run inspector

# Or run directly with npx
npx @modelcontextprotocol/inspector dist/index.js

This will start a web interface (typically at http://localhost:5173) where you can:

  1. Test Tools: Call any registered tool (login, add_items, set_address, checkout) with custom parameters
  2. View Resources: Access health check and session information resources
  3. Test Prompts: Try the quick_order and reorder prompts with different parameters
  4. Debug Issues: See detailed request/response logs and error messages

Inspector Usage Tips

  • Environment Setup: Ensure Redis and n8n are running before testing tools
  • Tool Testing: Start with the login tool to establish a session, then test other tools
  • Error Debugging: Check the inspector console for detailed error messages
  • Schema Validation: The inspector validates input schemas automatically

The inspector is essential for development and debugging, allowing you to test the MCP server independently of Claude Code integration.

๐Ÿš€ Deployment

Production Deployment

  1. Environment Setup
# Set production environment variables
export NODE_ENV=production
export JWT_SECRET="your-production-jwt-secret"
export SESSION_SECRET="your-production-session-secret"
export ENCRYPTION_KEY="your-production-encryption-key"
  1. Database Setup
# Start Redis
docker run -d --name redis -p 6379:6379 redis:7-alpine

# Or use managed Redis (AWS ElastiCache, etc.)
  1. Application Deployment
# Build application
npm run build

# Start with PM2 (recommended)
pm2 start dist/index.js --name ubereats-mcp

# Or use Docker
docker-compose up -d

Kubernetes Deployment

See k8s/ directory for Kubernetes manifests (coming soon).

๐Ÿ› Troubleshooting

Common Issues

Server Won't Start

# Check Node.js version
node --version  # Should be >= 20.0.0

# Check environment variables
npm run check-env

# Check Redis connection
redis-cli ping

Authentication Errors

# Verify JWT secret is set
echo $JWT_SECRET

# Check session in Redis
redis-cli get "ubereats:session:your-session-id"

n8n Integration Issues

# Test n8n connectivity
curl http://localhost:5678/health

# Check circuit breaker status
curl http://localhost:5001/api/circuit-breakers

Debug Mode

# Enable debug logging
export LOG_LEVEL=debug
export ENABLE_DEBUG=true

# Start server
npm run dev

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript strict mode
  • Write tests for new features
  • Update documentation
  • Use conventional commits
  • Ensure code passes linting

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support


Note: This is an enhanced version of the original Flask-based UberEats MCP server, rebuilt with modern technologies and enterprise-grade features.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured