Create powerful AI workflows by connecting multiple MCP servers including Attio, Google Calendar, Slack for enhanced automation capabilities in Klavis AI.
Attio is a next-generation CRM platform that helps teams build stronger relationships with their customers through powerful data management and automation
Google Calendar is a time-management and scheduling calendar service
Slack is a messaging app for business that connects people to the information they need
Follow these steps to connect LlamaIndex to these MCP servers
Sign up for KlavisAI to access our MCP server management platform.
Add your desired MCP servers to LlamaIndex and configure authentication settings.
Verify your connections work correctly and start using your enhanced AI capabilities.
import os
from klavis import Klavis
from klavis.types import McpServerName, ConnectionType
from llama_index.tools.mcp import (
BasicMCPClient,
get_tools_from_mcp_url,
aget_tools_from_mcp_url,
)
from llama_index.core.agent.workflow import FunctionAgent, AgentWorkflow
# Initialize clients
klavis_client = Klavis(api_key=os.getenv("KLAVIS_API_KEY"))
attio_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.ATTIO,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
google_calendar_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.GOOGLE_CALENDAR,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
slack_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.SLACK,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
attio_tools = await aget_tools_from_mcp_url(
attio_mcp_instance.server_url,
client=BasicMCPClient(attio_mcp_instance.server_url)
)
google_calendar_tools = await aget_tools_from_mcp_url(
google_calendar_mcp_instance.server_url,
client=BasicMCPClient(google_calendar_mcp_instance.server_url)
)
slack_tools = await aget_tools_from_mcp_url(
slack_mcp_instance.server_url,
client=BasicMCPClient(slack_mcp_instance.server_url)
)
attio_agent = FunctionAgent(
name="attio_agent",
tools=attio_tools,
llm=llm,
)
google_calendar_agent = FunctionAgent(
name="google_calendar_agent",
tools=google_calendar_tools,
llm=llm,
)
slack_agent = FunctionAgent(
name="slack_agent",
tools=slack_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[attio_agent, google_calendar_agent, slack_agent],
root_agent="attio_agent",
)
Everything you need to know about connecting to these MCP servers
Join developers who are already using KlavisAI to power their LlamaIndex applications with these MCP servers.
Start For Free