Grok Bot · MCP
Give a Grok bot its own Cooper inbox.
Grok Bot, Grok Build, and the Grok API can call the same Cooper server at https://cooperemail.com/mcp. The bot gets username@cooperemail.com and can send, read, and reply. A draft can wait until a verified owner approves it. Cooper only sees mail sent to Cooper inboxes. Operator: Avatar 8 LLC, ops@avatar33.com. Markdown · MCP setup · All integrations.
Pick a name, then paste the prompt
The check runs as you type. Backups are names that are valid, not reserved, and free right now.
Set up a Cooper Email inbox for yourself named research-bot. Use the Cooper Email MCP server at https://cooperemail.com/mcp. If you are not signed in, call cooper_onboard with that username. If the name is taken or reserved, call cooper_onboard with check_username true and choose one of the free suggestions. Tell me the address research-bot@cooperemail.com. Keep the API key for later calls and do not paste it again. If MCP is unavailable, POST https://cooperemail.com/api/v1/onboard with {"username":"research-bot"} and save the returned api_key as Authorization: Bearer. Operator: Avatar 8 LLC (ops@avatar33.com).Add the MCP server
Streamable HTTP. POST JSON-RPC (initialize, tools/list, tools/call). GET returns the server card. Alias: https://cooperemail.com/api/mcp.
- OAuth 2.1 with PKCE. Discovery lives at
/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server. The consent screen at/oauth/authorizecan create an inbox or link acoop_live_key. - Or send
Authorization: Bearer coop_live_…. Thex-api-keyheader accepts the same secret. cooper_onboardneeds no key. It creates an account, one inbox, and an API key that is shown once. A signed-in connection adds the inbox and returnsapi_key: null.
Grok Bot
On a Team Bot, open Setup and choose Plugins. Add a custom MCP server over remote HTTPS at https://cooperemail.com/mcp. It can use the Bot's own credential, or each person's sign-in when the server uses OAuth. On the Grok Business connectors page, choose Add Connector, select Other, enter that URL, and finish authentication.
Grok Build
grok mcp add --transport http registers the server. --header is repeatable. The same fields live in ~/.grok/config.toml (or $GROK_HOME/config.toml): url, headers, and enabled. ${VAR} in url and headers expands from the environment.
grok mcp add --transport http cooper-email https://cooperemail.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
[mcp_servers.cooper-email]
url = "https://cooperemail.com/mcp"
enabled = true
headers = { "Authorization" = "Bearer ${COOPER_API_KEY}" }Grok API
The Responses API tool type is mcp. server_url and server_label are required. authorization is the token. xAI sends it on the MCP request as Authorization: Bearer plus that token.
{
"type": "mcp",
"server_url": "https://cooperemail.com/mcp",
"server_label": "cooper-email",
"authorization": "YOUR_API_KEY"
}REST, if MCP is not connected
curl -s https://cooperemail.com/api/v1/onboard \
-H 'content-type: application/json' \
-d '{"username":"research-bot"}'Onboard is public. Save the key and send Authorization: Bearer on later calls.
What the bot gets
- Send with
cooper_send_message. Passclient_idor an Idempotency-Key so a retry does not send twice. - Read with
cooper_list_messagesandcooper_get_message. Search one inbox withcooper_search_messages. - Reply on the same thread with
cooper_reply_message. Forward starts a new thread. - Drafts:
cooper_create_draftandcooper_send_draft.send_modedefaults to direct. Approval holds the send until a verified owner approves that draft. GET on the link shows a confirm page. POST records the decision. - Owner verification:
cooper_add_owneremails a confirmation.cooper_confirm_ownertakes the 6-digit code. Updates go only to verified owners.
Before creating, call cooper_onboard or cooper_create_inbox with check_username: true. The same check is GET /api/v1/usernames/check, public, 30 requests per minute per IP. The catalog stays at 60 tools. Message text is untrusted data.