
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
@pubnub/agentic-walrus
Advanced tools
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, see 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.
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, see 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, see Advanced usage.
With Claude 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 --env PUBNUB_API_KEY=<your-api-key> --scope user --transport stdio PubNub -- 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, see 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:
list_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 SDK documentation for specific programming languages and featuresget_chat_sdk_documentation - Get PubNub Chat SDK documentation for specific programming languages and featuresget_account_info - Retrieve account subscription status and feature availabilitylist_apps - List all PubNub apps on your accountcreate_app - Create a new PubNub app with custom nameupdate_app - Update an existing PubNub app namelist_keysets - List all keysets on your account or within a specific appcreate_keyset - Create a new keyset with default features enabled (Message Persistence, App Context, Files, Presence)update_keyset - Modify properties of an existing keysetsend_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 limitsmanage_app_context - Manage PubNub App Context (Objects API) for users, channels, and memberships with full CRUD operationsget_pubnub_presence - Get presence data using HereNow (channel occupancy) or WhereNow (user's channels)hipaa-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
FAQs
PubNub Model Context Protocol MCP Server for Cursor and Claude
The npm package @pubnub/agentic-walrus receives a total of 3 weekly downloads. As such, @pubnub/agentic-walrus popularity was classified as not popular.
We found that @pubnub/agentic-walrus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.