newsletter
Beehiiv MCP Integration for Vercel AI SDK
Connect Beehiiv to Vercel AI SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Beehiiv to Vercel AI SDK
Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts.
Create an MCP client that starts or connects to the KosmoKrator gateway for the selected integration. The gateway is local, scoped to this integration, and starts with
--write=deny so Vercel AI SDK can inspect read-capable tools without receiving write access by default.
Beehiiv MCP Config for Vercel AI SDK
Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.
{
"mcpServers": {
"kosmokrator-beehiiv": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=beehiiv",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=beehiiv --write=deny Why Use KosmoKrator Here
Expose only Beehiiv 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.
Beehiiv Tools Visible to Vercel AI SDK
Vercel AI SDK sees stable MCP tool names generated from the Beehiiv integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__beehiiv__beehiiv_list_posts | beehiiv.beehiiv_list_posts | Read | List posts from your Beehiiv publication. Filter by status (draft, confirmed, etc.) and paginate with limit/page. |
integration__beehiiv__beehiiv_get_post | beehiiv.beehiiv_get_post | Read | Get a single post from your Beehiiv publication by its post ID. |
integration__beehiiv__beehiiv_create_post | beehiiv.beehiiv_create_post | Write | Create a new post in your Beehiiv publication. Requires title and content. Set status to "draft" to save without publishing, or "confirmed" to publish. |
integration__beehiiv__beehiiv_update_post | beehiiv.beehiiv_update_post | Write | Update an existing post in your Beehiiv publication. Provide the post ID and the fields you want to change. |
integration__beehiiv__beehiiv_delete_post | beehiiv.beehiiv_delete_post | Write | Delete a post from your Beehiiv publication. This action is irreversible. |
integration__beehiiv__beehiiv_list_subscribers | beehiiv.beehiiv_list_subscribers | Read | List subscribers for your Beehiiv publication. Filter by status (active, inactive, etc.) and paginate with limit/page. |
integration__beehiiv__beehiiv_get_subscriber | beehiiv.beehiiv_get_subscriber | Read | Get a single subscriber from your Beehiiv publication by their subscription ID. |
integration__beehiiv__beehiiv_create_subscriber | beehiiv.beehiiv_create_subscriber | Write | Add a new subscriber to your Beehiiv publication by email address. |
integration__beehiiv__beehiiv_get_stats | beehiiv.beehiiv_get_stats | Read | Get analytics and stats for your Beehiiv publication. Use the "intent" parameter to specify the type of stats (overview, traffic, growth, subscribers). |
integration__beehiiv__beehiiv_get_current_user | beehiiv.beehiiv_get_current_user | Read | Verify your Beehiiv API key and list all publications you have access to. Use this to confirm the integration is working and to find your publication ID. |