Skip to main content
This guide shows you how to connect your LangChain agent to Caylex using the langchain-mcp-adapters package.

Prerequisites

Installation

Full example

main.py

Step-by-step

1

Set environment variables

2

Create the MCP client

Use MultiServerMCPClient with the Caylex endpoint and headers. The "streamable_http" transport is recommended.
3

Create an agent with the tools

Pass the Caylex tools to LangGraph’s create_react_agent or any LangChain agent constructor.
4

Run the agent

Invoke the agent with a user message.

Further reading