Create powerful AI workflows by connecting multiple MCP servers including YouTube, Gong, Google Calendar for enhanced automation capabilities in Klavis AI.
Extract and convert YouTube video information to markdown format
Gong is a revenue intelligence platform that captures and analyzes all revenue-related interactions to help sales teams close more deals. It provides conversation analytics, deal insights, and sales performance tracking through call recordings and transcripts
Google Calendar is a time-management and scheduling calendar service
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"))
youtube_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.YOUTUBE,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
gong_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.GONG,
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,
)
youtube_tools = await aget_tools_from_mcp_url(
youtube_mcp_instance.server_url,
client=BasicMCPClient(youtube_mcp_instance.server_url)
)
gong_tools = await aget_tools_from_mcp_url(
gong_mcp_instance.server_url,
client=BasicMCPClient(gong_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)
)
youtube_agent = FunctionAgent(
name="youtube_agent",
tools=youtube_tools,
llm=llm,
)
gong_agent = FunctionAgent(
name="gong_agent",
tools=gong_tools,
llm=llm,
)
google_calendar_agent = FunctionAgent(
name="google_calendar_agent",
tools=google_calendar_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[youtube_agent, gong_agent, google_calendar_agent],
root_agent="youtube_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