Skip to directory

PubNub MCP

PubNub

Streamable HTTP (hosted); stdio (local)17 documented tools5

About PubNub MCP

PubNub's official MCP is available as a hosted OAuth server or a local npm/Docker server. It exposes documentation, PubNub account/keyset management, real-time messaging, presence, App Context, Insights, Illuminate, and Functions operations.

What you can use it for

  • Get current PubNub SDK documentation and migration guidance
  • Manage apps and keysets
  • Publish/subscribe and inspect messages or presence
  • Manage App Context, Illuminate, and Functions
  • Query Insights analytics when entitled
Connection and setup
Hosting
Both: remote hosted and local
Transport
Streamable HTTP (hosted); stdio (local)
Endpoint
https://mcp.pubnub.com
Authentication
Hosted: OAuth, sign in and authorize an organization. Local: PUBNUB_API_KEY service-integration key; optional PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY for fixed-key mode. Tool access follows key/user permissions.

Requirements

  • PubNub account for account-management and real-time operations
  • Hosted client supporting remote MCP/OAuth, or Node/npm or Docker for local
  • Feature entitlements and key permissions for some operations; Insights requires Insights Premium

Setup steps

  1. Prefer hosted endpoint https://mcp.pubnub.com in clients supporting remote MCP; complete OAuth and select/authorize the organization.
  2. For local stdio, configure npx -y @pubnub/mcp@latest and set PUBNUB_API_KEY in client secret environment.
  3. Optionally set PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY for fixed-key real-time operations; otherwise the tools can request keys per call.
  4. Scope Service Integration permissions to the required operations. Avoid committing secrets in client config.
  5. Reload and verify with a documentation lookup or read-only project query before using account writes, sends, deployments, or configuration changes.
Tools 17

17 exact tools documented. Two read-only documentation resources and prompt templates are separate MCP capabilities, not tools. Account permissions, keyset features and subscription tier can gate operations.

  • get_sdk_documentation

    Retrieve current PubNub SDK documentation for a language and feature.

    01
  • get_chat_sdk_documentation

    Retrieve PubNub Chat SDK documentation for a supported language.

    02
  • how_to

    Retrieve a conceptual PubNub guide for a feature or use case.

    03
  • write_pubnub_app

    Return architecture and implementation best practices for PubNub applications.

    04
  • get_sdk_migration_guide

    Retrieve migration guidance for a major version of one SDK.

    05
  • get_general_migration_guide

    Retrieve a platform-wide PubNub migration guide.

    06
  • manage_apps

    List, create or rename PubNub applications.

    07
  • manage_keysets

    Read or manage keysets and messaging feature configuration.

    08
  • get_usage_metrics

    Read PubNub usage metrics for an account, app or keyset over a date range.

    09
  • send_pubnub_message

    Publish a message or signal to a PubNub channel.

    10
  • subscribe_and_receive_pubnub_messages

    Subscribe to a channel and receive messages for a bounded wait period.

    11
  • get_pubnub_messages

    Read persisted PubNub messages, optionally filtered by timetoken.

    12
  • get_pubnub_presence

    Read channel occupancy or a user’s channel subscriptions.

    13
  • manage_app_context

    Read, set or remove App Context users, channels and memberships.

    14
  • manage_illuminate

    Create, query and manage Illuminate Business Objects, metrics, Decisions and Dashboards.

    15
  • insights

    Run read-only PubNub Insights analytics queries.

    16
  • manage_functions

    Manage PubNub Functions packages, deployments, KV data, secrets, scheduled events and catalog blueprints.

    17
Limitations and notes
  • Admin/account tools inherit the signed-in user's hosted permissions or local Service Integration key scopes.
  • Real-time operations may publish messages, subscribe to private channels, or alter App Context; review writes.
  • Illuminate and Functions have write/destructive operations; deletes require confirmation and deployment state constraints apply.
  • Insights API requires Insights Premium; local key also needs Insights Read permission.
  • User/channel membership management requires Manage Premium per docs.
  • Both hosting modes expose same tools; credentials and setup differ.
Original sources
  • official documentation

    The current PubNub reference confirms all 17 stored tools across six groups, plus two separate read-only documentation resources and prompt templates. Hosted tools use OAuth; local tools use a scoped Service Integration key. Realtime tools need publish/subscribe keys, and Insights needs a paid Insights Premium account.

  • official tool reference

    The current PubNub reference confirms all 17 stored tools across six groups, plus two separate read-only documentation resources and prompt templates. Hosted tools use OAuth; local tools use a scoped Service Integration key. Realtime tools need publish/subscribe keys, and Insights needs a paid Insights Premium account.

Documentation checked 2026-10-28T13:26:33Z. Connection has not been runtime tested.