Skip to main content
MCP server CX Codex

PubNub MCP Server — Claude Code MCP server: features and setup

Gives AI agents access to PubNub SDK documentation and API tools for managing apps, messages, channels, and user presence.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env PUBNUB_API_KEY=<PUBNUB_API_KEY> --env PUBNUB_PUBLISH_KEY=<PUBNUB_PUBLISH_KEY> --env PUBNUB_SUBSCRIBE_KEY=<PUBNUB_SUBSCRIBE_KEY> --env PUBNUB_USER_ID=<PUBNUB_USER_ID> --env PUBNUB_EMAIL=<PUBNUB_EMAIL> --transport stdio pubnub-mcp-server -- npx -y @pubnub/mcp
Open on GitHub

What PubNub MCP Server does

The server connects an agent to PubNub documentation and API resources. It can help manage applications and keysets, send messages, work with user profiles and channel membership, and inspect presence. Usage data and analytics are also available. Real-time decisioning needs Illuminate; full analytics require Manage Premium.

For Claude Code, the local server runs through npx -y @pubnub/mcp. Its setup command passes API, publish, and subscribe keys, along with either PUBNUB_PASSWORD or PUBNUB_USER_ID and PUBNUB_EMAIL. The local process needs the supplied environment values to receive those credentials. Codex and Cursor are also listed as supported platforms.

What it helps with

  • look up an SDK implementation example
  • create an app and configure its keyset
  • publish a message to a channel
  • check user presence in a channel
  • review app and keyset usage

Example prompts for the agent

  • Find a PubNub SDK example for subscribing to a channel.
  • Create a PubNub app and configure a keyset for messaging.
  • Show user activity and channel analytics in PubNub.

How to install PubNub MCP Server

Platform CLI

claude mcp add --env PUBNUB_API_KEY=<PUBNUB_API_KEY> --env PUBNUB_PUBLISH_KEY=<PUBNUB_PUBLISH_KEY> --env PUBNUB_SUBSCRIBE_KEY=<PUBNUB_SUBSCRIBE_KEY> --env PUBNUB_USER_ID=<PUBNUB_USER_ID> --env PUBNUB_EMAIL=<PUBNUB_EMAIL> --transport stdio pubnub-mcp-server -- npx -y @pubnub/mcp

Replace <…> with your own values. 1 more environment variable is in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about PubNub MCP Server

How do I install PubNub MCP Server in Claude Code?

Run `claude mcp add mcp-server -e PUBNUB_API_KEY=<PUBNUB_API_KEY> -e PUBNUB_PUBLISH_KEY=<PUBNUB_PUBLISH_KEY> -e PUBNUB_SUBSCRIBE_KEY=<PUBNUB_SUBSCRIBE_KEY> -e PUBNUB_PASSWORD=<PUBNUB_PASSWORD> -- npx -y @pubnub/mcp`. Replace the placeholders with your credentials.

What does PubNub MCP Server do?

It gives an AI agent access to PubNub docs and API resources. The agent can work with apps, messages, channels, user profiles, presence, and usage information.

Which PubNub features have extra requirements?

Real-time decisioning requires Illuminate. Full analytics require Manage Premium.

Similar MCP servers

MCP servers catalog →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor