communication
Courier MCP Integration for Vercel AI SDK
Connect Courier to Vercel AI SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Courier 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.
Courier MCP Config for Vercel AI SDK
Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.
{
"mcpServers": {
"kosmokrator-courier": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=courier",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=courier --write=deny Why Use KosmoKrator Here
Expose only Courier 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.
Courier Tools Visible to Vercel AI SDK
Vercel AI SDK sees stable MCP tool names generated from the Courier integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__courier__courier_send_message | courier.courier_send_message | Write | Send a notification message through Courier. Provide a message payload with content or template, and a recipient (user ID, email, or recipient object). Supports all Courier send options including channels, routing, and preferences. |
integration__courier__courier_list_messages | courier.courier_list_messages | Read | List messages from Courier with optional filtering by status and cursor-based pagination. Returns message IDs, statuses, and metadata. |
integration__courier__courier_get_message | courier.courier_get_message | Read | Get detailed information about a specific Courier message, including delivery status, content, and channel details. |
integration__courier__courier_list_recipients | courier.courier_list_recipients | Read | List notification recipients from Courier with cursor-based pagination. Returns recipient IDs, contact details, and preferences. |
integration__courier__courier_get_recipient | courier.courier_get_recipient | Read | Get detailed information about a specific Courier recipient, including contact preferences and channel profiles. |
integration__courier__courier_list_templates | courier.courier_list_templates | Read | List notification templates from Courier with cursor-based pagination. Returns template IDs, names, and metadata. |
integration__courier__courier_get_current_user | courier.courier_get_current_user | Read | Get the currently authenticated Courier user profile. Use this to verify the API key and see account information. |