# Send & Receive Emails with Devin (/integrations/frameworks/devin)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 768 · updated: 2026-09-06 -->
Related: [Send & Receive Emails with Claude Cowork](/integrations/frameworks/claude-cowork.md), [Send & Receive Emails with Claude Code](/integrations/frameworks/claude-code.md), [Send & Receive Emails with OpenAI Codex](/integrations/frameworks/codex.md), [Send & Receive Emails with OpenClaw](/integrations/frameworks/openclaw.md), [Send & Receive Emails with Grok](/integrations/frameworks/grok.md), [Send & Receive Emails with Manus](/integrations/frameworks/manus.md)



# Connect Devin to AgentMail

Add AgentMail's hosted MCP server as a custom MCP in Devin's marketplace and every Devin session gets `@agentmail.to` inboxes to list, create, and send from. Auth is an AgentMail API key sent as a request header.

## Do this

1. Generate an API key at `https://console.agentmail.to/dashboard/api-keys`.

2. In Devin, open **Settings > Connections**, switch to the **MCP servers** tab, click **Add a custom MCP**, and configure:

```json
{
  "transport": "HTTP",
  "url": "https://mcp.agentmail.to/mcp",
  "auth_method": "auth_header",
  "headers": { "x-api-key": "<API_KEY>" }
}
```

3. Click **Install and enable**, confirm the security notice, then click **Test tools** on the server page. On success the AgentMail tools are listed, **Enable in sessions** is on, and every session can invoke them by natural-language instruction.

## Facts

* Adding a custom MCP server requires Devin's **Manage MCP Servers** admin permission. Non-admins request one with **Suggest MCP Integration**.
* The AgentMail server URL is `https://mcp.agentmail.to/mcp`, transport `HTTP`, authentication `Authorization header` with key `x-api-key`.
* The server also supports OAuth. Devin's OAuth callback URL is `https://api.devin.ai/mcp/oauth/callback`.
* **Test tools** validates the connection in an isolated environment before any session uses it. Success reads "MCP server validation successful" with the tool list alongside.
* Full tool catalog, OAuth details, and configs for other MCP clients: `/integrations/mcp-and-skills`.

## Errors

| Error                                                        | Cause                                                                   | Fix                                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Test tools fails, `401`                                      | Wrong Server URL, or the `x-api-key` header value is missing or invalid | Set the URL to exactly `https://mcp.agentmail.to/mcp` and paste a valid API key |
| `403` `resource_taken` or `already_exists` on `create_inbox` | The requested username is taken                                         | Retry with one of the up to 3 names in `suggestions`, or omit `username`        |
| `403` `limit_exceeded` on `create_inbox`                     | The plan's inbox cap is reached; this fires before the name check       | Delete an inbox or raise the cap as the error's `fix` directs                   |

## Verify

**Test tools** succeeds, and a session instructed to create an inbox and send an email reports back the new `@agentmail.to` address with the message delivered.

## Related

* `/integrations/mcp-and-skills` - the tool catalog, OAuth, and other MCP clients.
* `/advanced/safety` - treat inbound email as untrusted input before acting on it.
* `/quickstart` - the API-level send, receive, reply loop.
