MCP ServerSTDIOOfficialv2.3.2

PubNub MCP Server

Manage PubNub messaging infrastructure and real-time operations directly from Claude or Cursor. Developers can publish messages, subscribe to channels, and administer keysets using API credentials.

io.github.pubnub/mcp-server

Hosted URL

Local install

Transport

STDIO

Auth

No auth required

What the PubNub MCP server does

How models use it and what it is built for.

Manage PubNub messaging infrastructure and real-time operations directly from Claude or Cursor. Developers can publish messages, subscribe to channels, and administer keysets using API credentials.

Connect to PubNub

Local install — runs as a subprocess.

npx @pubnub/mcp@2.3.2

Environment variables

Configuration this server reads at startup.

  • PUBNUB_API_KEYSecret

    Your PubNub API Key. Required for all operations related to your account/keyset

  • PUBNUB_PUBLISH_KEYSecret

    Optional PubNub publish key for real-time operations

  • PUBNUB_SUBSCRIBE_KEYSecret

    Optional PubNub subscribe key for real-time operations

  • PUBNUB_USER_ID

    Optional variable that can be provided to change the User ID for the SDK (real-time) operations (default: pubnub-mcp)

  • PUBNUB_EMAIL

    (Deprecated - use API Key instead) Your PubNub account email. Required for all operations related to your account/keyset

  • PUBNUB_PASSWORDSecret

    (Deprecated - use API Key instead) Your PubNub account password. Required for all operations related to your account/keyset

Resources

Where to find authoritative docs and source for PubNub.

Example prompts for PubNub

Paste any of these into Agent Studio after connecting PubNub.

  • Publish a test message to the orders channel using my PubNub keyset
  • Subscribe to real-time updates on the notifications channel with my user ID
  • List all active channels and their current subscriber counts
  • Show me how to configure PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY for this MCP server

PubNub MCP server — FAQ

Common questions about connecting and running PubNub.

  • What credentials do I need to set up the PubNub MCP server?

    You need a PUBNUB_API_KEY at minimum for account operations. For real-time messaging, also provide PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY. Optionally set PUBNUB_USER_ID to customize the SDK user identity.

  • Can I use email and password instead of API keys?

    Email and password authentication (PUBNUB_EMAIL and PUBNUB_PASSWORD) are deprecated. Use PUBNUB_API_KEY instead for all new setups and integrations.

  • How do I install the PubNub MCP server?

    Run `npx @pubnub/mcp@2.3.2` to install. The server communicates via stdio and integrates with Cursor and Claude.

  • What real-time operations does this MCP server support?

    With PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY configured, you can publish messages to channels and subscribe to real-time updates. The PUBNUB_USER_ID variable lets you set a custom identity for these operations.

  • Do I need all three keys (API, publish, subscribe) to use this server?

    No. PUBNUB_API_KEY is required for account-level operations. PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY are optional and only needed if you plan to use real-time messaging features.

Skip the local setup — run MCP in your browser

MCP Playground runs 10,000+ hosted MCP servers — GitHub, Linear, Notion, Stripe, Sentry and more — across Claude, GPT, Gemini, DeepSeek and 60+ AI models. Compare model answers side-by-side, save agent presets, share runs. Zero install.

Open Agent Studio

Related servers

More on MCP Playground