PubNub MCP for Real-time messaging. API Access and SDK documentation.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A hosted Model Context Protocol (MCP) server that exposes PubNub SDK documentation and PubNub API resources to LLM-powered tools. This improves the LLM AI Agent's ability to understand and interact with PubNub's SDKs and APIs. Uses HTTP transport with OAuth authentication.

The hosted server is managed by PubNub and provides the easiest way to get started β no installation required, and authentication is handled automatically via OAuth. If your AI tool doesn't support remote MCP servers, use the locally installed version (npx @pubnub/mcp@latest) instead.
Note: To switch to the hosted server (https://mcp.pubnub.com), remove the old local configuration from your AI client first, then follow the setup steps below.
Connect your AI assistant to https://mcp.pubnub.com β no installation required. Authentication is handled automatically via OAuth.
Click the button above, then select Open in Visual Studio Code. Back in VS Code, click Install, then select the organization you want to authorize and click Allow access.
Alternatively, add the following to your VS Code settings.json manually:
Learn more in VS Code documentation
Click the button above, then select Open Cursor. In Cursor, click Install, select the organization you want to authorize, and click Allow access. Navigate to Cursor Settings β Tools & MCP to verify PubNub is enabled.
Alternatively, add the following to .cursor/mcp.json (or ~/.cursor/mcp.json for global configuration) manually:
When you save the file, a notification is displayed. Click Enable to activate the MCP server. Learn more in Cursor documentation
In the terminal, run:
Then run claude to open Claude Code and enter /mcp. Select pubnub, then authenticate, and click Allow access to complete authorization. Learn more in Claude Code documentation
Note: The following instructions apply to Pro and Max plans. For Enterprise plans, the setup is configured by your organization administrator. Refer to Anthropic's documentation for details.
https://mcp.pubnub.com as the connector URL.Learn more in Claude Desktop documentation
In the terminal, run:
Then run codex mcp login pubnub to authenticate, select the organization you want to authorize, and click Allow access. Learn more in Codex documentation
https://mcp.pubnub.com as the server URL.Learn more in Codex Desktop documentation
In the terminal, run:
Then run gemini to open Gemini CLI and run /mcp auth pubnub to authenticate. Learn more in Gemini CLI documentation
Add the following to ~/.config/opencode/config.json:
Then run opencode mcp auth pubnub to authenticate. Learn more in OpenCode documentation
If your AI tool doesn't support remote MCP servers, run the server locally with:
Before you begin, we highly recommend creating a Service Integration in the PubNub Admin Portal and providing your API key to the MCP server. While some basic features will work without it, adding an API key unlocks much more functionality. Alternatively, refer to Local server configuration for instructions on configuring the server to work with a single PubNub keyset.
The installation process for an MCP server depends on the AI assistant you're using. For the standard setup, you'll need Node.js (v20.0.0 or higher).
Just click the link above, then select "Open in Visual Studio Code" on the page that appears. Back in VS Code, click "Install". You'll be prompted to enter your PubNub API Key. Once provided, your MCP server is ready to use. For additional configuration options, refer to Local server configuration.
Click the link above, then select "Open Cursor" on the page that appears. Back in Cursor, there's a "Install MCP Server?" prompt. Make sure to provide the value for variable holding your PubNub API Key. Once you do, click "Install". Your MCP server is now ready to use. For additional configuration options, refer to Local server configuration.
With Claude Code installed run this command to have the MCP added to your configuration. Make sure to replace the value of <your-api-key>:
Server is added in the "User" scope which means it will be available across all projects. For additional configuration options, refer to Local server configuration.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-server-152)<a href="https://allmcps.com/mcp/mcp-server-152"><img src="https://allmcps.com/api/badge/mcp-server-152?style=directory" alt="Pubnub MCP Server on AllMCPs" /></a>