AI development

PubNub provides four independent resources for AI coding assistants and agents: Markdown versions of the docs, the PubNub Model Context Protocol (MCP) server, PubNub Skills, and prompt templates. An assistant can use any of them on its own or combine them. Only the MCP server connects to your PubNub account.

ResourceWhat it gives the assistantNeeds your PubNub account
Docs in MarkdownCurrent PubNub documentation without HTML scrapingNo
MCP serverTools that act on your apps, keysets, and real-time dataYes
SkillsPubNub implementation patterns applied while writing codeNo
Prompt templatesReady-made starting prompts for common build tasksNo

Docs in Markdown and llms.txt​

Every page under /docs/ on the PubNub documentation site is also served as Markdown at the same URL with .md appended. For example, https://www.pubnub.com/docs/pub-sub/overview is also available at https://www.pubnub.com/docs/pub-sub/overview.md. The Markdown version keeps the page content and drops navigation, styling, and interactive components, so it costs an agent fewer tokens than the HTML page. Each HTML page also returns a Link: rel="alternate"; type="text/markdown" response header that points to its Markdown version.

PubNub follows the llms.txt convention for pointing a large language model (LLM) at that content:

  • pubnub.com/llms.txt is the curated entry point to PubNub products and documentation.
  • pubnub.com/llms-full.txt is its expanded companion. It contains the complete index of documentation pages, with a Markdown link to each one.

Every generated Markdown page tells the agent to check llms-full.txt before fetching a path, rather than guessing a URL from a naming pattern or from an older fetch. A .md URL that matches no page returns a 404 response in Markdown. That response points back at the same index, so an agent that guessed wrong can recover and continue its task.

None of this needs setup. It applies to every docs page.

MCP server​

The PubNub MCP server turns PubNub account operations into tools an AI assistant can call. Once it's connected, a plain-language request can:

  • Create and configure apps and keysets.
  • Retrieve current SDK documentation, Chat SDK documentation, and migration guides.
  • Read usage metrics and Insights analytics.
  • Publish and subscribe, read message history, and query Presence and App Context data.
  • Manage Functions and Illuminate resources.

PubNub runs a hosted server at https://mcp.pubnub.com that you sign in to with OAuth. The same server is also available as an npm package you run locally with a PubNub API key.

Skills​

A PubNub Skill is a packaged set of instructions, code patterns, and constraints for one PubNub capability. Skills use the SKILL.md format, which Claude Code, Cursor, VS Code with GitHub Copilot, Codex, and other assistants load. The PubNub Skills Collection includes 21 skills, organized into Core Platform, Platform Services, Operations, and Vertical categories. Once installed, an assistant applies a skill automatically when a request matches it. You don't call a skill by name.

A skill carries the PubNub-specific decisions that general SDK knowledge misses. Examples are where to put Access Manager checks, how to name channels at high volume, and how to structure a live auction. Skills live in the versioned PubNub Skills repository rather than in a model's training data, so they're updated as the SDKs change, whichever model or assistant you use.

How the resources fit together​

Your AI coding assistant reads the docs through llms.txt and per-page Markdown, loads Skills, and starts tasks from prompt templates. None of these three touch your PubNub account. When the assistant calls MCP server tools, the server acts on your PubNub account, such as its apps, keysets, and real-time APIs. It authenticates with OAuth for the hosted server or with an API key for the local server.

PubNub AI development

Skills and the MCP server do different jobs. A skill guides the code the assistant writes for a live auction app. The MCP server then creates the keyset and publishes test messages that show the code working against your account. Prompt templates start a task and work with or without either of them.

Next steps​

Was this page useful?

Last updated on