CrewAI enables you to orchestrate multiple AI agents working together, and with the MCP Server Adapter, you can connect your crews to Observee’s powerful tool ecosystem. This integration allows you to build sophisticated multi-agent systems that leverage Observee’s tools for complex workflows.
Connect your CrewAI agents to Observee’s MCP server to access all available tools:
Copy
Ask AI
import osfrom dotenv import load_dotenvfrom crewai import Agent, Task, Crewfrom crewai_tools import MCPServerAdapter# Load environment variablesload_dotenv()# Streamable HTTP Server configuration for Observee# Replace {your_client_id} with your actual client ID from the Observee dashboardserver_params = { "url": "https://mcp.observee.ai/mcp?client_id={your_client_id}", "transport": "streamable-http", "headers": { "Authorization": "Bearer {observee_api_key}" # Replace with your API key }}# Example usagewith MCPServerAdapter(server_params) as mcp_tools: print(f"Available tools: {[tool.name for tool in mcp_tools]}") my_agent = Agent( role="MCP Tool User", goal="Utilize tools from an MCP server.", backstory="I can connect to MCP servers and use their tools.", tools=mcp_tools, # Pass the loaded tools to your agent reasoning=True, verbose=True ) # Create a task to check email email_task = Task( description="Check my latest email", expected_output="Details about the latest email including sender, subject, and a brief summary of the content", agent=my_agent ) # Create the crew crew = Crew( agents=[my_agent], tasks=[email_task], verbose=True ) # Execute the crew result = crew.kickoff() print("\n--- Result ---") print(result)