Skip to main content
Glama

PubNub MCP Server

A hosted 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. Uses HTTP transport with OAuth authentication.

PubNub MCP Server

Features

  • πŸ“š Comprehensive SDK Documentation - Access detailed documentation, code examples, and implementation guides for 20+ programming languages including JavaScript, Python, Java, Swift, Kotlin, C#, Ruby, Go, and more

  • πŸ—οΈ Application & Keyset Management - Create, configure, and manage PubNub applications and keysets with features like message persistence, file sharing, presence tracking, and app context

  • πŸ’¬ Real-time Communication - Send and receive messages across channels, implement live chat, notifications, and real-time updates with support for both messages and lightweight signals

  • πŸ‘₯ User & Channel Management - Manage user profiles, channel metadata, and membership relationships with full CRUD operations for building community and social features. In addition, there is an option to view & manage user profiles, channels and memberships in PubNub Admin Portal (this requires Manage Premium).

  • πŸ“ Presence & Activity Tracking - Monitor real-time user presence, see who's online in channels, and track user activity across your application

  • πŸ“Š Real-time Decisioning & Analytics - Trigger the right action when it matters, measure its impact, and adjust as conditions change -- all in real-time. Requires Illuminate.

  • πŸ“ˆ Channel, User & Message Analytics - Spot patterns in aggregated app activity, from top channels and country breakdowns to new vs. recurring users and device distribution, to understand engagement, usage, and performance. In addition, limited metrics are available for viewing in PubNub Admin Portal without Manage Premium; full analytics require Manage Premium.

  • πŸ” Usage & Monitoring β€” Track billable usage across apps and keysets, review current and historical consumption, and export reports to understand cost drivers.

  • πŸ”§ Multi-Platform Integration - Works with Cursor, Visual Studio Code, Claude Code, and other MCP-compatible AI assistants

  • ⚑ Developer Experience - Built with TypeScript for type safety, includes testing infrastructure

Related MCP server: MCP Documentation Server

Quick Start

The hosted server is managed by PubNub and provides the easiest way to get started β€” no installation required, and authentication is handled automatically via OAuth. If your AI tool doesn't support remote MCP servers, use the locally installed version (npx @pubnub/mcp@latest) instead.

Note: To switch to the hosted server (https://mcp.pubnub.com), remove the old local configuration from your AI client first, then follow the setup steps below.

Hosted PubNub MCP Server

Connect your AI assistant to https://mcp.pubnub.com β€” no installation required. Authentication is handled automatically via OAuth.

VS Code

Open in VS Code

Click the button above, then select Open in Visual Studio Code. Back in VS Code, click Install, then select the organization you want to authorize and click Allow access.

Alternatively, add the following to your VS Code settings.json manually:

{
  "mcp": {
    "servers": {
      "pubnub": {
        "url": "https://mcp.pubnub.com"
      }
    }
  }
}

Learn more in VS Code documentation

Cursor

Add to Cursor

Click the button above, then select Open Cursor. In Cursor, click Install, select the organization you want to authorize, and click Allow access. Navigate to Cursor Settings β†’ Tools & MCP to verify PubNub is enabled.

Alternatively, add the following to .cursor/mcp.json (or ~/.cursor/mcp.json for global configuration) manually:

{
  "mcpServers": {
    "pubnub": {
      "url": "https://mcp.pubnub.com"
    }
  }
}

When you save the file, a notification is displayed. Click Enable to activate the MCP server. Learn more in Cursor documentation

Claude Code

In the terminal, run:

claude mcp add --scope user --transport http pubnub https://mcp.pubnub.com

Then run claude to open Claude Code and enter /mcp. Select pubnub, then authenticate, and click Allow access to complete authorization. Learn more in Claude Code documentation

Claude Desktop

Note: The following instructions apply to Pro and Max plans. For Enterprise plans, the setup is configured by your organization administrator. Refer to Anthropic's documentation for details.

  1. In Claude Desktop, navigate to Customize β†’ Connectors.

  2. Click + and select Add custom connector.

  3. Enter https://mcp.pubnub.com as the connector URL.

  4. Complete the OAuth login when prompted.

Learn more in Claude Desktop documentation

Codex

In the terminal, run:

codex mcp add pubnub --url https://mcp.pubnub.com

Then run codex mcp login pubnub to authenticate, select the organization you want to authorize, and click Allow access. Learn more in Codex documentation

Codex Desktop

  1. Navigate to Settings β†’ MCP servers and click + Add server.

  2. Select Streamable HTTP as the transport type.

  3. Enter https://mcp.pubnub.com as the server URL.

  4. Follow the OAuth login prompt to complete authorization.

Learn more in Codex Desktop documentation

Gemini CLI

In the terminal, run:

gemini mcp add pubnub --scope user --transport http https://mcp.pubnub.com

Then run gemini to open Gemini CLI and run /mcp auth pubnub to authenticate. Learn more in Gemini CLI documentation

OpenCode

Add the following to ~/.config/opencode/config.json:

{
  "mcp": {
    "pubnub": {
      "type": "remote",
      "url": "https://mcp.pubnub.com",
      "enabled": true
    }
  }
}

Then run opencode mcp auth pubnub to authenticate. Learn more in OpenCode documentation

Local PubNub MCP Server

If your AI tool doesn't support remote MCP servers, run the server locally with:

npx @pubnub/mcp@latest

API Key

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 Local server configuration 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).

