# PubNub MCP Server

> PubNub MCP Server is an open-source MCP server for ai models and llm tooling. PubNub Model Context Protocol MCP Server for Cursor and Claude. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Website:** https://www.pubnub.com/networking-mcp-server
- **Repository:** https://github.com/pubnub/pubnub-mcp-server
- **MCP Registry name:** io.github.pubnub/mcp-server
- **Categories:** AI models and LLM tooling
- **Listing updated:** 2026-11-13

## About

PubNub Model Context Protocol MCP Server for Cursor and Claude

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-server --env PUBNUB_API_KEY='<PUBNUB_API_KEY>' --env PUBNUB_PUBLISH_KEY='<PUBNUB_PUBLISH_KEY>' --env PUBNUB_SUBSCRIBE_KEY='<PUBNUB_SUBSCRIBE_KEY>' --env PUBNUB_PASSWORD='<PUBNUB_PASSWORD>' -- npx -y @pubnub/mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@pubnub/mcp"
      ],
      "env": {
        "PUBNUB_API_KEY": "<PUBNUB_API_KEY>",
        "PUBNUB_PUBLISH_KEY": "<PUBNUB_PUBLISH_KEY>",
        "PUBNUB_SUBSCRIBE_KEY": "<PUBNUB_SUBSCRIBE_KEY>",
        "PUBNUB_PASSWORD": "<PUBNUB_PASSWORD>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@pubnub/mcp"
      ],
      "env": {
        "PUBNUB_API_KEY": "<PUBNUB_API_KEY>",
        "PUBNUB_PUBLISH_KEY": "<PUBNUB_PUBLISH_KEY>",
        "PUBNUB_SUBSCRIBE_KEY": "<PUBNUB_SUBSCRIBE_KEY>",
        "PUBNUB_PASSWORD": "<PUBNUB_PASSWORD>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@pubnub/mcp"
      ],
      "env": {
        "PUBNUB_API_KEY": "<PUBNUB_API_KEY>",
        "PUBNUB_PUBLISH_KEY": "<PUBNUB_PUBLISH_KEY>",
        "PUBNUB_SUBSCRIBE_KEY": "<PUBNUB_SUBSCRIBE_KEY>",
        "PUBNUB_PASSWORD": "<PUBNUB_PASSWORD>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@pubnub/mcp"
      ],
      "env": {
        "PUBNUB_API_KEY": "<PUBNUB_API_KEY>",
        "PUBNUB_PUBLISH_KEY": "<PUBNUB_PUBLISH_KEY>",
        "PUBNUB_SUBSCRIBE_KEY": "<PUBNUB_SUBSCRIBE_KEY>",
        "PUBNUB_PASSWORD": "<PUBNUB_PASSWORD>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@pubnub/mcp"
      ],
      "env": {
        "PUBNUB_API_KEY": "<PUBNUB_API_KEY>",
        "PUBNUB_PUBLISH_KEY": "<PUBNUB_PUBLISH_KEY>",
        "PUBNUB_SUBSCRIBE_KEY": "<PUBNUB_SUBSCRIBE_KEY>",
        "PUBNUB_PASSWORD": "<PUBNUB_PASSWORD>"
      }
    }
  }
}
```

## FAQ

### Is PubNub MCP Server free?

Yes. PubNub MCP Server is open source, so you can use and self-host it for free.

### How do I add PubNub MCP Server to Claude Code?

Run this command in your terminal: claude mcp add mcp-server --env PUBNUB_API_KEY='<PUBNUB_API_KEY>' --env PUBNUB_PUBLISH_KEY='<PUBNUB_PUBLISH_KEY>' --env PUBNUB_SUBSCRIBE_KEY='<PUBNUB_SUBSCRIBE_KEY>' --env PUBNUB_PASSWORD='<PUBNUB_PASSWORD>' -- npx -y @pubnub/mcp

### What are the best alternatives to PubNub MCP Server?

The closest alternatives to PubNub MCP Server are Claude Code Ultimate Guide, signafAIde, Toolkien, Lugh and HypePaper.

## Alternatives

- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [signafAIde](https://ai-powered.com/mcp/signafaide): signafAIde is a freemium MCP server for security.
- [Toolkien](https://ai-powered.com/mcp/toolkien): Toolkien is an open-source MCP server for ai models and llm tooling.
- [Lugh](https://ai-powered.com/mcp/lugh): Lugh is an open-source MCP server for ai models and llm tooling.
- [HypePaper](https://ai-powered.com/mcp/hypepaper): HypePaper is a freemium MCP server for ai models and llm tooling.
- [Agent Data Tools: Compact (find, describe, run)](https://ai-powered.com/mcp/agent-data-tools-compact-find-describe-run): Agent Data Tools: Compact (find, describe, run) is a freemium MCP server for developer tools.
- [Angel Agent Guard: pre-purchase check + prompt-injection scan](https://ai-powered.com/mcp/angel-agent-guard-pre-purchase-check-prompt-injection-scan): Angel Agent Guard: pre-purchase check + prompt-injection scan is a freemium MCP server for ai models and llm tooling.
- [Mizan Calibration](https://ai-powered.com/mcp/mizan-calibration): Mizan Calibration is a free MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/pubnub-mcp-server
