---
title: "LangChain + OmniChannels.ai: messaging tools for your agents"
description: "Load OmniChannels.ai MCP tools into a LangChain agent with langchain-mcp-adapters, or wrap our REST API as a tool, to send WhatsApp and SMS and read reports."
canonical: "https://omnichannels.ai/integrations/langchain/"
language: "en"
updated: "2026-10-10"
publisher: "BroadNet Technologies"
brand: "OmniChannels.ai"
---

# LangChain + OmniChannels.ai: messaging tools for your agents

Canonical: https://omnichannels.ai/integrations/langchain/
Language: en
Publisher: OmniChannels.ai by BroadNet Technologies

**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.

Connect via MCP · Connect via API & webhooks

## 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

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. **Request API access:** Request test access and receive an API token. Test sends go only to your own verified numbers.
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: https://omnichannels.ai/developers/mcp/)
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. **Load the tools:** Create a MultiServerMCPClient entry with transport streamable_http, our URL and the Authorization header, then call get_tools. (Guide: https://omnichannels.ai/developers/mcp/)
5. **Restrict and gate:** Pass only the tools the agent needs, and put a human approval step before any tool that sends.
6. **Test on your own number:** Run the agent against your verified number and check the delivery report before you widen access.

## Example workflow

Your LangChain agent (Python or JS agent with tools loaded via MCP) → OmniChannels.ai MCP server (Send, template and delivery report tools) → Customer's phone (WhatsApp, SMS or RCS message delivered) → 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.

## Developer guides

- https://omnichannels.ai/developers/mcp/
- https://omnichannels.ai/developers/openapi/
- https://omnichannels.ai/developers/authentication/
- https://omnichannels.ai/developers/webhooks/

## Vendor documentation

- [langchain-mcp-adapters on GitHub](https://github.com/langchain-ai/langchain-mcp-adapters)
- [Model Context Protocol (MCP) — LangChain documentation](https://docs.langchain.com/oss/python/langchain/mcp)

## Related integrations

- https://omnichannels.ai/integrations/llamaindex/
- https://omnichannels.ai/integrations/claude-code/
- https://omnichannels.ai/integrations/vs-code/
- https://omnichannels.ai/integrations/n8n/

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.

Updated: 2026-10-10