Skip to content

Instantly share code, notes, and snippets.

@jmcdice
Created January 24, 2026 20:01
Show Gist options
  • Select an option

  • Save jmcdice/9ab2092b4bc38ca9bf85d1a6f145d9c2 to your computer and use it in GitHub Desktop.

Select an option

Save jmcdice/9ab2092b4bc38ca9bf85d1a6f145d9c2 to your computer and use it in GitHub Desktop.
Mai-Tai blog post draft for review
title date categories tags description image
Mai-Tai - Async Human-Agent Collaboration From Anywhere
2025-04-01
AI
Developer Tools
Productivity
ai-agents
mcp
collaboration
async
mobile
claude
automation
How I built Mai-Tai, an async collaboration layer that lets you manage AI coding agents from your phone, laptop, or the beach while they keep working on your projects.
path
/common/mai-tai.png

The Problem: Tethered to Your Terminal

AI coding agents are incredibly capable. They can refactor codebases, write tests, debug issues, and implement features while you provide guidance. But there's a catch: you need to be sitting at your computer, watching the terminal, ready to answer questions the moment they come up.

This creates an awkward dynamic. Your agent hits a decision point and waits. You're stuck watching. Step away for coffee and the whole thing stalls. It's like having a brilliant assistant who refuses to leave you a voicemail.

I wanted something different. I wanted to tell my agent what to work on, walk away, and check in from my phone when I had time. Answer questions from the couch. Review progress from the coffee shop. Keep the work flowing without being chained to my desk.

Enter Mai-Tai: Work From the Beach

Mai-Tai is an async collaboration layer that connects AI coding agents to humans via the web. Your agent keeps working while you step away; you check in from any device, answer questions, and review progress whenever you're ready.

The name captures the vision: you should be able to manage your AI assistant while sipping a drink on the beach. Or more realistically, while walking the dog, waiting in line, or pretending to pay attention in a meeting.

How It Works

The architecture is straightforward:

  1. Human creates a project and channels in the web UI
  2. Agent connects via MCP server using an API key
  3. Agent sends messages, asks questions, reports progress
  4. Human responds from any device - phone, laptop, wherever

Messages flow through Mai-Tai's backend. The agent doesn't need you at your IDE. You catch up when it's convenient.

The MCP Connection

Mai-Tai uses the Model Context Protocol (MCP) to integrate with AI agents. The mai-tai-mcp server exposes tools that agents can call:

  • chat_with_human - Send a message and wait for a reply
  • update_status - Non-blocking progress updates
  • get_messages, get_project_info - Context retrieval

Any MCP-compatible agent host (Claude Desktop, Cursor, Claude Code, etc.) can connect to Mai-Tai and start collaborating asynchronously.

Mai-Tai Mode

The magic happens when you activate "mai-tai mode" by telling your agent:

"start mai-tai mode"

The agent switches to routing all communication through the web UI. It stops responding in the terminal and uses mai-tai tools instead. Now you can close your laptop, and the conversation continues on your phone.

The agent keeps working, queues questions via chat_with_human, and sends progress updates. You review and respond when you're back - whether that's five minutes or five hours later.

Mobile-First Design

The frontend is designed for phones first. This isn't an afterthought; it's the entire point. If you can't comfortably manage your agent from a mobile browser, the async workflow falls apart.

Mai-Tai Interface

Projects are organized into channels (like Slack), making it easy to separate concerns. Your agent posts to the appropriate channel; you review when ready.

Getting Started

Setting up Mai-Tai locally takes a few commands:

# Clone and start the stack
git clone https://github.com/jmcdice/mai-tai.git
cd mai-tai
cp .env.example .env
./dev.sh local up

This spins up the frontend (Next.js) at localhost:3000 and the backend API (FastAPI) at localhost:8000.

From there:

  1. Create a project in the web UI
  2. Add channels for your workflows
  3. Generate an API key
  4. Configure your MCP host to use mai-tai-mcp with that key

Your agent is now connected. Tell it to start mai-tai mode and walk away.

The Stack

Mai-Tai is built with modern, pragmatic choices:

  • Frontend: Next.js 14+ with App Router, mobile-first responsive design
  • Backend: FastAPI + SQLAlchemy + Alembic for the API and database
  • MCP Server: Python package using FastMCP with stdio transport

Everything runs in Docker for local development, with a simple dev.sh script managing the lifecycle.

Why This Matters

The current generation of AI coding agents is powerful but synchronous. You're expected to be present, attentive, responsive. That's fine for pair programming sessions, but it doesn't scale.

Real work happens in chunks. You have meetings. You have lunch. You have a life outside the terminal. Mai-Tai acknowledges this reality and builds around it.

The agent becomes a truly asynchronous collaborator. It works while you're away. It waits patiently for your input. It doesn't need you watching every keystroke. You're the manager, not the babysitter.

What's Next

Mai-Tai is actively evolving. Some directions I'm exploring:

  • Multi-agent coordination - Multiple agents working on a project, communicating through shared channels
  • Webhook integrations - Trigger agent workflows from external events
  • Enhanced context - Better ways for agents to share what they've learned

Try It Out

Mai-Tai is open source and ready to use. Check out the GitHub repository for installation instructions, documentation, and contribution guidelines.

If you've ever wished you could manage your AI agent from your phone while grabbing coffee, this is for you.


Mai-Tai is MIT licensed. Contributions welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment