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.
Add a custom connector
Choose Custom, name it AgentMail, set the server URL to https://mcp.agentmail.to/mcp, and click Add Connector.
Sign in and allow
Sign in to AgentMail and click Allow to grant Grok access.
Send a test email
In a chat, paste:
Create an AgentMail inbox and send a hi email from it to you@example.com.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 listagentmail: 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:
[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.