4,500+ servers built on MCP Fusion
Vinkius
Courier logo
Vinkius
Mastra AI logo

How to Use the Courier MCP in Mastra AI

Build failure-proof notification workflows with Mastra AI. Let your agents send, check, and retry Courier messages automatically through this managed MCP.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Courier MCP on Cursor AI Code Editor MCP Client Courier MCP on Claude Desktop App MCP Integration Courier MCP on OpenAI Agents SDK MCP Compatible Courier MCP on Visual Studio Code MCP Extension Client Courier MCP on GitHub Copilot AI Agent MCP Integration Courier MCP on Google Gemini AI MCP Integration Courier MCP on Lovable AI Development MCP Client Courier MCP on Mistral AI Agents MCP Compatible Courier MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
Mastra AI

Connect Courier MCP to Mastra AI

Create your Vinkius account to connect Courier to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Automate Your Notification Sequences

Mastra AI's workflow engine can now run your Courier account. Build a sequence that's actually reliable: `send_notification`, wait for a set period, then automatically call `get_message_history` to confirm it was delivered. Here's the key: if a message fails, Mastra's built-in retry logic kicks in. Your workflow can automatically attempt a resend or, based on provider logs, decide to try a different channel. This MCP Server makes your notifications dependable, not just best-effort.

Branch Workflows on User Engagement

Your Mastra AI agent can finally see if your messages are landing. It uses the `list_messages` tool to find a specific message and check its status for opens or clicks. This is where your automations get smart. Build conditional logic in your workflow. If a user clicked the link, your agent can add them to a new audience. If they didn't open the email in 48 hours, the agent can trigger a follow-up SMS. It's closed-loop communication.

Manage Courier Assets with Mastra AI

This connection isn't just about sending messages. Your Mastra AI agent can perform maintenance on your Courier setup. It can pull your brand settings with `list_brands` or get a full inventory of subscription lists with `list_subscription_lists`. Use this for automated housekeeping. Build an agent that periodically checks for old, unused templates via `list_templates` and flags them for cleanup. This is how you turn a simple MCP connection into an automated admin.

Setup guide

Set up Courier MCP in Mastra AI

Prerequisites

  • Node.js 18+ and a TypeScript project
  • @mastra/mcp + @mastra/core packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install @mastra/mcp @mastra/core plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Configure the MCPClient

    Create an MCPClient with your Vinkius endpoint as a URL object. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and inject tools

    Call mcpClient.listTools() and spread the result into your agent's tools object. All Courier tools become native Mastra tools.

  4. 4

    Run with any model

    Swap openai("gpt-4o") for any AI SDK-compatible provider. Call agent.generate() and the agent routes tool calls through MCP automatically.

agent.ts
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";

const mcpClient = new MCPClient({
  id: "courier-mcp-client",
  servers: {
    "courier-mcp": {
      url: new URL(
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
      ),
    },
  },
});

const agent = new Agent({
  name: "Courier Agent",
  model: openai("gpt-4o"),
  instructions: "You have access to Courier tools.",
  tools: {
    ...(await mcpClient.listTools()),
  },
});

const result = await agent.generate(
  "List recent Courier transactions"
);
console.log(result.text);

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Courier. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about Courier MCP in Mastra AI

In your Mastra AI workflow, call `send_notification`. Follow that with a conditional step that uses `get_message_history` to check the status. If it failed, Mastra's native retry and exponential backoff features can trigger the send again automatically.
Yes, the agent can use the `list_subscription_lists` tool to get IDs and subscriber counts. It's perfect for building automated reporting or list-auditing workflows that run on a schedule.
Absolutely. Configure `requireToolApproval` in Mastra AI for the `send_notification` tool. Your automated workflow will prepare the message and then pause for a manual confirmation before anything actually goes out.
Your agent can call the `list_users` tool. It will return the user IDs and roles for everyone registered in your Courier workspace, which is useful for admin tasks.
It only touches data within your Courier account, like message history, user profiles, and audience lists. Each call from your Mastra AI agent is an isolated, ephemeral transaction inside the Vinkius sandbox. Your Courier API keys are never exposed to the agent code.

Start using the Courier MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 10 tools

We've already built the connector for Courier. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 10 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.