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.

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

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.