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.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
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 groupGETAgents: ask firstAdds channels to a channel group.list_channel_groupsList channel groupsGETAgents: ask firstLists every channel group defined on the keyset.list_channels_in_groupList channels in groupGETAgents: ask firstLists the channels that belong to a channel group.remove_channels_from_groupRemove channels from groupGETAgents: ask firstRemoves channels from a channel group, or deletes the group entirely.
Presence, 4 operations
get_stateGet stateGETAgents: ask firstReads the current presence state for a uuid on one or more channels.here_nowHere nowGETAgents: ask firstLists subscribers currently present on one or more channels.set_stateSet stateGETAgents: ask firstAttaches a JSON state object to a uuid on a given channel.where_nowWhere nowGETAgents: ask firstLists the channels a uuid is currently subscribed to.
History, 3 operations
delete_messagesDelete messagesDELETEAgents: ask firstDeletes a range of persisted messages from a channel.fetch_historyFetch historyGETAgents: ask firstFetches persisted message history from one or more PubNub channels.message_countsMessage countsGETAgents: ask firstCounts persisted messages per channel since a given timetoken.
File, 2 operations
delete_fileDelete fileDELETEAgents: ask firstPermanently deletes a file from a channel.list_filesList filesGETAgents: ask firstLists files uploaded to a channel.
Push device, 2 operations
register_push_deviceRegister push deviceGETAgents: ask firstRegisters an iOS device's push token with channel subscriptions for APNS2 delivery.register_push_device_fcmRegister push device fcmGETAgents: ask firstRegisters an Android device's push token with channel subscriptions for FCM/GCM delivery.
User, 2 operations
list_usersList usersGETAgents: ask firstLists App Context users (UUID metadata) on the keyset.set_userSet userPATCHAgents: ask firstCreates or updates App Context metadata for a user (uuid).
Access token, 1 operation
grant_tokenGrant tokenPOSTAgents: ask firstMints a PAM v3 access token with scoped, time-limited permissions.
File message, 1 operation
publish_file_messagePublish file messageGETAgents: ask firstPublishes a message that references a previously uploaded file.
Membership, 1 operation
set_membershipSet membershipPATCHAgents: ask firstAdds or removes channel memberships for a user in App Context.
Message, 1 operation
publish_messagePublish messageGETAgents: ask firstPublishes a message to a PubNub channel for realtime fan-out to all subscribers.
Signal, 1 operation
send_signalSend signalGETAgents: ask firstSends 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.
