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

How to Use the Beehiiv MCP in Mastra AI

Build resilient Beehiiv automations with Mastra AI. Create multi-step workflows that handle failures, retries, and conditional logic for you.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

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

Connect Beehiiv MCP to Mastra AI

Create your Vinkius account to connect Beehiiv 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 Subscriber Workflows

Use the `create_subscription` tool inside a Mastra AI workflow to build a bulletproof signup process. If the initial attempt to add a subscriber to Beehiiv fails, Mastra's engine can automatically retry with exponential backoff. You won't lose signups from temporary network blips. You can also build conditional logic. For instance, use `get_subscription` to check if a user is already subscribed. If they are, your agent can trigger a different part of your workflow; if not, it calls `create_subscription`. This lets you handle complex logic without a lot of boilerplate code.

Build Multi-Step Beehiiv Agents with Mastra AI

Mastra AI is designed for running sequential tasks. You can create a workflow that first calls `list_posts`, then iterates through each post ID to call `get_post_stats`. This gives you a simple way to pull analytics for all your content in one automated job. Add human-in-the-loop approvals for critical steps. For example, your agent could use `get_publication` to check settings, propose a change, and then use Mastra's `requireToolApproval` to wait for your sign-off before making an update. It’s automation with a safety net.

Sync Beehiiv Data to Your Systems

Set up a recurring workflow in Mastra AI to pull data from Beehiiv. You could have an agent that runs daily, calls `list_subscriptions`, and syncs the new subscriber list to your internal CRM or data warehouse. Mastra handles the scheduling and execution. This is also great for reporting. Create an agent that calls `get_post_stats` for your latest newsletter, formats the data, and then uses another tool to send a summary to a Slack channel. This MCP server provides the data access; Mastra provides the reliable engine.

Setup guide

Set up Beehiiv 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 Beehiiv 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: "beehiiv-mcp-client",
  servers: {
    "beehiiv-mcp": {
      url: new URL(
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
      ),
    },
  },
});

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

const result = await agent.generate(
  "List recent Beehiiv 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 Beehiiv. 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 Beehiiv MCP in Mastra AI

Mastra AI has a built-in workflow engine with automatic retries. If a call to a Beehiiv tool like `create_subscription` fails due to a temporary issue, Mastra can retry it for you, making your automation much more reliable.
Yes. You can create a Mastra AI agent that first calls `list_posts` to get all post IDs, then loops through them calling `get_post_stats` for each one. It's a classic multi-step workflow that Mastra is designed to handle.
Reliability. Mastra AI provides a full workflow engine, so you don't have to write custom code for retries, conditional logic, or error handling when using the Beehiiv tools. You just define the steps, and Mastra's engine runs them.
No, Mastra AI handles that for you. It automatically detects the best available transport, like SSE or Streamable HTTP, when connecting to the MCP Server.
The server only touches the Beehiiv data your agent requests, such as publication metadata, subscriber email addresses, and post analytics. Your Vinkius token authenticates every request, and the server itself is ephemeral, processing data in a zero-trust sandbox without storing it.

Start using the Beehiiv 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 Beehiiv. 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.