Skip to content
AgentMail
AgentMail
Agent platforms

Send & Receive Emails with Grok

Use the AgentMail connector directly on grok.com to send and receive emails

Grok is xAI’s assistant. Connect AgentMail and it gets an email inbox of its own to send, receive, and reply from, from the Grok app or the Grok Build CLI.

Grok app

Add AgentMail as a custom connector. You need a Grok account and an AgentMail account.

Open Connectors

In Grok, open Plugins and go to Connectors. Click New Connector.

Grok's Connectors page

Add a custom connector

Choose Custom, name it AgentMail, set the server URL to https://mcp.agentmail.to/mcp, and click Add Connector.

Grok's Custom Connector form filled in for AgentMail

Sign in and allow

Sign in to AgentMail and click Allow to grant Grok access.

AgentMail authorization screen for Grok

Send a test email

In a chat, paste:

Create an AgentMail inbox and send a hi email from it to you@example.com.
Grok confirming a sent email from an @agentmail.to inbox

Grok Build

Grok Build authenticates with an API key. Generate one, then register the MCP server:

export AGENTMAIL_API_KEY="<API_KEY>"

grok mcp add --transport http agentmail https://mcp.agentmail.to/mcp \
  --header "Authorization: Bearer $AGENTMAIL_API_KEY"

Pass the key as Authorization: Bearer. An x-api-key header starts an OAuth sign-in instead. Confirm the registration:

grok mcp list

agentmail: https://mcp.agentmail.to/mcp should appear, and grok mcp doctor agentmail runs a live handshake. To keep the config in version control, write it by hand and start a new grok session:

~/.grok/config.toml
[mcp_servers.agentmail]
url = "https://mcp.agentmail.to/mcp"
headers = { "Authorization" = "Bearer <API_KEY>" }

Then ask a grok session to use it:

Create an AgentMail inbox and send a hi email from it to you@example.com.

Next Steps

Was this page helpful?Suggest editsRaise issue