CrewAI
Connect Madgicx MCP to CrewAI agents using client credentials authentication.
CrewAI
Orchestrate AI agent crews with CrewAI that have access to all Madgicx MCP tools.
Prerequisites
- Python 3.10+
- Madgicx client credentials
- An LLM API key (e.g., OpenAI)
Installation
Setup
1. Configure environment variables
2. Add the auth helper
Copy the MadgicxConfidentialClientAuth helper into your project as auth.py. You can also create a custom auth handler if your setup requires different authentication logic.
3. Create the agent
How It Works
MadgicxConfidentialClientAuthobtains an access token using your client credentialsMCPServerAdapterconnects to the MCP server and discovers all available tools- Tools are converted to CrewAI-compatible
BaseToolinstances - The
Creworchestrates the agent to execute tasks using the MCP tools
CrewAI tool compatibility
CrewAI uses Pydantic for tool argument validation. If your LLM injects extra arguments (e.g., security_context), you may need to patch the tool schemas to ignore unknown fields. See the CrewAI GitHub issues for details.