VS Code

Open in VS Code

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 Local server configuration.

Cursor

Add to Cursor

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 Local server configuration.

Claude Code

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 across all projects. For additional configuration options, refer to Local server configuration.

Codex

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 Local server configuration.

Gemini CLI

Gemini CLI does not support automatic MCP installations. You'll have to 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 the Local server configuration section in the PubNub documentation.

Development

Prerequisites

  • Node.js >= 20.0.0

Running locally

npm install
npm run dev

Environment variables

Variable

Description

Required

PORT

HTTP server port (default: 3000)

No

MCP_OAUTH_ENABLED

Enable OAuth authentication

Yes (for production)

OAUTH_ISSUER

OAuth authorization server URL

When OAuth enabled

OAUTH_CLIENT_ID

OAuth client ID

When OAuth enabled

OAUTH_CLIENT_SECRET

OAuth client secret

When OAuth enabled

ADMIN_API_RESOURCE_URL

Admin API resource identifier

When OAuth enabled

MCP_RESOURCE_URL

MCP resource URL

When OAuth enabled

MCP_CLOUD_MODE

Cloud deployment mode

No

MCP_SESSION_SUPPORT

Enable session persistence

No

ADMIN_API_V2_URL

Override Admin API v2 endpoint

No

PUBNUB_ORIGIN

Override PubNub origin

No

SDK_DOCS_API_URL

Override docs API endpoint

No

Testing

npm run test:unit        # Unit tests
npm run test:integration # Integration tests (requires build)
npm run test:coverage    # Coverage report

API Reference

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:

Tools

Documentation Access

  • get_sdk_documentation - Get PubNub Core SDK documentation for specific programming languages and features

  • get_chat_sdk_documentation - Get PubNub Chat SDK documentation for specific programming languages and features

  • how_to - Get PubNub conceptual guides for specific use cases and integrations

  • write_pubnub_app - Get PubNub best practices guide covering architecture, security, channel modeling, and optimization

  • get_sdk_migration_guide - Get SDK version migration guides

  • get_general_migration_guide - Get general platform migration guides

App & Keyset Management

  • manage_apps - Manage PubNub apps (list, create, update)

  • manage_keysets - Manage PubNub keysets (get, list, create, update)

  • get_usage_metrics - Fetch usage metrics for an account, app, or keyset

Real-time Communication

  • send_pubnub_message - Send messages or lightweight signals to PubNub channels in real-time

  • subscribe_and_receive_pubnub_messages - Subscribe to channels and receive real-time messages with configurable timeout and message limits

  • get_pubnub_messages - Fetch historical messages from one or more PubNub channels

  • get_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 operations

Illuminate Analytics & Automation

  • manage_illuminate - Manage PubNub Illuminate resources (business objects, queries, metrics, decisions, dashboards) with full CRUD, activation, analytics queries, action log inspection, and test data publishing

Insights Analytics

  • insights - Query PubNub Insights for aggregated analytics metrics: unique channels/users, message volume, top-N rankings (channels, users, message types), country breakdowns, new vs. recurring user trends, user duration, and device type distributions. Requires a Service Integration API key with Account-level Insights Read access and Insights Premium tier.

Prompts

Healthcare & HIPAA Compliance

  • hipaa-chat-short - Quick prompt to create HIPAA compliant chat applications

  • hipaa-chat-long - Detailed prompt for HIPAA compliant chat with Pub/Sub, Presence, and App Context

React Development

  • react-app-short - Scaffold a React app with PubNub Pub/Sub and Presence

  • react-app-long - Comprehensive React app with real-time messaging, presence indicators, and user metadata

Gaming Applications

  • gamelobby-short - Build multiplayer game lobby with chat and presence

  • gamelobby-long - Advanced multiplayer lobby with team assignments and real-time features

OEM & Multi-Tenant Solutions

  • oem-client-management - Create apps and configure keysets for OEM client deployments

  • multi-tenant-onboarding-short - Implement automated tenant onboarding for SaaS applications

  • multi-tenant-onboarding-long - Enterprise-grade multi-tenant onboarding with data isolation and error handling

Illuminate Analytics & Automation

  • illuminate-spam-detection - Set up an Illuminate spam detection pipeline with escalating moderation actions

  • illuminate-reward-engagement - Build an Illuminate engagement reward pipeline for live events and gaming

  • illuminate-use-case - Guided setup of any Illuminate analytics and automation use case

  • illuminate-test-verify - Test and verify an existing Illuminate configuration end-to-end

Insights Analytics

  • insights-snapshot - Quick high-level analytics snapshot for a date range: unique channels, unique users, message volume, top 20 channels by messages, and anomaly callouts

  • insights-channel-analysis - Deep dive into top channels by ranking category, channel naming patterns, and cross-category engagement comparisons

  • insights-user-growth - New vs. recurring user trends, daily/weekly/monthly breakdowns, top countries, and whale user identification

  • insights-engagement-deep-dive - Average user duration, session-length bucket histogram, top channels by user-minutes, and device-type breakdown across publishes, subscribers, and unique users

Resources

  • pubnub_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

Available Tools

16 tools
get_chat_sdk_documentationGet PubNub Chat SDK DocumentationA

Retrieve Chat SDK documentation for building chat/messaging applications.

  **When to use:**
  - Building ANY chat or messaging application (1:1, group, channels)
  - Need typing indicators, read receipts, @mentions, unread counts
  - Want message threads, reactions, pinned messages, moderation
  - Need user/channel management with chat-specific features
  - Prefer rapid development with intuitive methods like sendText(), startTyping(), join()

  **Do NOT use for:**
  - Non-chat real-time apps (IoT, gaming state, analytics) β†’ use "get_sdk_documentation"
  - Conceptual guides β†’ use "how_to"

  **Example features:**
  - messages-send-receive, messages-threads, messages-reactions
  - channels-create, channels-join, channels-typing-indicator
  - users-mentions, users-presence

  Returns code examples and API references for the specified language/feature.

Inputs: language (required), feature (required).

get_general_migration_guideGet PubNub General Migration GuideA

Retrieve general migration guides for cross-cutting PubNub platform changes.

  **When to use:**
  - Migrating to a new encryption standard (e.g. 256-bit encryption)
  - Upgrading push notification setup (e.g. APNs HTTP/2, FCM v1)
  - Migrating to new API versions (e.g. Access Manager v3, Objects v2)
  - Replacing deprecated features (e.g. legacy webhooks)

  **Do NOT use for:**
  - SDK version upgrades (e.g. JavaScript v7β†’v8) β†’ use "get_sdk_migration_guide"
  - General SDK documentation β†’ use "get_sdk_documentation"

  Returns the migration guide content for the specified slug.

Inputs: slug (required).

get_pubnub_messagesGet PubNub Channel HistoryA

Fetches historical messages from one or more PubNub channels. Call this tool whenever you need to access past message history. Provide a list of channel names. Returns message content and metadata in JSON format. Supports pagination with start/end timetokens and count limit.

Inputs: channels (required), publishKey (required), subscribeKey (required), start, +2 more.

get_pubnub_presenceGet Presence Data (HereNow / WhereNow)B

Retrieves real-time presence information. Use 'channels'/'channelGroups' for HereNow (occupancy/users in channel) and/or 'uuid' for WhereNow (channels a user is in). Returns presence data in JSON format. Requires publish and subscribe keys from your PubNub keyset.

Inputs: publishKey (required), subscribeKey (required), channels, channelGroups, +1 more.

get_sdk_documentationGet PubNub Core SDK DocumentationA

Retrieve Core SDK documentation for low-level real-time features.

  **When to use:**
  - Building NON-CHAT real-time apps (IoT, gaming state sync, live analytics, notifications)
  - Need fine-grained control over pub/sub, presence, storage, or access management
  - Implementing custom real-time patterns
  - Need API reference for specific SDK methods (publish, subscribe, history, etc.)

  **Do NOT use for:**
  - Chat/messaging apps β†’ use "get_chat_sdk_documentation" instead
  - Conceptual guides β†’ use "how_to"

  Returns code examples, API references, and implementation guides for the specified language/feature combination.

Inputs: language (required), feature (required).

get_sdk_migration_guideGet PubNub SDK Migration GuideA

Retrieve SDK migration guides for upgrading between PubNub SDK versions.

  **When to use:**
  - Upgrading a PubNub SDK to a newer major version
  - Need step-by-step instructions for migrating breaking changes
  - Refactoring a codebase after a PubNub SDK version bump

  **Do NOT use for:**
  - General SDK documentation β†’ use "get_sdk_documentation"
  - Chat SDK documentation β†’ use "get_chat_sdk_documentation"

  Returns the migration guide content for the specified language and target version.

Inputs: language (required), version (required).

get_usage_metricsGet PubNub Usage MetricsB

Fetches usage metrics from the PubNub Admin API for an account, app, or keyset.

  **Parameters:**
  - entityType: 'account', 'app', or 'keyset'
  - entityId: The ID of the entity
  - from: Start date (inclusive) in YYYY-MM-DD format
  - to: End date (exclusive) in YYYY-MM-DD format
  - metrics: Array of metric names to retrieve

  **Available Metric Categories:**
  - Core transactions: txn_total, mtd_txn_total, replicated, signals, edge
  - MAU/UUID: mtd_uuid, uuid, pn_uuid
  - Messages: msgs_total, publish, subscribe_msgs, history_msgs, files_msgs, push_msgs
  - Storage: bytes_stored, bytes_stored_messages, bytes_stored_files, etc.
  - Access Manager: accessmanager_grants_transactions, accessmanager_audits_transactions
  - Functions: executions, kv_read_transactions, kv_write_transactions
  - History: history_transactions, history_with_actions_transactions
  - Message Actions: message_actions_add_transactions, message_actions_get_transactions
  - Objects/App Context: objects_create_user_transactions, objects_get_user_transactions, etc.
  - Presence: presence_herenow_transactions, presence_wherenow_transactions
  - Push Notifications: apns_sent_transactions, gcm_sent_transactions
  - Subscribe: subscribe_transactions, subscribe_heartbeats_transactions
  - Publish: publish_transactions, publish_bytes
  - Signal: signal_transactions
  - Files: files_publish_transactions, files_get_file_transactions

Inputs: entityType (required), entityId (required), from (required), to (required), +1 more.

how_toGet PubNub How-To GuideA

Retrieve conceptual guides for specific PubNub use cases and integrations. When to use: - Learning how to implement a specific use case (gaming, healthcare, IoT) - Need step-by-step integration guide for a platform (Unity, Unreal etc) - Understanding PubNub features in context (presence, push notifications, functions)

  **Do NOT use for:**
  - API reference or code samples of a specific PubNub features β†’ use `get_sdk_documentation` or `get_chat_sdk_documentation`
  - General best practices β†’ use `write_pubnub_app`
  

Inputs: slug (required).

insightsQuery PubNub InsightsA

