PubNub

PubNub

Retrieves context for developing with PubNub SDKs and calling APIs.

7
Stars
5
Forks
0
Releases

Overview

The PubNub MCP Server is a CLI-based implementation of the Model Context Protocol that exposes PubNub SDK documentation and PubNub API resources to large language models and AI tooling. It provides JSON-RPC over STDIN/STDOUT for interacting with PubNub via a suite of tools that fetch official SDK docs in multiple languages (JavaScript, Python, Java, Go, Ruby, Swift, Objective-C, C#, PHP, Rust, Unity, Kotlin, Unreal) and API reference sections (configuration, publish/subscribe, presence, access-manager, channel-groups, storage-and-playback, mobile-push, objects, files, message-actions, misc, functions). It can fetch PubNub Chat SDK docs (JavaScript, Kotlin, Swift, Unity, Unreal) and topics (configuration, chat, channel, user, message, membership, thread-channel, thread-message, message-draft, event, access-control, glossary), plus PubNub conceptual guides from local resources. The server supports publishing messages, subscribing and receiving real-time and historical messages, retrieving presence information, and generating step-by-step instructions for creating PubNub apps (write_pubnub_app) and managing apps/API keys (manage_pubnub_account). It uses environment variables (PUBNUB_PUBLISH_KEY, PUBNUB_SUBSCRIBE_KEY), SSE transport (HTTP_PORT), and a Chat SDK mode for focused Chat SDK resources. Web/article content is converted from HTML to Markdown via jsdom and turndown; input validation uses Zod; and tooling is built on the MCP SDK for extensibility, suitable for Cursor IDE integration.

Details

Owner
pubnub
Language
JavaScript
License
MIT License
Updated
2025-12-07

Features

JSON-RPC over STDIN/STDOUT

Exposes MCP tools and interactions through a JSON-RPC interface for automation and scripting.

SSE Mode Support

Enables Server-Sent Events transport by configuring the HTTP_PORT environment variable.

Comprehensive SDK Documentation Retrieval

Fetch official PubNub SDK docs across many languages and API sections, with HTML→Markdown conversion.

Chat SDK Mode

Specialized mode focusing on PubNub Chat SDK documentation and topics, excluding general PubNub SDK tools.

Local Resources Access

Fetch conceptual guides from the local resources directory (pubnub_concepts, pubnub_features, etc.).

Real-time Messaging & Presence Tools

Publish, subscribe, history, and presence-related tools (publish_pubnub_message, pubnub_subscribe_and_receive_messages, get_pubnub_messages, get_pubnub_presence).

Account & API Key Management

Tooling to create, list, and delete PubNub apps and API keys (manage_pubnub_account).

Environment, Validation & Conversion

Keyed by PUBNUB_PUBLISH_KEY and PUBNUB_SUBSCRIBE_KEY; uses Zod validation; converts HTML to Markdown with jsdom/turndown; MCP SDK-based extensible tooling.

Audience

LLM developersAccess PubNub SDK/API docs and examples to inform AI-driven code generation.
Cursor IDE usersIntegrate MCP server in Cursor IDE for contextual docs and real-time capabilities.
PubNub developersLearn to publish/subscribe, manage apps and API keys, and generate app templates.

Tags

PubNubMCPModel Context ProtocolCursor IDESDK documentationChat SDKJSON-RPCSSECLINode.jsDocumentation automationpresencepublishsubscribehistoryapp-management