Bring Real Time Sync
to Vercel AI SDK
Learn how to connect PubNub (Real-time Messaging) to Vercel AI SDK and start using 31 AI agent tools in minutes. Fully managed, enterprise secure, and ready to use without writing a single line of code.
Compatible with every major AI agent and IDE
What is the PubNub (Real-time Messaging) MCP Server?
Connect your PubNub account to any AI agent to orchestrate real-time communication, monitor user presence, and manage data streams through natural language.
What you can do
- Real-time Messaging — Publish JSON payloads to any channel and retrieve historical message logs with precise timetokens.
- Presence Monitoring — Track who is online (
here_now), see which channels a user is in (where_now), and manage custom presence states. - User & Channel Metadata — Manage App Context by creating and retrieving user profiles, channel metadata, and memberships.
- Message Management — Count messages sent after specific timestamps or purge history for compliance and storage management.
- File Sharing — Generate upload URLs and manage files stored within the PubNub network.
- Admin & Push — Monitor keyset metrics, manage applications, and configure mobile push notifications (APNS/FCM).
How it works
- Subscribe to this server
- Enter your PubNub Subscribe Key, Publish Key, and UUID
- Start streaming data and managing real-time interactions from your MCP-compatible client
Who is this for?
- IoT Developers — Monitor device heartbeats and send control commands via real-time channels.
- Support Teams — Inspect chat history and user presence to provide better live assistance.
- System Architects — Audit channel metadata and monitor keyset metrics directly from the AI interface.
Built-in capabilities (31)
Create a new PubNub app (Admin API)
Get usage metrics (Admin API)
List all PubNub apps (Admin API)
List all keysets (Admin API)
Delete a file from a channel
Delete message history for channels
Generate a file upload URL
Get all channels (App Context)
Get all users (App Context)
Get a specific channel (App Context)
Get a file URL
Get memberships for a user (App Context)
Get message count for channels
Get message history for channels
Get a specific user (App Context)
List files in a channel
Grant a PAM v3 token
Revoke a PAM v3 token
Get presence state for a user in a channel
Send presence heartbeat
Get current channel occupancy (Here Now)
Leave a channel (Presence)
Set presence state for a user in a channel
Get channels a user is in (Where Now)
Publish a message to a channel
Manage or list push notification channels for a device (APNS v2)
Remove all push notification channels for a device (APNS v2)
Remove a user (App Context)
Set or update a channel (App Context)
Set or update memberships for a user (App Context)
Set or update a user (App Context)
Why Vercel AI SDK?
The Vercel AI SDK gives every PubNub (Real-time Messaging) tool full TypeScript type inference, IDE autocomplete, and compile-time error checking. Connect 31 tools through Vinkius and stream results progressively to React, Svelte, or Vue components. works on Edge Functions, Cloudflare Workers, and any Node.js runtime.
- —
TypeScript-first: every MCP tool gets full type inference, IDE autocomplete, and compile-time error checking out of the box
- —
Framework-agnostic core works with Next.js, Nuxt, SvelteKit, or any Node.js runtime. same PubNub (Real-time Messaging) integration everywhere
- —
Built-in streaming UI primitives let you display PubNub (Real-time Messaging) tool results progressively in React, Svelte, or Vue components
- —
Edge-compatible: the AI SDK runs on Vercel Edge Functions, Cloudflare Workers, and other edge runtimes for minimal latency
PubNub (Real-time Messaging) in Vercel AI SDK
PubNub (Real-time Messaging) and 4,000+ other MCP servers. One platform. One governance layer.
Teams that connect PubNub (Real-time Messaging) to Vercel AI SDK through Vinkius don't need to source, host, or maintain individual MCP servers. Every tool call runs inside a hardened runtime with credential isolation, DLP, and a signed audit chain.
Raw MCP | Vinkius | |
|---|---|---|
| Server catalog | Find and host yourself | 4,000+ managed |
| Infrastructure | Self-hosted | Sandboxed V8 isolates |
| Credential handling | Plaintext in config | Vault + runtime injection |
| Data loss prevention | None | Configurable DLP policies |
| Kill switch | None | Global instant shutdown |
| Financial circuit breakers | None | Per-server limits + alerts |
| Audit trail | None | Ed25519 signed logs |
| SIEM log streaming | None | Splunk, Datadog, Webhook |
| Honeytokens | None | Canary alerts on leak |
| Custom domains | Not applicable | DNS challenge verified |
| GDPR compliance | Manual effort | Automated purge + export |
Why teams choose Vinkius for PubNub (Real-time Messaging) in Vercel AI SDK
The PubNub (Real-time Messaging) MCP Server runs on Vinkius-managed infrastructure inside AWS — a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts. All 31 tools execute in hardened sandboxes optimized for native MCP execution.
Your AI agents in Vercel AI SDK only access the data you authorize, with DLP that blocks sensitive information from ever reaching the model, kill switch for instant shutdown, and up to 60% token savings. Enterprise-grade infrastructure, zero maintenance.

* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
How Vinkius secures
PubNub (Real-time Messaging) for Vercel AI SDK
Every tool call from Vercel AI SDK to the PubNub (Real-time Messaging) MCP Server is protected by DLP redaction, cryptographic audit chains, V8 sandbox isolation, kill switch, and financial circuit breakers.
Frequently asked questions
How can I check if a specific user is currently online in a channel?
You can use the presence_here_now tool to see a list of all active UUIDs in a specific channel, or presence_where_now to find all channels a specific UUID is currently subscribed to.
Can the AI retrieve past messages from a channel?
Yes, the get_message_history tool allows the agent to fetch historical messages from one or more channels, including metadata and specific time ranges.
Is it possible to manage user profiles and metadata through this server?
Absolutely. You can use set_user to create or update profiles and get_user to retrieve them. You can also manage channel metadata using set_channel and get_channel.
How does the Vercel AI SDK connect to MCP servers?
Import createMCPClient from @ai-sdk/mcp and pass the server URL. The SDK discovers all tools and provides typed TypeScript interfaces for each one.
Can I use MCP tools in Edge Functions?
Yes. The AI SDK is fully edge-compatible. MCP connections work on Vercel Edge Functions, Cloudflare Workers, and similar runtimes.
Does it support streaming tool results?
Yes. The SDK provides streaming primitives like useChat and streamText that handle tool calls and display results progressively in the UI.
createMCPClient is not a function
Install: npm install @ai-sdk/mcp
Explore More MCP Servers
View all →
DataCite REST
12 toolsManage and query DOIs (Digital Object Identifiers) via DataCite — retrieve metadata, list activities, and manage research records directly from your AI agent.

ZenHub
8 toolsManage agile boards, epics, and estimates via the ZenHub API.

Date Utils Engine
4 toolsStop AI from hallucinating dates, missing leap years, or failing timezone conversions. Offloads all calendar math to the deterministic date-fns engine.

ClickFunnels
8 toolsManage sales funnels and contacts via ClickFunnels 2.0 — track performance, monitor leads, and manage orders directly from any AI agent.
