Skip to content

Email for LangGraph Agents: Send and Receive over MCP

To give a LangGraph agent its own email, connect Sairaph Mail's native MCP server with the langchain-mcp-adapters package: point MultiServerMCPClient at https://mail.sairaph.com/mcp/v1/mcp, pass your mailbox key as a Bearer header, and await client.get_tools() to load the mailbox's send and read actions as LangChain tools. Your graph then sends, reads inbound, and handles replies through the same scoped key - no SMTP, no IMAP loop, no SDK to install on our side.

Last updated June 30, 2026

This guide wires a real, owned mailbox into a LangGraph agent in three steps.

Step 1 - Provision a mailbox and a scoped key

Create a mailbox in the dashboard (on a managed domain or your own) and issue a per-mailbox key with the role your agent needs. For send-and-read use read_write; for OTP/confirmation reads only, use read. Keys are issued from the dashboard only - never minted over the API - so a leaked key can't create another:

Shell

Step 2 - Connect the MCP server to LangGraph

Sairaph Mail speaks streamable-HTTP MCP, which langchain-mcp-adapters consumes directly. Configure one server entry with the endpoint and the Bearer header, then load its tools:

Python

If you prefer not to add the MCP adapter, every mailbox is equally reachable over plain REST - send is one POST:

cURL

Step 3 - Handle the reply in your graph

Because the mailbox is two-way, the agent reads inbound through the same tools - list inbound, optionally force an on-demand fetch when it's blocking on a one-time code, and branch on what arrived. Over REST that read leg is:

cURL

Wire this as a node that polls (or fetches live) until the expected reply lands, then routes to the next step in your graph.

How Sairaph Mail fits LangGraph

LangGraph gives the orchestration; Sairaph Mail gives the agent a real inbox it owns - send, receive, and read over one scoped, expiring key, EU-hosted by default. The MCP surface means no glue code; the REST surface means no lock-in. See the MCP email server pillar for the full tool surface, or build a full loop with the inbox-triage walkthrough.

Next step: the quickstart takes you from zero to send-plus-receive, and the MCP docs cover auth and transport in detail.

  • MCP Email Server: Give Your Agent Email as Native Tools

    An in-depth guide.

    Learn more
  • MCP

    Connect over the MCP server.

    Learn more
  • Quickstart

    Zero to send + receive in minutes.

    Learn more
  • Inbox Triage Agent

    Learn more.

    Learn more

Give your agent a real mailbox

Two-way email over REST and a native MCP server, EU-resident by default.

EU data residencyPer-customer encryptionNative MCP