Create powerful AI workflows by connecting multiple MCP servers including Close, Zendesk, Perplexity for enhanced automation capabilities in Klavis AI.
Close is a modern CRM platform built for sales teams, providing powerful lead management, contact organization, and sales pipeline tracking to help businesses close more deals
Zendesk is a customer service software company
Perplexity is an AI research assistant that provides accurate answers and cites sources
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"))
close_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.CLOSE,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
zendesk_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.ZENDESK,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
perplexity_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.PERPLEXITY,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
close_tools = await aget_tools_from_mcp_url(
close_mcp_instance.server_url,
client=BasicMCPClient(close_mcp_instance.server_url)
)
zendesk_tools = await aget_tools_from_mcp_url(
zendesk_mcp_instance.server_url,
client=BasicMCPClient(zendesk_mcp_instance.server_url)
)
perplexity_tools = await aget_tools_from_mcp_url(
perplexity_mcp_instance.server_url,
client=BasicMCPClient(perplexity_mcp_instance.server_url)
)
close_agent = FunctionAgent(
name="close_agent",
tools=close_tools,
llm=llm,
)
zendesk_agent = FunctionAgent(
name="zendesk_agent",
tools=zendesk_tools,
llm=llm,
)
perplexity_agent = FunctionAgent(
name="perplexity_agent",
tools=perplexity_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[close_agent, zendesk_agent, perplexity_agent],
root_agent="close_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