Agents following these steps: ask the person for an API key; never invent one, print it back or store it in a repository. Before any step that launches a campaign, sends a message, uses AI credits or starts a purchase, ask the person to confirm.
1. Get an API key
The person creates the key in Emailx under API, MCP & CLI → New API key, choosing the workspaces, the access (None, Read or Full per area) and an expiry. Emailx shows the key once. Save it in a private file only the user can read:CLI
Needs Python 3.11 or newer.doctor should report the account and environment of the key. Then explore with emailx --help and emailx <group> --help; every command lists the fields it accepts. Add the two export lines to the shell profile so later sessions keep working.
MCP
Install the package as in the CLI section (it includes the MCP server), then add Emailx to your agent. Use absolute paths.- Claude Code
- Cursor
- Claude Desktop
- Codex
- Gemini CLI
Connect by URL (ChatGPT, Claude on the web, Grok)
Assistants that add MCP servers by URL usehttps://app.emailx.ai/mcp. You sign in to Emailx in the browser and choose the workspaces and access there; no key file is needed. This connection is available when it is enabled for your account.
Check it works
Ask the agent: “Which Emailx account and workspaces am I connected to?” It should callget_connection and list_workspaces and answer with your workspace names.
Next: find the right endpoint, the MCP tools and the CLI commands.
