PubNub (Real-time Messaging) MCP Server for Vercel AI SDKGive Vercel AI SDK instant access to 31 tools to Admin Create App, Admin Get Metrics, Admin List Apps, and more
The Vercel AI SDK is the TypeScript toolkit for building AI-powered applications. Connect PubNub (Real-time Messaging) through Vinkius and every tool is available as a typed function. ready for React Server Components, API routes, or any Node.js backend.
Ask AI about this MCP Server for Vercel AI SDK
The PubNub (Real-time Messaging) MCP Server for Vercel AI SDK is a standout in the Communication Messaging category — giving your AI agent 31 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import { createMCPClient } from "@ai-sdk/mcp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
async function main() {
const mcpClient = await createMCPClient({
transport: {
type: "http",
// Your Vinkius token. get it at cloud.vinkius.com
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
});
try {
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "Using PubNub (Real-time Messaging), list all available capabilities.",
});
console.log(text);
} finally {
await mcpClient.close();
}
}
main();
* 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
About 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.
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.
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).
The PubNub (Real-time Messaging) MCP Server exposes 31 tools through the Vinkius. Connect it to Vercel AI SDK in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 31 PubNub (Real-time Messaging) tools available for Vercel AI SDK
When Vercel AI SDK connects to PubNub (Real-time Messaging) through Vinkius, your AI agent gets direct access to every tool listed below — spanning real-time-sync, pub-sub, data-streams, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Admin create app on PubNub (Real-time Messaging)
Create a new PubNub app (Admin API)
Admin get metrics on PubNub (Real-time Messaging)
Get usage metrics (Admin API)
Admin list apps on PubNub (Real-time Messaging)
List all PubNub apps (Admin API)
Admin list keysets on PubNub (Real-time Messaging)
List all keysets (Admin API)
Delete file on PubNub (Real-time Messaging)
Delete a file from a channel
Delete message history on PubNub (Real-time Messaging)
Delete message history for channels
Generate file upload url on PubNub (Real-time Messaging)
Generate a file upload URL
Get all channels on PubNub (Real-time Messaging)
Get all channels (App Context)
Get all users on PubNub (Real-time Messaging)
Get all users (App Context)
Get channel on PubNub (Real-time Messaging)
Get a specific channel (App Context)
Get file url on PubNub (Real-time Messaging)
Get a file URL
Get memberships on PubNub (Real-time Messaging)
Get memberships for a user (App Context)
Get message count on PubNub (Real-time Messaging)
Get message count for channels
Get message history on PubNub (Real-time Messaging)
Get message history for channels
Get user on PubNub (Real-time Messaging)
Get a specific user (App Context)
List files on PubNub (Real-time Messaging)
List files in a channel
Pam grant token on PubNub (Real-time Messaging)
Grant a PAM v3 token
Pam revoke token on PubNub (Real-time Messaging)
Revoke a PAM v3 token
Presence get state on PubNub (Real-time Messaging)
Get presence state for a user in a channel
Presence heartbeat on PubNub (Real-time Messaging)
Send presence heartbeat
Presence here now on PubNub (Real-time Messaging)
Get current channel occupancy (Here Now)
Presence leave on PubNub (Real-time Messaging)
Leave a channel (Presence)
Presence set state on PubNub (Real-time Messaging)
Set presence state for a user in a channel
Presence where now on PubNub (Real-time Messaging)
Get channels a user is in (Where Now)
Publish message on PubNub (Real-time Messaging)
Publish a message to a channel
Push manage on PubNub (Real-time Messaging)
Manage or list push notification channels for a device (APNS v2)
Push remove all on PubNub (Real-time Messaging)
Remove all push notification channels for a device (APNS v2)
Remove user on PubNub (Real-time Messaging)
Remove a user (App Context)
Set channel on PubNub (Real-time Messaging)
Set or update a channel (App Context)
Set memberships on PubNub (Real-time Messaging)
Set or update memberships for a user (App Context)
Set user on PubNub (Real-time Messaging)
Set or update a user (App Context)
Connect PubNub (Real-time Messaging) to Vercel AI SDK via MCP
Follow these steps to wire PubNub (Real-time Messaging) into Vercel AI SDK. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
npm install @ai-sdk/mcp ai @ai-sdk/openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the script
agent.ts and run with npx tsx agent.tsExplore tools
Why Use Vercel AI SDK with the PubNub (Real-time Messaging) MCP Server
Vercel AI SDK provides unique advantages when paired with PubNub (Real-time Messaging) through the Model Context Protocol.
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) + Vercel AI SDK Use Cases
Practical scenarios where Vercel AI SDK combined with the PubNub (Real-time Messaging) MCP Server delivers measurable value.
AI-powered web apps: build dashboards that query PubNub (Real-time Messaging) in real-time and stream results to the UI with zero loading states
API backends: create serverless endpoints that orchestrate PubNub (Real-time Messaging) tools and return structured JSON responses to any frontend
Chatbots with tool use: embed PubNub (Real-time Messaging) capabilities into conversational interfaces with streaming responses and tool call visibility
Internal tools: build admin panels where team members interact with PubNub (Real-time Messaging) through natural language queries
Example Prompts for PubNub (Real-time Messaging) in Vercel AI SDK
Ready-to-use prompts you can give your Vercel AI SDK agent to start working with PubNub (Real-time Messaging) immediately.
"Publish a message to the 'alerts' channel saying 'System update scheduled for midnight'."
"Get the last 5 messages from the 'support-chat' channel."
"Who is currently active in the 'lobby' channel?"
Troubleshooting PubNub (Real-time Messaging) MCP Server with Vercel AI SDK
Common issues when connecting PubNub (Real-time Messaging) to Vercel AI SDK through Vinkius, and how to resolve them.
createMCPClient is not a function
npm install @ai-sdk/mcpPubNub (Real-time Messaging) + Vercel AI SDK FAQ
Common questions about integrating PubNub (Real-time Messaging) MCP Server with Vercel AI SDK.
How does the Vercel AI SDK connect to MCP servers?
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?
Does it support streaming tool results?
useChat and streamText that handle tool calls and display results progressively in the UI.Explore More MCP Servers
View all →
Webflow
8 toolsDesign and build professional websites visually with a no-code platform that generates clean, production-ready HTML and CSS.

OpenFGA (Fine-Grained Auth)
16 toolsManage fine-grained authorization with OpenFGA — create stores, define authorization models, and manage relationship tuples directly from your AI agent.

Lattice
9 toolsRetrieve HR employees, goals, feedback, and reviews directly from Lattice.

Edamam Alternative
6 toolsManage food and nutrition — audit recipes and ingredients via AI.
