Skip to main content

Automated ordering system for Zepto Cafe using Playwright and MCP

Project description

Zepto MCP Server

Automated ordering system for Zepto Cafe using Playwright and MCP (Model Context Protocol).

Features

  • 🚀 Automated order placement
  • 🔐 Persistent login sessions (saved in Firefox)
  • 📦 Multi-item cart support
  • ⚡ Optimized for speed (~35-65 seconds per order)
  • 🎯 Address selection with fuzzy matching

Setup

1. Install Dependencies

pip3 install playwright mcp python-dotenv
python3 -m playwright install firefox

Note: python-dotenv is optional - if not installed, the code will use environment variables from Claude Desktop config or system environment.

2. Configure Phone Number and Address

You have two options:

Option A: Use Claude Desktop Config (Recommended)

Add environment variables directly in Claude Desktop config (see Step 4 below). No .env file needed.

Option B: Use .env File (Optional)

If you want to use a .env file, create it (copy from .env.example):

cp .env.example .env

Edit .env and add your phone number and optional default address:

ZEPTO_PHONE_NUMBER=your_phone_number_here
ZEPTO_DEFAULT_ADDRESS=your_address_label_here  # Optional: e.g., 'Hsr Home', 'Office New Cafe'

Note: The code will automatically load .env if python-dotenv is installed. If not, it will use system environment variables or Claude Desktop config.

Important: Never commit .env to git - it contains sensitive information.

3. Set Up Login Session

Run the setup script to save your login:

python3 setup_firefox_login.py

This will:

  1. Open Firefox
  2. Navigate to Zepto
  3. Wait for you to log in manually
  4. Save your session for future orders

4. Configure Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "zepto-cafe": {
      "command": "python3",
      "args": ["/Users/Pranav_1/zepto-mcp/zepto_mcp_server.py"],
      "env": {
        "ZEPTO_PHONE_NUMBER": "your_phone_number_here",
        "ZEPTO_DEFAULT_ADDRESS": "your_address_label_here"  # Optional
      }
    }
  }
}

Usage

Once configured, you can order through Claude Desktop:

  • "Order an iced americano to my office address"
  • "Can you order a hazelnut latte from Zepto Cafe"
  • "Order multiple items: hazelnut latte, almond croissant"

Security

  • ✅ Phone number stored in environment variable (not in code)
  • ✅ Browser data directories excluded from git
  • ✅ Login sessions stored locally (never committed)
  • ✅ No API keys or secrets in code

Files Structure

  • zepto_mcp_server.py - Main MCP server
  • setup_firefox_login.py - Login setup script
  • .env - Your configuration (not in git)
  • zepto_firefox_data/ - Browser session data (not in git)

Troubleshooting

If browser crashes:

  1. Close all Firefox/Chrome windows
  2. Delete zepto_firefox_data/ directory
  3. Run setup_firefox_login.py again

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0.tar.gz (64.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 449afd3fdc86081e4e77684f36d89ef54b9fee7e2d7808c89b7c3055684732b5
MD5 42fed3937bc8300c911bf3c6fe3b1a2a
BLAKE2b-256 b2aa1ed152482488d70b4b609dfc21abebcbcd4e6c8ea17d12ea777bce7f4539

See more details on using hashes here.

File details

Details for the file iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 83.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_proddnav_zepto_cafe_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89c38115448bd83fd949745e66652616c893e5ab0a93421ba62baa8a2f310b2d
MD5 b8e13c1137e67a2c78b24f052291fbe6
BLAKE2b-256 aa1ef38d777a17834dfc2544348c68fe170ed5696a9c9a89ca7dd91467ab1d52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page