Prerequisites
Before you can configure and use LangChain with Connect AI Embed, you must first do the following:- Generate an OAuth JWT bearer token. Copy this down, as it acts as your password during authentication.
- Obtain an OpenAI API key: https://platform.openai.com/.
- Make sure you have Python >= 3.10 in order to install the LangChain and LangGraph packages.
Create the Python Files
In
config.py, create a class Config to define your MCP server authentication and URL. Set MCP_AUTH to the OAuth JWT bearer token from the prerequisites: