Skip to content
VS Code

PubNub MCP Server for VS Code

io.github.pubnub/mcp-server

PubNub Model Context Protocol MCP Server for Cursor and Claude

client:VS Code transport:stdio runtime:npm

Install PubNub MCP Server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "pubnub-api-key",
      "description": "PUBNUB_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pubnub-publish-key",
      "description": "PUBNUB_PUBLISH_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pubnub-subscribe-key",
      "description": "PUBNUB_SUBSCRIBE_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pubnub-user-id",
      "description": "PUBNUB_USER_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pubnub-email",
      "description": "PUBNUB_EMAIL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pubnub-password",
      "description": "PUBNUB_PASSWORD",
      "password": true
    }
  ],
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@pubnub/mcp"
      ],
      "env": {
        "PUBNUB_API_KEY": "${input:pubnub-api-key}",
        "PUBNUB_PUBLISH_KEY": "${input:pubnub-publish-key}",
        "PUBNUB_SUBSCRIBE_KEY": "${input:pubnub-subscribe-key}",
        "PUBNUB_USER_ID": "${input:pubnub-user-id}",
        "PUBNUB_EMAIL": "${input:pubnub-email}",
        "PUBNUB_PASSWORD": "${input:pubnub-password}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

PubNub MCP Server in other clients