Queries PubNub Insights β€” read-only aggregated analytics scoped to an account, app, or keyset.

  **Entity scoping:** Every query requires an entityType ('account', 'app', or 'keyset') and
  an entityId. For 'account' and 'app', the entityId is the numeric ID. For 'keyset', the
  entityId is the subscribe key (sub-c-...).

  Two endpoints, picked automatically by metric name:
  - /v2/insights        β†’ aggregated metrics (unique_channels, unique_users, messages, etc.)
  - /v2/insights/top    β†’ ranked metrics (top_20_channels, top_20_users, top_10_message_types, etc.)

  TOOL SELECTION GUIDE β€” Insights Claude Behavior:

  1. Group-aware: Insights metrics are organized into 5 functional groups β€” Channels, Users,
     Messages, User Behavior, Devices. When a user asks an analytic question, pick the right
     group first and then the specific metric. See the how-to guides:
     how_to(slug="how-to-get-insights-api-access"), channels, users, messages,
     user-behavior-and-devices, filters.

  2. Period rules (enforced at runtime):
     - Duration metrics (avg_user_duration, unique_users_by_duration_timeframe,
       top_*_channels_with_user_duration) β†’ period=hourly ONLY.
     - Top-N metrics (top_20_*, top_1000_*) β†’ hourly or daily ONLY (no weekly/monthly).
     - Country metrics β†’ hourly or daily ONLY.
     - new_vs_recurring_users β†’ daily / weekly / monthly only (NOT hourly).
     - All other metrics β†’ all four periods supported.

  3. Top metrics REQUIRE category. Without it, the call errors. Valid categories:
     by_messages, by_chats, by_subscribers, by_users_with_messages,
     by_users_with_chats, by_subscribed_channels, all.

  4. Top-metric filtering uses `filters` (JSON), not `filter`. Use `filters` on
     top_20_* / top_1000_* for thresholds (count_messages gt), allowlists (channel_name
     in), and prefixes (uuid startsWith). Use `filter` only on channel_patterns.

  5. UTC timestamps. fromDate and toDate are YYYY-MM-DD in UTC. Always frame the response
     with the date range and timezone so the user has unambiguous context.

  6. Top-N counts CANNOT be summed across periods. If the user asks for "top channels this
     week" and you query with period=daily, return one ranking per day, not a weekly sum.

  7. Default to period=daily for most queries. It supports the widest set of metrics and
     gives a clean trend view. Use hourly only when intra-day granularity is needed or for
     duration metrics.

  8. Account must be on Insights Premium. Free plan has no API access. Pro existing
     customers may need to upgrade from Standard to Premium. If a 403 comes back, surface
     this as the likely cause.

  9. The tool does not write or store anything. Insights is strictly read-only.

Inputs: entityType (required), entityId (required), metric (required), period (required), +7 more.

manage_app_contextManage PubNub App ContextA

Manages PubNub App Context (Objects API) for users, channels, and memberships. Supports CRUD operations including get, set, remove, and getAll. Use this tool to manage user profiles, channel metadata, and membership relationships in your PubNub application.

Inputs: type (required), operation (required), id (required), publishKey (required), +3 more.

manage_appsManage PubNub AppA

Manages PubNub apps with operations: list, create, update. - 'list': List all apps on your account. - 'create': Create a new app. User must provide data.name. - 'update': Update an existing app name. User must provide data.id and data.name.

Inputs: operation (required), data.

manage_illuminateManage PubNub IlluminateA

Manages PubNub Illuminate resources with operations: list, get, create, update, delete, activate, deactivate, get-fields, execute-adhoc, publish-fake-data, verify-query, check-action-log, raw-snapshot, aggregate, field-health, and custom-query.

  Supports full CRUD for: Business Objects, Metrics, Queries, Decisions, and Dashboards.

  **Operations:**
  - list: GET all resources of a given type
  - get: GET one resource by id
  - create: POST a new resource (Decisions use automatic 2-step POST→PUT workflow)
  - update: PUT/replace a resource
  - delete: DELETE a resource (Business Object delete cascades to all associated resources)
  - activate / deactivate: toggle isActive (Business Object) or enabled (Decision)
  - get-fields: fetch Query output field definitions (required before building a Query Decision)
  - execute-adhoc: run a one-off Query pipeline without saving it
  - publish-fake-data: generate type-aware fake PubNub messages and publish them to test Decisions. Fetches BO field schema and produces realistic values per field type. Payloads are NESTED to match each field's JSONPath (e.g. `$.message.body.application.user_id` produces `{ application: { user_id: ... } }`, not the flat key `"application.user_id"`), so JSONPath resolution works against nested BO schemas. Pass secret_key when the keyset has Access Manager enabled β€” initializing with the secret key grants root permissions and bypasses 403 errors. Alternatively pass auth_key with a token from grantToken(). Failures are reported per-message; partial publishes return success with a 'failures' array. NOTE: Illuminate ingests with a 20–30 second delay β€” wait before querying after publish.
  - verify-query: execute a saved Query by id and return results (confirms data is flowing)
  - check-action-log: fetch recent Decision action log entries to verify a Decision fired
  - raw-snapshot: return the most recent rows from a Business Object via ad-hoc query
  - aggregate: group and count BO data by user/channel or custom group_by fields
  - field-health: check which BO fields are populated vs empty (reveals JSONPath mismatches)
  - custom-query: run a fully custom ad-hoc pipeline

  **ID Dependency Chain β€” always capture before proceeding:**
  Business Object β†’ id, fields[*].id
  Metric          β†’ id, measureId, dimensionIds
  Query           β†’ id, then call get-fields for output field IDs
  Decision        β†’ id, inputFields[*].id, outputFields[*].id, actions[*].id
  Dashboard       β†’ id, charts[*].id

  **Critical Decision rules:**
  hitType ('SINGLE'|'MATCH_ALL') and executeOnce (boolean) are required β€” omitting causes HTTP 500.
  Handler auto-injects safe defaults (hitType=SINGLE, executeOnce=false, activeFrom=now, activeUntil=now+2yr).
  The 2-step create workflow resolves field/action names β†’ UUIDs in: action templates
  (both output variable names AND input field names β€” input names are sentinel-substituted
  pre-POST and restored post-POST), inputValues.inputFieldId, outputValues.outputFieldId,
  outputValues.value (dollar-brace), actionValues.actionId, and
  actionValues.executionLimitInputFieldIds. Use names everywhere.
  If the PUT step fails the handler deletes the orphaned scaffold automatically.

  **CRITICAL β€” QUERY decision input field naming:**
  For sourceType=QUERY decisions, each inputField.name MUST exactly match the source
  query's output field alias (case-sensitive, including underscores). Illuminate binds
  query result rows to decision inputs by NAME β€” not by sourceId. If names don't match,
  the decision will be created and activated successfully but will silently NEVER fire
  even with valid data. Always run get-fields on the source query first and copy the
  'field' values verbatim into your decision's inputFields[].name.

  **Business Object limits (handler pre-flights and rejects on violation):**
  - name: 1-100 characters
  - fields[].name: 1-50 characters
  - max 100 fields per BO
  - **max 5 TEXT_LONG fields per BO** (use TEXT, which holds 256 chars, for shorter strings)
  - keep `description` concise β€” overly long descriptions are rejected with HTTP 400 by the API

  **Decision action default:**
  When the user doesn't specify what action to fire, default to actionType='PUBNUB_PUBLISH'
  with a message body that includes the relevant input/output values via dollar-brace
  template references. PUBNUB_PUBLISH requires no external infrastructure and is trivially
  verifiable via check-action-log or by subscribing to the target channel. Only use WEBHOOK
  when the user has provided a specific URL.

  NEVER delete without explicit user confirmation.

  TOOL SELECTION GUIDE β€” Illuminate Claude Behavior:
  1. Intent-first: Always start from the user's desired outcome. Ask what they want
     to achieve before suggesting Business Objects, Metrics, or Decisions.
  2. Preview-first: Before creating any resources, describe automation in 1-2 sentences
     and show a conditions β†’ actions decision table. Ask for confirmation before building.
  3. Predefined templates: For spam (flooding/cross-posting) and ranking (Top N/Bottom N),
     use the Query Builder predefined templates. Never recreate these from scratch.
  4. Built-in BO fields: For chat/moderation/ranking, User/Channel/Message/Message Type
     are auto-created. Never ask users to define them.
  5. Start simple: Minimal decision for the core goal; add complexity only when requested.
  6. PubNub extension: For delayed checks, scheduling, or orchestration beyond Illuminate,
     suggest PubNub Functions or pub/sub as the first extension path.

