PubNub (Real-time Messaging)

PubNub (Real-time Messaging) MCP Connector for Claude

A+

Enable real-time messaging, presence tracking, and message history for your AI agent using PubNub's global data stream network.

31 tools Official Updated Oct 1, 2026 Official Vinkius Partner

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

  1. Subscribe to this server
  2. Enter your PubNub Subscribe Key, Publish Key, and UUID
  3. 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.
real-time-syncpub-subdata-streamspresence-trackingmessaginglow-latency

31 tools expose this connector's capabilities to your AI agent.

admin_list_keysets

No parameters are needed. List all keysets (Admin API)

delete_message_history

Delete message history for channels

get_all_channels

Get all channels (App Context)

get_all_users

Get all users (App Context)

get_channel

Provide the channel name as the required argument. Get a specific channel (App Context)

get_memberships

Pass the user’s UUID to fetch the data. Get memberships for a user (App Context)

get_message_history

Get message history for channels

get_message_count

Get message count for channels

pam_grant_token

Grant a PAM v3 token

presence_heartbeat

Use this when a user remains connected to a channel. Send presence heartbeat

presence_leave

Specify the channel name when calling this function. Leave a channel (Presence)

publish_message

Publish a message to a channel

push_manage

Provide a valid device token. Manage or list push notification channels for a device (APNS v2)

set_memberships

Provide the user UUID and the new membership data. Set or update memberships for a user (App Context)

admin_get_metrics

No parameters are needed. Get usage metrics (Admin API)

admin_list_apps

No parameters are needed. List all PubNub apps (Admin API)

admin_create_app

Pass the required app creation payload. Create a new PubNub app (Admin API)

push_remove_all

Pass the device token to execute the removal. Remove all push notification channels for a device (APNS v2)

presence_here_now

Provide the channel name to check occupancy. Get current channel occupancy (Here Now)

delete_file

You must provide the channel, file ID, and file name. Delete a file from a channel

generate_file_upload_url

Specify both the target channel and the desired file name. Generate a file upload URL

get_file_url

Provide the channel, file ID, and file name. Get a file URL

get_user

Must provide a valid user UUID. Get a specific user (App Context)

list_files

Only the channel name is required. List files in a channel

pam_revoke_token

Pass the token string that needs to be invalidated. Revoke a PAM v3 token

presence_get_state

Specify both the channel and the user UUID. Get presence state for a user in a channel

presence_set_state

Provide the channel, user UUID, and desired state object. Set presence state for a user in a channel

presence_where_now

Pass the user’s UUID to query their location. Get channels a user is in (Where Now)

remove_user

Provide the UUID of the user to be deleted. Remove a user (App Context)

set_channel

Supply the channel name and the metadata object. Set or update a channel (App Context)

set_user

Must provide both the user UUID and the data object. Set or update a user (App Context)

See how to talk to your AI agent using PubNub (Real-time Messaging).

Publish a message to the 'alerts' channel saying 'System update scheduled for midnight'.

I've published the message to the 'alerts' channel. The timetoken for this message is 17156348210000000.

Get the last 5 messages from the 'support-chat' channel.

I retrieved the last 5 messages from 'support-chat'. They include inquiries about billing and a technical setup question from user UUID-987.

Who is currently active in the 'lobby' channel?

There are currently 3 users in the 'lobby' channel: 'admin-01', 'user-55', and 'guest-12'.

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.

Related Connectors