PubNub MCP Server

v2.3.2APIsstable

A CLI-based Model Context Protocol server that exposes PubNub SDK documentation and Functions resources to LLM-powered tools like Cursor IDE, enabling users to fetch documentation and interact with PubNub channels via natural language prompts.

claude-codecurosrllmmcpmcp-server
Share:
31
Stars
0
Downloads
0
Weekly
0/5

What is PubNub MCP Server?

PubNub MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to cli-based model context protocol server that exposes pubnub sdk documentation and functions resources to llm-powered tools like cursor ide, enabling users to fetch documentation and interact with pubn...

A CLI-based Model Context Protocol server that exposes PubNub SDK documentation and Functions resources to LLM-powered tools like Cursor IDE, enabling users to fetch documentation and interact with PubNub channels via natural language prompts.

This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A CLI-based Model Context Protocol server that exposes PubNu

Use Cases

Access PubNub documentation
Interact with channels
Manage pub/sub messaging
pubnub

Maintainer

LicenseUnlicense - libtelnet variant
Languagetypescript
Versionv2.3.2
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @pubnub/mcp

Manual Installation

npx -y @pubnub/mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use PubNub MCP Server

The PubNub MCP Server exposes PubNub's SDK documentation, channel messaging, and app management capabilities to LLM-powered tools like Cursor IDE, Claude Code, and Windsurf through the Model Context Protocol. It allows developers to ask questions about PubNub's real-time APIs across 20+ programming languages, publish and subscribe to channels, retrieve message history, track presence, and query analytics—all through natural language in their AI coding assistant. Teams building real-time features with PubNub can use it to get accurate, up-to-date SDK guidance without leaving their IDE.

Prerequisites

  • Node.js 20.0.0 or higher
  • A PubNub account with publish and subscribe keys (for real-time messaging features)
  • An MCP-compatible client such as Cursor IDE, Claude Code, Windsurf, or Claude Desktop
  • npx available for running the package without a global install
1

Run the PubNub MCP server via npx

The server is published to npm as @pubnub/mcp and can be started directly with npx. No global installation is required.

npx -y @pubnub/mcp
2

Configure your MCP client

Add the PubNub MCP server to your client's configuration file. The server requires no mandatory environment variables for documentation access; PubNub keys are passed as arguments when using channel tools.

# See configuration example below
3

Verify the connection

Open your MCP client (e.g., Claude Desktop) and check that PubNub tools appear in the available tool list. Try asking a documentation question to confirm the server is connected.

4

Use channel tools with PubNub credentials

When publishing or subscribing to channels, provide your PubNub publish and subscribe keys in the tool invocation. These are available in the PubNub Admin Dashboard under your keyset.

PubNub MCP Server Examples

Client configuration

Claude Desktop configuration for the PubNub MCP server using the official npm package.

{
  "mcpServers": {
    "pubnub": {
      "command": "npx",
      "args": ["-y", "@pubnub/mcp"]
    }
  }
}

Prompts to try

Example prompts leveraging PubNub documentation and real-time messaging tools.

- "Show me how to implement presence tracking in PubNub using the JavaScript SDK."
- "What is the correct way to retrieve the last 50 messages from a PubNub channel using Python?"
- "Publish a message to the 'chat-room-1' channel with my PubNub keys."
- "How do I configure PubNub Functions to transform messages before they are delivered to subscribers?"
- "What are the differences between the PubNub Chat SDK and the core SDK for building a chat app?"

Troubleshooting PubNub MCP Server

npx -y @pubnub/mcp fails with 'engine' compatibility warning or exits immediately

The server requires Node.js 20 or higher. Run 'node --version' to check your version. Use nvm or fnm to switch to Node 20+ if needed.

Documentation tools return stale or incorrect API information

The SDK_DOCS_API_URL environment variable can override the documentation endpoint. Ensure your network allows outbound HTTPS connections to PubNub's documentation API.

Channel publish or subscribe fails with authorization error

Verify that your PubNub publish and subscribe keys are correct and belong to the same keyset. Check that Access Manager is not blocking operations—for development, you may need to generate a grant token or disable Access Manager on the keyset.

Frequently Asked Questions about PubNub MCP Server

What is PubNub MCP Server?

PubNub MCP Server is a Model Context Protocol (MCP) server that cli-based model context protocol server that exposes pubnub sdk documentation and functions resources to llm-powered tools like cursor ide, enabling users to fetch documentation and interact with pubnub channels via natural language prompts. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install PubNub MCP Server?

Install via npm with the command: npx -y @pubnub/mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with PubNub MCP Server?

PubNub MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is PubNub MCP Server free to use?

Yes, PubNub MCP Server is open source and available under the Unlicense - libtelnet variant license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "pubnub-mcp-server": { "command": "npx", "args": ["-y", "@pubnub/mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use PubNub MCP Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides