4,000+ servers built on vurb.ts
Vinkius

PubNub (Real-time Messaging) MCP Server for LangChainGive LangChain instant access to 31 tools to Admin Create App, Admin Get Metrics, Admin List Apps, and more

MCP Inspector GDPR Free for Subscribers

LangChain is the leading Python framework for composable LLM applications. Connect PubNub (Real-time Messaging) through Vinkius and LangChain agents can call every tool natively. combine them with retrievers, memory, and output parsers for sophisticated AI pipelines.

Ask AI about this MCP Server for LangChain

The PubNub (Real-time Messaging) MCP Server for LangChain is a standout in the Communication Messaging category — giving your AI agent 31 tools to work with, ready to go from day one.

Built for AI Agents by Vinkius

Vinkius delivers Streamable HTTP and SSE to any MCP client

ClaudeClaude
ChatGPTChatGPT
CursorCursor
GeminiGemini
WindsurfWindsurf
VS CodeVS Code
JetBrainsJetBrains
VercelVercel
+ other MCP clients
python
import asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent

async def main():
    # Your Vinkius token. get it at cloud.vinkius.com
    async with MultiServerMCPClient({
        "pubnub-real-time-messaging": {
            "transport": "streamable_http",
            "url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
        }
    }) as client:
        tools = client.get_tools()
        agent = create_react_agent(
            ChatOpenAI(model="gpt-4o"),
            tools,
        )
        response = await agent.ainvoke({
            "messages": [{
                "role": "user",
                "content": "Using PubNub (Real-time Messaging), show me what tools are available.",
            }]
        })
        print(response["messages"][-1].content)

asyncio.run(main())
PubNub (Real-time Messaging)
Fully ManagedVinkius Servers
60%Token savings
High SecurityEnterprise-grade
IAMAccess control
EU AI ActCompliant
DLPData protection
V8 IsolateSandboxed
Ed25519Audit chain
<40msKill switch
Stream every event to Splunk, Datadog, or your own webhook in real-time

* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure

About PubNub (Real-time Messaging) MCP Server

Connect your PubNub account to any AI agent to orchestrate real-time communication, monitor user presence, and manage data streams through natural language.

LangChain's ecosystem of 500+ components combines seamlessly with PubNub (Real-time Messaging) through native MCP adapters. Connect 31 tools via Vinkius and use ReAct agents, Plan-and-Execute strategies, or custom agent architectures. with LangSmith tracing giving full visibility into every tool call, latency, and token cost.

What you can do

  • Real-time Messaging — Publish JSON payloads to any channel and retrieve historical message logs with precise timetokens.
  • Presence Monitoring — Track who is online (here_now), see which channels a user is in (where_now), and manage custom presence states.
  • User & Channel Metadata — Manage App Context by creating and retrieving user profiles, channel metadata, and memberships.
  • Message Management — Count messages sent after specific timestamps or purge history for compliance and storage management.
  • File Sharing — Generate upload URLs and manage files stored within the PubNub network.
  • Admin & Push — Monitor keyset metrics, manage applications, and configure mobile push notifications (APNS/FCM).

The PubNub (Real-time Messaging) MCP Server exposes 31 tools through the Vinkius. Connect it to LangChain in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.

All 31 PubNub (Real-time Messaging) tools available for LangChain

When LangChain connects to PubNub (Real-time Messaging) through Vinkius, your AI agent gets direct access to every tool listed below — spanning real-time-sync, pub-sub, data-streams, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.

admin

Admin create app on PubNub (Real-time Messaging)

Create a new PubNub app (Admin API)

admin

Admin get metrics on PubNub (Real-time Messaging)

Get usage metrics (Admin API)

admin

Admin list apps on PubNub (Real-time Messaging)

List all PubNub apps (Admin API)

admin

Admin list keysets on PubNub (Real-time Messaging)

List all keysets (Admin API)

delete

Delete file on PubNub (Real-time Messaging)

Delete a file from a channel

delete

Delete message history on PubNub (Real-time Messaging)

Delete message history for channels

generate

Generate file upload url on PubNub (Real-time Messaging)

Generate a file upload URL

get

Get all channels on PubNub (Real-time Messaging)

Get all channels (App Context)

get

Get all users on PubNub (Real-time Messaging)

Get all users (App Context)

get

Get channel on PubNub (Real-time Messaging)

Get a specific channel (App Context)

get

Get file url on PubNub (Real-time Messaging)

Get a file URL

get

Get memberships on PubNub (Real-time Messaging)

Get memberships for a user (App Context)

get

Get message count on PubNub (Real-time Messaging)

Get message count for channels

get

Get message history on PubNub (Real-time Messaging)

Get message history for channels

get

Get user on PubNub (Real-time Messaging)

