---
source_url: https://www.pubnub.com/docs/ai-development/overview
title: AI development
description: How PubNub makes its docs and account available to AI coding assistants and agents, through llms.txt and Markdown pages, the MCP server, and prompt templates.
updated_at: 2026-10-01T07:32:56.000Z
---

# AI development

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

PubNub provides three independent resources for AI coding assistants and agents: Markdown versions of the docs, the PubNub Model Context Protocol (MCP) server, 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.

| Resource | What it gives the assistant | Needs your PubNub account |
| --- | --- | --- |
| [Docs in Markdown](#docs-in-markdown-and-llmstxt) | Current PubNub documentation without HTML scraping | No |
| [MCP server](https://www.pubnub.com/docs/ai-development/mcp-server.md) | Tools that act on your apps, keysets, and real-time data | Yes |
| [Prompt templates](https://www.pubnub.com/docs/ai-development/prompt-templates.md) | Ready-made starting prompts for common build tasks | No |

## 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](https://www.pubnub.com/llms.txt) is the curated entry point to PubNub products and documentation.
* [pubnub.com/llms-full.txt](https://www.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 starts with a short note that points the agent to `llms-full.txt`, so it can look up a path rather than guess a URL from a naming pattern or from an older fetch. Every HTML page carries a note for agents with the URL of that page's Markdown version and the documentation index. 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](https://www.pubnub.com/docs/ai-development/mcp-server.md) 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](https://www.pubnub.com/docs/analytics/usage-dashboards/overview.md) analytics.
* Publish and subscribe, read message history, and query [Presence](https://www.pubnub.com/docs/presence/overview.md) and [App Context](https://www.pubnub.com/docs/data-storage/metadata/overview.md) data.
* Manage [Functions](https://www.pubnub.com/docs/message-processing/serverless/overview.md) and [Illuminate](https://www.pubnub.com/docs/analytics/decisions/overview.md) 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.

* [Set up the MCP server](https://www.pubnub.com/docs/ai-development/set-up-mcp-server.md). Connect Claude Code, Cursor, VS Code, or another MCP client.
* [Available MCP tools](https://www.pubnub.com/docs/ai-development/available-mcp-tools.md). What each tool does and what access it requires.
* [Manage MCP connections](https://www.pubnub.com/docs/ai-development/manage-mcp-connections.md). Revoke hosted connections or turn them off for an organization.

## How the resources fit together

Your AI coding assistant reads the docs through `llms.txt` and per-page Markdown and starts tasks from prompt templates. Neither of these touches 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

```mermaid
flowchart TB
    AGENT["<b>Your AI coding assistant</b>"]

    subgraph NET[" "]
        subgraph SEC[" "]
            DOCS["<b>Docs access</b><br/>llms.txt and<br/>per-page Markdown"]
            MCP["<b>MCP server</b><br/>live account and<br/>API access"]
            PROMPTS["<b>Prompt templates</b><br/>ready-made<br/>task prompts"]
        end
    end

    ACCOUNT["<b>Your PubNub account</b><br/>apps, keysets, real-time APIs"]

    AGENT ---|"reads"| DOCS
    AGENT ---|"starts from"| PROMPTS
    AGENT ---|"calls tools"| MCP
    MCP -->|"OAuth or API key"| ACCOUNT

    class MCP emphasis
    class DOCS,PROMPTS muted
    class ACCOUNT external
    class NET platform
```

Prompt templates and the MCP server do different jobs. A prompt template starts a task, such as building 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 work with or without the MCP server.

## Next steps

* [Set up the MCP server](https://www.pubnub.com/docs/ai-development/set-up-mcp-server.md). Connect an AI assistant to your PubNub account.
* [Prompt templates](https://www.pubnub.com/docs/ai-development/prompt-templates.md). Start a build task from a ready-made prompt.
* [Quickstart](https://www.pubnub.com/docs/getting-started/quickstart.md). Build your first PubNub application by hand, so you know what the AI assistant does for you.

Last updated at: 2026-10-01T07:32:56.000Z
