Wire OpenAI Codex to Drin however it runs: the MCP server for tool calls, the CLI for scripted steps, or plain REST in generated code. Same capabilities, same key — send, receive and reply with it.
// MCP config — illustration; exact setup in the docs { "mcpServers": { "drin": { "command": "npx", "args": ["@drin00/mcp"], "env": { "DRIN_API_KEY": "drin_live_…" } } } } # …or skip MCP and call the REST API from generated code: curl https://api.drin.run/v1/emails \ -H "Authorization: Bearer $DRIN_API_KEY" \ -d '{ "from":"hello@drin.run","to":"u@acme.com","subject":"Hi","text":"It works." }'
Create a scoped API key in the dashboard. All three paths — MCP, CLI and REST — authenticate as that single DRIN_API_KEY.
Register the MCP server for tool calls, or have Codex use the CLI and REST directly when you'd rather not add a tool server.
Ask Codex to send, triage the inbox, or wire a send into your app — in an interactive session or an unattended CI step.
https://api.drin.run/v1DRIN_API_KEYConnect Codex to the MCP server and it sends, batches and schedules mail through the same 54 tools every client shares.
Codex can drive the full Drin CLI — sends, domain verification, inbox triage and replies — inside a shell step or CI job.
Prefer no extra runtime? Codex writes plain cURL or SDK calls against the documented REST API and your key.
List threads, read a message, and reply in-thread from the agent's own address — so Codex handles responses, not just sends.
Grab a key, pick MCP, CLI or REST, and let Codex send, receive and reply. Test in the sandbox; production starts at $3 a month.