Inputs: operation (required), resource, id, data, +14 more.

manage_keysetsManage PubNub KeysetA

Manages PubNub keysets with operations: get, list, create, update. - 'get': Get a specific keyset information. User needs to provide the keyset id. - 'list': List all keysets for your account or a specific app. - 'create': Create a new keyset. New keyset is created with Message Persistence, App Context, Files, and Presence enabled by default; the user must provide name, production, and config with nested objects (messagePersistence, appContext, files, presence), and if any required parameter is missing, you must ask the user to provide it. - 'update': Update an existing keyset. User needs to provide the keyset id and the config to update.

Inputs: operation (required), data.

send_pubnub_messageSend Message or Signal to PubNub ChannelA

Send a message or signal to a PubNub channel in real-time. Supports both regular messages and lightweight signals. Plain strings are automatically wrapped in a 'text' field. Requires publish and subscribe keys from your PubNub keyset.

Inputs: channel (required), message (required), publishKey (required), subscribeKey (required), +1 more.

subscribe_and_receive_pubnub_messagesSubscribe to PubNub Channel and Receive MessagesA

Subscribe to a PubNub channel and receive messages in real-time. Specify the number of messages (default 1) and/or a timeout (default 10s, max 30s) to wait for. Requires publish and subscribe keys from your PubNub keyset.

Inputs: channel (required), publishKey (required), subscribeKey (required), messageCount, +1 more.

write_pubnub_appGet PubNub Best PracticesA

Retrieve PubNub best practices guide covering: 1) Architecture & project setup (environments, payload sizes), 2) Security (Access Manager tokens, least privilege, PII hygiene), 3) Channel & data modeling (naming conventions, message schemas), 4) Publish/Subscribe patterns, 5) History usage, 6) Client reliability (reconnect, idempotency, ordering), 7) Functions/edge logic, 8) Presence & state, 9) App Context, 10) Mobile specifics (push notifications, caching), 11) Web specifics (tab lifecycle, Service Workers), 12) Observability & ops, 13) Performance & cost optimization. Call this tool when building PubNub applications to ensure robust, scalable, and secure implementations.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 16 tools

    Disambiguation3/5

    The set includes multiple documentation tools (get_sdk_documentation, get_chat_sdk_documentation, how_to, write_pubnub_app, get_sdk_migration_guide, get_general_migration_guide) with clear usage guidance, so overlap is managed. However, manage_illuminate is an extremely dense mega-tool that conflates many distinct operations (list, create, update, delete, activate, etc.) into one tool, making it hard for an agent to select the right tool vs. sub-operation. Also, get_usage_metrics and insights both query analytics, with overlapping scopes that could confuse selection.

    Naming Consistency3/5

    Names mix patterns: some use verb_object (write_pubnub_app, send_pubnub_message, get_pubnub_messages, get_pubnub_presence), some use noun-ish (insights, how_to, manage_app_context, manage_illuminate). The 'manage_' prefix is used for some but not consistently (manage_keysets, manage_app_context, manage_illuminate, manage_apps vs. get_usage_metrics, insights). The documentation tools vary wildly: get_sdk_documentation, get_chat_sdk_documentation, get_sdk_migration_guide, get_general_migration_guide, how_to, write_pubnub_app β€” there's no common prefix for docs.

    Tool Count4/5

    16 tools is slightly above the typical ideal range (3-15), but given the broad scope of PubNub (real-time messaging, admin, analytics, docs), it remains reasonable. Each tool covers a distinct domain, though manage_illuminate is overloaded and could arguably be split into multiple tools to reduce the count's weight.

    Completeness4/5

    The core real-time messaging lifecycle is covered (publish, subscribe, history, presence), and admin operations (apps, keysets, usage metrics) are present. However, missing common operations like channel management (create/delete channels) or access manager token generation, which are essential for many PubNub applications, represent notable gaps. Illuminate is very comprehensive, but the analytics side is read-only and lacks write/alerting tools.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers