productivity
Mailtrap MCP, CLI, and Lua Integration for AI Agents
Mailtrap integration docs for AI agents: MCP gateway setup, Mailtrap CLI commands, Lua API reference, credentials, and function schemas.
7 functions 6 read 1 write API token auth
Mailtrap for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
mailtrap- route_slug
mailtrap- package
mailtrap- auth_strategy
api_tokenAPI token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Mailtrap CLIHeadless setup and direct function calls. Mailtrap MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Mailtrap MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Mailtrap.
Claude Code Mailtrap MCP setup for Claude Code. Cursor Mailtrap MCP setup for Cursor. Codex Mailtrap MCP setup for Codex. OpenAI Agents Mailtrap MCP setup for OpenAI Agents SDK. Claude Agent SDK Mailtrap MCP setup for Claude Agent SDK. Vercel AI SDK Mailtrap MCP setup for Vercel AI SDK. LangChain Mailtrap MCP setup for LangChain. LangGraph Mailtrap MCP setup for LangGraph. CrewAI Mailtrap MCP setup for CrewAI. MCP clients Mailtrap MCP setup for Generic MCP Clients.
Mailtrap CLI Matrix
Use these pages for direct Mailtrap CLI workflows in scripts, CI, cron, and agent wrappers.
CI Mailtrap CLI for CI. Cron Jobs Mailtrap CLI for cron jobs. Shell Scripts Mailtrap CLI for shell scripts. Headless Automation Mailtrap CLI for headless automation. Coding Agents Mailtrap CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
mailtrap.mailtrap_list_inboxes | Read read | 0 | List all inboxes in the Mailtrap account. Returns inbox IDs, names, and email addresses. |
mailtrap.mailtrap_get_inbox | Read read | 1 | Get details for a specific Mailtrap inbox by ID, including its email address, settings, and message counts. |
mailtrap.mailtrap_list_messages | Read read | 4 | List messages in a Mailtrap inbox with optional search and pagination. |
mailtrap.mailtrap_get_message | Read read | 2 | Get a single message from a Mailtrap inbox by its ID, including subject, sender, recipient, and body. |
mailtrap.mailtrap_send_test_email | Write write | 6 | Send a test email through Mailtrap. Provide sender, recipient(s), subject, and either text or HTML body. |
mailtrap.mailtrap_list_suppressions | Read read | 3 | List suppressions (blocked recipients) for a Mailtrap inbox. |
mailtrap.mailtrap_get_current_user | Read read | 0 | Get the current Mailtrap user profile and account info. Useful as a health check. |