Get a specific user (App Context)

list

List files on PubNub (Real-time Messaging)

List files in a channel

pam

Pam grant token on PubNub (Real-time Messaging)

Grant a PAM v3 token

pam

Pam revoke token on PubNub (Real-time Messaging)

Revoke a PAM v3 token

presence

Presence get state on PubNub (Real-time Messaging)

Get presence state for a user in a channel

presence

Presence heartbeat on PubNub (Real-time Messaging)

Send presence heartbeat

presence

Presence here now on PubNub (Real-time Messaging)

Get current channel occupancy (Here Now)

presence

Presence leave on PubNub (Real-time Messaging)

Leave a channel (Presence)

presence

Presence set state on PubNub (Real-time Messaging)

Set presence state for a user in a channel

presence

Presence where now on PubNub (Real-time Messaging)

Get channels a user is in (Where Now)

publish

Publish message on PubNub (Real-time Messaging)

Publish a message to a channel

push

Push manage on PubNub (Real-time Messaging)

Manage or list push notification channels for a device (APNS v2)

push

Push remove all on PubNub (Real-time Messaging)

Remove all push notification channels for a device (APNS v2)

remove

Remove user on PubNub (Real-time Messaging)

Remove a user (App Context)

set

Set channel on PubNub (Real-time Messaging)

Set or update a channel (App Context)

set

Set memberships on PubNub (Real-time Messaging)

Set or update memberships for a user (App Context)

set

Set user on PubNub (Real-time Messaging)

Set or update a user (App Context)

Connect PubNub (Real-time Messaging) to LangChain via MCP

Follow these steps to wire PubNub (Real-time Messaging) into LangChain. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.

01

Install dependencies

Run pip install langchain langchain-mcp-adapters langgraph langchain-openai
02

Replace the token

Replace [YOUR_TOKEN_HERE] with your Vinkius token
03

Run the agent

Save the code and run python agent.py
04

Explore tools

The agent discovers 31 tools from PubNub (Real-time Messaging) via MCP

Why Use LangChain with the PubNub (Real-time Messaging) MCP Server

LangChain provides unique advantages when paired with PubNub (Real-time Messaging) through the Model Context Protocol.

01

The largest ecosystem of integrations, chains, and agents. combine PubNub (Real-time Messaging) MCP tools with 500+ LangChain components

02

Agent architecture supports ReAct, Plan-and-Execute, and custom strategies with full MCP tool access at every step

03

LangSmith tracing gives you complete visibility into tool calls, latencies, and token usage for production debugging

04

Memory and conversation persistence let agents maintain context across PubNub (Real-time Messaging) queries for multi-turn workflows

PubNub (Real-time Messaging) + LangChain Use Cases

Practical scenarios where LangChain combined with the PubNub (Real-time Messaging) MCP Server delivers measurable value.

01

RAG with live data: combine PubNub (Real-time Messaging) tool results with vector store retrievals for answers grounded in both real-time and historical data

02

Autonomous research agents: LangChain agents query PubNub (Real-time Messaging), synthesize findings, and generate comprehensive research reports

03

Multi-tool orchestration: chain PubNub (Real-time Messaging) tools with web scrapers, databases, and calculators in a single agent run

04

Production monitoring: use LangSmith to trace every PubNub (Real-time Messaging) tool call, measure latency, and optimize your agent's performance

Example Prompts for PubNub (Real-time Messaging) in LangChain

Ready-to-use prompts you can give your LangChain agent to start working with PubNub (Real-time Messaging) immediately.

01

"Publish a message to the 'alerts' channel saying 'System update scheduled for midnight'."

02

"Get the last 5 messages from the 'support-chat' channel."

03

"Who is currently active in the 'lobby' channel?"

Troubleshooting PubNub (Real-time Messaging) MCP Server with LangChain

Common issues when connecting PubNub (Real-time Messaging) to LangChain through Vinkius, and how to resolve them.

01

MultiServerMCPClient not found

Install: pip install langchain-mcp-adapters

PubNub (Real-time Messaging) + LangChain FAQ

Common questions about integrating PubNub (Real-time Messaging) MCP Server with LangChain.

01

How does LangChain connect to MCP servers?

Use langchain-mcp-adapters to create an MCP client. LangChain discovers all tools and wraps them as native LangChain tools compatible with any agent type.
02

Which LangChain agent types work with MCP?

All agent types including ReAct, OpenAI Functions, and custom agents work with MCP tools. The tools appear as standard LangChain tools after the adapter wraps them.
03

Can I trace MCP tool calls in LangSmith?

Yes. All MCP tool invocations appear as traced steps in LangSmith, showing input parameters, response payloads, latency, and token usage.

Explore More MCP Servers

View all →