PubNub integration
Realtime messaging, presence, and stream platform. Build chat, IoT telemetry, multiplayer games, live dashboards, and collaborative apps with global edge delivery. Supports pub/sub messaging, signals, message persistence (history), presence (here_now / where_now / state), channel groups, files (publish/list/delete), App Context (users, channels, memberships), mobile push notifications (APNS/FCM), and PAM v3 access tokens. Authentication uses three keys from the Admin Portal: publish_key (publishing), subscribe_key (subscribe / read endpoints), and an optional secret_key for admin-level operations such as PAM grants.
Say what should happen.
The workflow builds itself.
Common PubNub use cases
- admin tooling
- moderation
- background notifications
- analytics
- presence audit
- live chat
- chat replay
- file gallery
- per-user auth
- unread badges
What you can do with PubNub
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Channel group, 4 operations
add_channels_to_groupAdd channels to groupGETAdds channels to a channel group.list_channel_groupsList channel groupsGETLists every channel group defined on the keyset.list_channels_in_groupList channels in groupGETLists the channels that belong to a channel group.remove_channels_from_groupRemove channels from groupGETRemoves channels from a channel group, or deletes the group entirely.
Presence, 4 operations
get_stateGet stateGETReads the current presence state for a uuid on one or more channels.here_nowHere nowGETLists subscribers currently present on one or more channels.set_stateSet stateGETAttaches a JSON state object to a uuid on a given channel.where_nowWhere nowGETLists the channels a uuid is currently subscribed to.
History, 3 operations
delete_messagesDelete messagesDELETEDeletes a range of persisted messages from a channel.fetch_historyFetch historyGETFetches persisted message history from one or more PubNub channels.message_countsMessage countsGETCounts persisted messages per channel since a given timetoken.
File, 2 operations
delete_fileDelete fileDELETEPermanently deletes a file from a channel.list_filesList filesGETLists files uploaded to a channel.
Push device, 2 operations
register_push_deviceRegister push deviceGETRegisters an iOS device's push token with channel subscriptions for APNS2 delivery.register_push_device_fcmRegister push device fcmGETRegisters an Android device's push token with channel subscriptions for FCM/GCM delivery.
User, 2 operations
list_usersList usersGETLists App Context users (UUID metadata) on the keyset.set_userSet userPATCHCreates or updates App Context metadata for a user (uuid).
Access token, 1 operation
grant_tokenGrant tokenPOSTMints a PAM v3 access token with scoped, time-limited permissions.
File message, 1 operation
publish_file_messagePublish file messageGETPublishes a message that references a previously uploaded file.
Membership, 1 operation
set_membershipSet membershipPATCHAdds or removes channel memberships for a user in App Context.
Message, 1 operation
publish_messagePublish messageGETPublishes a message to a PubNub channel for realtime fan-out to all subscribers.
Signal, 1 operation
send_signalSend signalGETSends a small ephemeral signal (≤64 bytes) to all subscribers of a channel.
Use PubNub from Claude Code, Cursor or Codex
Connect PubNub in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its PubNub operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect PubNub
- Create your workspace
Sign up free. Nothing to install.
- Connect PubNub once
Add your PubNub connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
PubNub integration FAQ
What can you do with the PubNub integration?
LiveContext exposes 22 operations on PubNub, covering channel group, presence, history and file. Common uses include admin tooling, moderation and background notifications.
