Skip to content
Projects
ProjectPrivate demo

MCP-UI Mail

An MCP server that answers with a real email interface, not text: compose, inbox and reply, inside the chat.

  • Node.js
  • MCP Apps
  • Gmail API
A test run in MCPJam Inspector, an open-source tool by MCPJam Inc.: connect the server, call compose_email, write in the widget, press Send. The recipient is blurred. 1 min 26, with narration and captions.Demo on invented data: every person, organisation, e-mail address, postal address and figure shown is fictional, and any resemblance to real people or organisations is coincidental.

Download the walkthrough (MP4)

Why it exists

An answer you can click, not just read.

Most MCP servers answer with text. For email, that means the model writes a draft, you copy it, open Gmail and paste it. MCP-UI and MCP Apps let a server answer with an interface instead, which the host draws inside the conversation.

This server is my test of that idea on a real job: Gmail. Ask to write an email and a compose form appears, filled in, with Send. List your inbox and you get rows you can archive, snooze, label or answer, without leaving the chat.

The model drafts, you decide, the widget sends.

What it does

Built for the real case, not the slide.

  • 01

    Four widgets in the chat

    Compose, inbox, reply and a single-email view, with buttons that work: Send, Save draft, Archive, Snooze, Label, Delete.

  • 02

    Two standards, one server

    The same widgets render in mcp-ui hosts such as LibreChat and in MCP Apps hosts such as MCPJam Inspector.

  • 03

    Email bodies kept apart

    Each HTML email is shown in its own sandboxed frame: its layout stays intact, its scripts never run, links open in a new tab.

  • 04

    Made for a busy inbox

    29 tools in all: triage, follow-ups, thread summaries, batch drafts, templates, snooze, attachments up to 8 MB.

How it works

4 stages, end to end.

In the compose flow, nothing leaves until you press Send. I test every widget in MCPJam Inspector, an open-source tool made by MCPJam Inc., before using it in a chat.

  1. Stage 01

    The model calls a tool

    For example compose_email, with what it already knows: recipient, subject, body.

  2. Stage 02

    The server answers with a widget

    An HTML resource (ui://gmail-compose), declared on the tool so the host knows where to find it.

  3. Stage 03

    The host draws it

    In a sandboxed frame, inside the conversation, next to the answer.

  4. Stage 04

    You act in it

    Edit, attach, press Send. The widget calls the server, and the server calls Gmail.

Built with

Few parts, chosen on purpose.

  • Node.js and the MCP SDK

    One small HTTP server: the MCP transport for the model, and a direct route for the widget buttons.

  • Gmail API

    Through the official googleapis client, with proper threading for replies and MIME for attachments.

  • Widgets in plain HTML

    Each widget is one self-contained page: no framework, no build step, served as an mcp-ui resource and as an MCP App.

Private demo

Built and running. Shown on request.

Access is private while I decide how to open it. The recording above shows a full run; to see it on your own case, write to me and I will show you on a call.