Prerequisites
Before you can configure and use CrewAI with Connect AI, you must do the following:- Connect a data source to your Connect AI account. See Sources for more information.
- OAuth JWT bearer token を生成します。PAT をコピーし、認証時にパスワードとして使用します。
- Obtain an OpenAI API key: https://platform.openai.com/.
- Make sure you have Python >= 3.10 in order to use the CrewAI tools.
Configure the Connect AI MCP Server
1
Create a folder named
cdata-mcp-crew-agent.2
Create a file with the extension
.env in the cdata-mcp-crew-agent folder.3
Copy and paste the content below. For Embedded Cloud, you do not need the
MCP_USERNAME and MCP_PASSWORD. Use the OAuth JWT token from the prerequisites to authenticate. Your OpenAI API key can be found at https://platform.openai.com/.Install the CrewAI Libraries
Runpip install crewai requests python-dotenv in your terminal.
Create and Run the CrewAI Agent
1
Create a file called
crew-agent.py. This is the CrewAI agent.2
Copy and paste the following, defining the agent’s tasks as desired:
Note: For Embedded Cloud, you do not need the
MCP_USERNAME or MCP_PASSWORD. Enter your OAuth JWT credentials in auth_header.3
Run 
python crew-agent.py in the terminal. The output displays the results of the task: