productivity
Mailtrap MCP Integration for OpenAI Agents SDK
Connect Mailtrap to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Mailtrap to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Mailtrap MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-mailtrap": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=mailtrap",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=mailtrap --write=deny Why Use KosmoKrator Here
Expose only Mailtrap instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Mailtrap Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Mailtrap integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__mailtrap__mailtrap_list_inboxes | mailtrap.mailtrap_list_inboxes | Read | List all inboxes in the Mailtrap account. Returns inbox IDs, names, and email addresses. |
integration__mailtrap__mailtrap_get_inbox | mailtrap.mailtrap_get_inbox | Read | Get details for a specific Mailtrap inbox by ID, including its email address, settings, and message counts. |
integration__mailtrap__mailtrap_list_messages | mailtrap.mailtrap_list_messages | Read | List messages in a Mailtrap inbox with optional search and pagination. |
integration__mailtrap__mailtrap_get_message | mailtrap.mailtrap_get_message | Read | Get a single message from a Mailtrap inbox by its ID, including subject, sender, recipient, and body. |
integration__mailtrap__mailtrap_send_test_email | mailtrap.mailtrap_send_test_email | Write | Send a test email through Mailtrap. Provide sender, recipient(s), subject, and either text or HTML body. |
integration__mailtrap__mailtrap_list_suppressions | mailtrap.mailtrap_list_suppressions | Read | List suppressions (blocked recipients) for a Mailtrap inbox. |
integration__mailtrap__mailtrap_get_current_user | mailtrap.mailtrap_get_current_user | Read | Get the current Mailtrap user profile and account info. Useful as a health check. |