PubNub MCP Server
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.
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
Maintainer
Works with
Installation
NPM
npx -y @pubnub/mcpManual Installation
npx -y @pubnub/mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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/mcpConfigure 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 belowVerify 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.
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.
PubNub MCP Server Alternatives — Similar APIs Servers
Looking for alternatives to PubNub MCP Server? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
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.
Set Up PubNub MCP Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.