opencode

Connect OpenCode to Mailgun

Give an AI agent your Mailgun as a tool and it can act on your email infrastructure instead of just reporting on it. It can create domains and routes, spin up mailing lists and add members in bulk, build templates and new versions, and read metrics, events, and bounce lists to decide what to do next, calling each operation as a tool while it works. Wire it into a coding agent in NoClick and it can triage bounces, update unsubscribe lists, and keep templates current on its own.

Loading preview…
Opens a workflow with 28 tools ready to use.

Tools OpenCode gets

Pick the operations you want and each becomes a tool the agent can call directly while it works.

Mailgun

28 tools
Send Message

Send an email message through a sending domain.

Send MIME Message

Send a pre-built raw MIME (RFC 2822) message.

Get Stored Message

Retrieve a stored / inbound message by its storage key.

List Events

Query message events (accepted, delivered, opened, failed, ...).

Query Logs

Query the newer Logs/analytics API for message activity.

Get Metrics

Retrieve aggregated sending analytics (Metrics API).

List Domains

List sending domains.

Create Domain

Add a new sending domain.

Get Domain

Get details and DNS records for a domain.

Verify Domain

Trigger / check DNS verification for a domain.

Delete Domain

Remove a sending domain.

List Mailing Lists

List all mailing lists.

Create Mailing List

Create a new mailing list.

List Members

List members of a mailing list.

Add Member

Add a single member to a mailing list.

Bulk Add Members

Add up to 1000 members to a mailing list in one call.

Delete Member

Remove a member from a mailing list.

List Templates

List stored account-level templates.

Create Template

Store a new reusable email template.

Get Template

Retrieve a template and its versions.

Create Template Version

Add a new version to an existing template.

List Routes

List inbound-email routing rules.

Create Route

Create an inbound route (match expression -> action).

Delete Route

Delete an inbound route.

List Webhooks

List configured event webhooks for a domain.

List Bounces

List suppressed bounce addresses.

Add Unsubscribe

Add an unsubscribe record to the suppression list.

Validate Email Address

Validate a single email address (deliverability, risk, role flags).

What you can build

When an email hard bounces, add the address to your unsubscribe list and remove that member from the relevant mailing list automatically.
On every inbound email caught by a route, fetch the stored message and hand it to an AI step that classifies it or drafts a reply.
When a new signup arrives from a form, add the address as a member to the right mailing list without a manual import.
Pull Mailgun metrics and event data on a schedule and post a daily deliverability summary to your team channel.
Bulk add a freshly imported list of contacts as members, then check the bounce list to prune bad addresses before the next send.
When an email is opened or clicked, log the engagement to your CRM and trigger a follow-up sequence.

About OpenCode

OpenCode is an open, model-agnostic command-line coding agent. In NoClick it runs hosted and gains your apps as tools, so it can act on real systems rather than just edit files. Wire an integration into the agent and OpenCode can use that app’s operations directly while it works. It is a flexible choice when you want an open agent with broad model support and real tool access.

Open and model-agnostic
Flexible across many underlying models
Good general-purpose tool use
Lightweight to point at a focused task

Frequently asked questions

Open your OpenCode agent in one click

NoClick runs OpenCode for you with Mailgun wired in as tools. Connect your account and run.