Skip to content
OmniChannels.ai

AI assistants and agents

LangChain + OmniChannels.ai: messaging tools for your agents

Connect via MCPConnect via API & webhooksUpdated

In short

LangChain agents use OmniChannels.ai through our remote MCP server. With langchain-mcp-adapters, a MultiServerMCPClient entry using transport streamable_http, the URL https://mcp.broadnet.me/mcp and an Authorization header loads our send, template and delivery report tools for your agent. Alternatively, wrap specific REST API calls as your own tools, using our OpenAPI 3.1 spec for the exact fields.

What you can do

  • Delivery support agent with read tools only

    Load only the read tools so the agent can answer delivery questions but cannot send anything.

    Try asking

    “Build an agent that answers delivery questions using only read tools, and refuses any request to send a message.”

  • Notification agent with human approval

    Use a LangGraph interrupt before send tool calls so a person approves each message or batch.

    Try asking

    “Build a LangGraph agent that drafts WhatsApp order updates and pauses for human approval before calling any send tool.”

  • Template-aware sender

    The agent lists approved WhatsApp templates and fills variables, so business-initiated messages outside the 24-hour window use an approved template.

    Try asking

    “Write an agent that picks the right approved Arabic WhatsApp template for a delivery delay and sends it to 966500000000 with the new date.”

  • Narrow REST tools instead of MCP

    Wrap one or two REST operations as @tool functions when you want full control over fields, validation and logging.

    Try asking

    “Write a LangChain tool that sends a single SMS with POST /sms/sendSms, validates the number format, and reads BROADNET_TOKEN from the environment.”

  • Failure triage

    An agent reads delivery reports, groups failures by reason and suggests fixes from our errors guide.

    Try asking

    “Create an agent that reads yesterday's delivery reports, groups FAILED and REJECTED messages by reason and writes a short summary for the ops channel.”

How it connects

Connect via MCPConnect via API & webhooks

langchain-mcp-adapters converts MCP tools into LangChain tools. Configure a MultiServerMCPClient with a server entry that sets transport to streamable_http, the URL https://mcp.broadnet.me/mcp, and headers containing Authorization: Bearer with your token read from the environment, then call get_tools and pass the result to your agent. Newer LangChain releases also ship MCP support in the main package, so check LangChain's current documentation for the recommended import.

You choose which tools reach the model: filter the list by name so a support agent gets only read tools, and add an approval step before any send. If you prefer not to use MCP, write your own tools that call our REST API with a Bearer token; single SMS is JSON, while bulk and most other channel sends use multipart/form-data.

  • MCP: MultiServerMCPClient, transport streamable_http, Authorization header
  • Filter tools by name to give each agent least privilege
  • Add human approval before send tools, for example with a LangGraph interrupt
  • REST alternative: your own tools built from the OpenAPI 3.1 spec

Set it up

  1. 1

    Request API access

    Request test access and receive an API token. Test sends go only to your own verified numbers.

  2. 2

    Get a temporary key

    In the admin portal open Integrations, then MCP Integration, choose Get temporary key and set it as BROADNET_TOKEN.

    Guide: MCP server for AI agents
  3. 3

    Install the adapters

    Install langchain-mcp-adapters, or the MCP extra of LangChain if your version provides one, following LangChain's current documentation.

  4. 4

    Load the tools

    Create a MultiServerMCPClient entry with transport streamable_http, our URL and the Authorization header, then call get_tools.

    Guide: MCP server for AI agents
  5. 5

    Restrict and gate

    Pass only the tools the agent needs, and put a human approval step before any tool that sends.

  6. 6

    Test on your own number

    Run the agent against your verified number and check the delivery report before you widen access.

Vendor documentation

LangChain is a trademark of its owner. OmniChannels.ai is not affiliated with or endorsed by LangChain; this page describes a connection built with LangChain's own MCP, HTTP or webhook features.

Example workflow

How a typical request moves from LangChain to your customer and back.

  1. 01

    Your LangChain agent

    Python or JS agent with tools loaded via MCP

  2. 02

    OmniChannels.ai MCP server

    Send, template and delivery report tools

  3. 03

    Customer's phone

    WhatsApp, SMS or RCS message delivered

  4. 04

    Delivery report

    Read back by the agent or pushed to your webhook

1. Your LangChain agent: Python or JS agent with tools loaded via MCP 2. OmniChannels.ai MCP server: Send, template and delivery report tools 3. Customer's phone: WhatsApp, SMS or RCS message delivered 4. Delivery report: Read back by the agent or pushed to your webhook

Questions

Is there an official OmniChannels.ai package for LangChain?

No. LangChain connects through its generic MCP adapters, using our public endpoint and your API token, or through tools you write yourself against our REST API.

Should I use MCP tools or my own REST tools?

MCP gives the agent our full tool set with little code. Your own REST tools give tighter control over fields, validation and logging. Many teams start with MCP and replace the tools they rely on with narrow REST tools.

How do I stop the agent sending messages by mistake?

Give it only the tools it needs, filter out send tools for agents that only answer questions, and require human approval before any send. Use a temporary key and your own numbers while testing.

Can the agent read my CRM or order data through this server?

No. Our server only covers messaging, templates and delivery reports. Load your CRM or store data through its own LangChain tools or MCP server, and the agent combines them.

Get API and MCP access

Tell us your channels, countries and use case. An engineer issues test credentials and verifies your test numbers.