<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zhu</title>
    <description>The latest articles on DEV Community by Zhu (@zhu_726761e22491e810619fc).</description>
    <link>https://dev.to/zhu_726761e22491e810619fc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4103562%2Fdcd98f0f-c459-4e86-8bd1-054a2d6113ec.png</url>
      <title>DEV Community: Zhu</title>
      <link>https://dev.to/zhu_726761e22491e810619fc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zhu_726761e22491e810619fc"/>
    <language>en</language>
    <item>
      <title>Give Your AI Agent Its Own Inbox: A 5-Minute Setup with MCP</title>
      <dc:creator>Zhu</dc:creator>
      <pubDate>Tue, 01 Sep 2026 03:30:28 +0000</pubDate>
      <link>https://dev.to/zhu_726761e22491e810619fc/give-your-ai-agent-its-own-inbox-a-5-minute-setup-with-mcp-2e2p</link>
      <guid>https://dev.to/zhu_726761e22491e810619fc/give-your-ai-agent-its-own-inbox-a-5-minute-setup-with-mcp-2e2p</guid>
      <description>&lt;p&gt;Most email APIs are send-only. But if you're building an agent that needs to&lt;br&gt;
have a &lt;em&gt;conversation&lt;/em&gt; over email — support, scheduling, invoicing — it needs&lt;br&gt;
to receive replies too, with thread context.&lt;/p&gt;

&lt;p&gt;In this post we'll set up an agent with its own mailbox using the Model&lt;br&gt;
Context Protocol. This is an official EngageLab Email tutorial, so feedback&lt;br&gt;
from developers is welcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll end up with
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An agent that sends email from its own address (not your personal inbox)&lt;/li&gt;
&lt;li&gt;Replies arriving as structured data the agent can read&lt;/li&gt;
&lt;li&gt;Conversation threads as a first-class object&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1 — Get a Secret Key
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.engagelab.com/zh_CN/accounts/signup" rel="noopener noreferrer"&gt;Create an EngageLab account&lt;/a&gt; and generate a Secret Key from the console (it looks like&lt;br&gt;
&lt;code&gt;sk_sg_xxx&lt;/code&gt; — the prefix encodes the region). Or use the CLI to create one&lt;br&gt;
via browser login:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @engagelabemail/cli
engagelab-email-cli login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You'll also need a mailbox — create one in the console (shared subdomain is&lt;br&gt;
fastest to start; custom domains need DNS verification).&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Register the MCP server
&lt;/h2&gt;

&lt;p&gt;For Claude Code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;claude mcp add engagelab-email \
  -e ENGAGELAB_EMAIL_SECRET_KEY=sk_sg_yourkey \
  -- npx -y @engagelabemail/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Or in &lt;code&gt;claude_desktop_config.json&lt;/code&gt;:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{&lt;br&gt;
  "mcpServers": {&lt;br&gt;
    "engagelab-email": {&lt;br&gt;
      "command": "npx",&lt;br&gt;
      "args": ["-y", "@engagelabemail/mcp"],&lt;br&gt;
      "env": { "ENGAGELAB_EMAIL_SECRET_KEY": "sk_sg_yourkey" }&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Step 3 — Talk to it&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Ask your agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;List my mailboxes, then send an email from the first one to&lt;br&gt;
&lt;a href="mailto:me@example.com"&gt;me@example.com&lt;/a&gt; saying "invoice #42 approved", then check for new messages.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent now has 9 tools: send, reply, list inbound mail, get a message,&lt;br&gt;
poll for new mail, and browse threads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a dedicated mailbox (not Gmail access)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Blast radius: the agent can only read/write its own mailbox&lt;/li&gt;
&lt;li&gt;Threads: replies group into conversations, so the agent keeps context&lt;/li&gt;
&lt;li&gt;Machine-first: everything is JSON over MCP — no IMAP parsing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sandbox mode (&lt;code&gt;sandbox: true&lt;/code&gt; in send_email) skips real delivery while
you're iterating on prompts&lt;/li&gt;
&lt;li&gt;Attachments are base64 in the tool schema — fine for documents, clunky
for &amp;gt;5MB files&lt;/li&gt;
&lt;li&gt;Mailbox creation is currently a console step; programmatic creation is on
the roadmap&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Metaverse-Cloud/engagelab-email-mcp" rel="noopener noreferrer"&gt;https://github.com/Metaverse-Cloud/engagelab-email-mcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Package: &lt;a href="https://www.npmjs.com/package/@engagelabemail/mcp" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@engagelabemail/mcp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What would you build first — a support agent, or an approval bot?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>claude</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
