Server data from the Official MCP Registry
PubNub Model Context Protocol MCP Server for Cursor and Claude
PubNub Model Context Protocol MCP Server for Cursor and Claude
Valid MCP server (2 strong, 1 medium validity signals). 4 known CVEs in dependencies (0 critical, 3 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: 3 highly-trusted packages.
5 files analyzed · 5 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Set these up before or after installing:
Environment variable: PUBNUB_API_KEY
Environment variable: PUBNUB_PUBLISH_KEY
Environment variable: PUBNUB_SUBSCRIBE_KEY
Environment variable: PUBNUB_USER_ID
Environment variable: PUBNUB_EMAIL
Environment variable: PUBNUB_PASSWORD
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-pubnub-mcp-server": {
"env": {
"PUBNUB_EMAIL": "your-pubnub-email-here",
"PUBNUB_API_KEY": "your-pubnub-api-key-here",
"PUBNUB_USER_ID": "your-pubnub-user-id-here",
"PUBNUB_PASSWORD": "your-pubnub-password-here",
"PUBNUB_PUBLISH_KEY": "your-pubnub-publish-key-here",
"PUBNUB_SUBSCRIBE_KEY": "your-pubnub-subscribe-key-here"
},
"args": [
"-y",
"@pubnub/mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
This repository provides a CLI-based 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.

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 Advanced Usage 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 Advanced usage.
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 Advanced usage.
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>:
claude mcp add PubNub --env PUBNUB_API_KEY=<your-api-key> --scope user --transport stdio -- npx -y @pubnub/mcp@latest
Server is added in the "User" scope which means it will be available accross all projects. For additional configuration options, refer to Advanced usage.
With Codex installed run this command to have the MCP added to your configuration. Make sure to replace the value of <your-api-key>:
codex mcp add PubNub --env PUBNUB_API_KEY=<your-api-key> -- npx -y @pubnub/mcp@latest
For additional configuration options, refer to Advanced usage.
Gemini CLI does not support automatic MCP installations. You'll have manually edit your settings.json file and add the section below. Make sure to replace the value of <your-api-key>:
"mcpServers": {
"pubnub": {
"command": "npx",
"args": [
"-y",
"@pubnub/mcp@latest"
],
"env": {
"PUBNUB_API_KEY": "<your-api-key>"
}
}
}
For additional configuration options, refer to Advanced usage.
PUBNUB_API_KEY - Your PubNub API Key. Required for all operations related to your account/keysetPUBNUB_PUBLISH_KEY - Optional PubNub publish key for real-time operationsPUBNUB_SUBSCRIBE_KEY - Optional PubNub subscribe key for real-time operationsPUBNUB_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/keysetPUBNUB_PASSWORD - (Deprecated - use API Key instead) Your PubNub account password. Required for all operations related to your account/keysetThe MCP server supports two modes for handling PubNub publish/subscribe keys:
When PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY are not provided, the server operates in dynamic mode:
manage_keysets toolThis mode is ideal when you want the AI to help manage multiple applications or when the keyset should be determined at runtime.
When both PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY are provided, the server operates in fixed mode:
This mode is ideal for focused workflows where you're working with a specific application and want streamlined interactions.
Example configuration with fixed keys:
{
"env": {
"PUBNUB_API_KEY": "<your-api-key>",
"PUBNUB_PUBLISH_KEY": "pub-c-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"PUBNUB_SUBSCRIBE_KEY": "sub-c-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
If you prefer to run the MCP server via Docker, use the snippet below in your editor's config file mcpServers or servers section of the mcp.json:
{
"mcpServers": {
"PubNub": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PUBNUB_API_KEY",
"pubnub/pubnub-mcp-server"
],
"env": {
"PUBNUB_API_KEY": "<your-api-key>",
}
}
}
}
This PubNub MCP server provides a comprehensive set of tools, resources, and prompts to help you build real-time applications. Below is a complete reference of all available functionality:
get_sdk_documentation - Get PubNub Core SDK documentation for specific programming languages and featuresget_chat_sdk_documentation - Get PubNub Chat SDK documentation for specific programming languages and featureshow_to - Get PubNub conceptual guides for specific use cases and integrationswrite_pubnub_app - Get PubNub best practices guide covering architecture, security, channel modeling, and optimizationmanage_apps - Manage PubNub apps with operations: list, create, and update (requires API key authentication)manage_keysets - Manage PubNub keysets with operations: get, list, create, and update (requires API key authentication)get_usage_metrics - Fetch usage metrics for an account, app, or keyset (requires API key authentication)send_pubnub_message - Send messages or lightweight signals to PubNub channels in real-timesubscribe_and_receive_pubnub_messages - Subscribe to channels and receive real-time messages with configurable timeout and message limitsget_pubnub_messages - Fetch historical messages from one or more PubNub channelsget_pubnub_presence - Get presence data using HereNow (channel occupancy) or WhereNow (user's channels)manage_app_context - Manage PubNub App Context (Objects API) for users, channels, and memberships with full CRUD operationshipaa-chat-short - Quick prompt to create HIPAA compliant chat applicationshipaa-chat-long - Detailed prompt for HIPAA compliant chat with Pub/Sub, Presence, and App Contextreact-app-short - Scaffold a React app with PubNub Pub/Sub and Presencereact-app-long - Comprehensive React app with real-time messaging, presence indicators, and user metadatagamelobby-short - Build multiplayer game lobby with chat and presencegamelobby-long - Advanced multiplayer lobby with team assignments and real-time featuresoem-client-management - Create apps and configure keysets for OEM client deploymentsmulti-tenant-onboarding-short - Implement automated tenant onboarding for SaaS applicationsmulti-tenant-onboarding-long - Enterprise-grade multi-tenant onboarding with data isolation and error handlingpubnub_sdk_docs - Access PubNub SDK documentation via URI scheme: pubnub-docs://sdk/{language}/{feature}Supported languages: asyncio, c-core, c-sharp, dart, freertos, go, java, javascript, kotlin, mbed, objective-c, php, posix-c, posix-cpp, python, ruby, rust, swift, unity, unreal, windows-c, windows-cpp
Supported features: access-manager, access-manager-v2, channel-groups, configuration, encryption, files, message-actions, misc, mobile-push, objects, presence, publish-and-subscribe, storage-and-playback
pubnub_chat_sdk_docs - Access PubNub Chat SDK documentation via URI scheme: pubnub-docs://chat-sdk/{language}/{feature}Supported Languages: javascript, kotlin, swift, unity, unreal
Supported Features: channels-create, channels-delete, channels-details, channels-invite, channels-join, channels-leave, channels-list, channels-membership, channels-references, channels-typing-indicator, channels-updates, channels-watch, connection-management, custom-events, error-logging, messages-delete, messages-details, messages-drafts, messages-files, messages-forward, messages-history, messages-links, messages-moderation, messages-pinned, messages-quotes, messages-reactions, messages-read-receipts, messages-restore, messages-send-receive, messages-threads, messages-unread, messages-updates, moderation, push-notifications, users-create, users-delete, users-details, users-list, users-mentions, users-moderation, users-moderation-user, users-permissions, users-presence, users-updates, utility-methods
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.