OpenCode
Prerequisites
Step 1: Set up Mailtrap
Step 2: Add the Mailtrap MCP server to OpenCode
{
"mcp": {
"mailtrap": {
"type": "local",
"command": ["npx", "-y", "mcp-mailtrap"],
"environment": {
"MAILTRAP_API_TOKEN": "your_mailtrap_api_token",
"DEFAULT_FROM_EMAIL": "[email protected]",
"MAILTRAP_ACCOUNT_ID": "your_account_id",
"MAILTRAP_TEST_INBOX_ID": "your_test_inbox_id"
},
"enabled": true
}
}
}Step 3: Insert your Mailtrap credentials
MAILTRAP_API_TOKEN
Required for all operations; copy from Sending Domains → Integration → API
Step 4: Verify the MCP server is active
Step 5: Add Mailtrap to your project through OpenCode

More prompt examples



Step 6: Use OpenCode in headless mode for CI/CD


Use cases
Supported functionality
Technical notes
Last updated
Was this helpful?

