PubNub MCP Server
v2.3.2PubNub Model Context Protocol MCP Server for Cursor and Claude
Values you need
| Variable | What it is | |
|---|---|---|
PUBNUB_API_KEY | optional secret | Your PubNub API Key. Required for all operations related to your account/keyset |
PUBNUB_PUBLISH_KEY | optional secret | Optional PubNub publish key for real-time operations |
PUBNUB_SUBSCRIBE_KEY | optional secret | Optional PubNub subscribe key for real-time operations |
PUBNUB_USER_ID | optional | Optional variable that can be provided to change the User ID for the SDK (real-time) operations (default: pubnub-mcp) |
PUBNUB_EMAIL | optional | (Deprecated - use API Key instead) Your PubNub account email. Required for all operations related to your account/keyset |
PUBNUB_PASSWORD | optional secret | (Deprecated - use API Key instead) Your PubNub account password. Required for all operations related to your account/keyset |
npm (npx) verified
Requires Node.js 18+
Run in a terminal
claude mcp add mcp-server -- npx -y @pubnub/mcp@2.3.2Add to
claude_desktop_config.json{
"mcpServers": {
"mcp-server": {
"args": [
"-y",
"@pubnub/mcp@2.3.2"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp-server": {
"args": [
"-y",
"@pubnub/mcp@2.3.2"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"mcp-server": {
"args": [
"-y",
"@pubnub/mcp@2.3.2"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp-server]
command = "npx"
args = ["-y", "@pubnub/mcp@2.3.2"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_sdk_documentation, get_chat_sdk_documentation, how_to, write_pubnub_app, manage_apps, manage_keysets, get_usage_metrics, manage_app_context, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json