Create powerful AI workflows by connecting multiple MCP servers including Google Sheets, Salesforce, Doc2markdown for enhanced automation capabilities in Klavis AI.
Google Sheets is a web-based spreadsheet application that allows users to create, edit, and collaborate on spreadsheets online
Salesforce is the world's leading customer relationship management (CRM) platform that helps businesses connect with customers, partners, and potential customers
Convert any file to markdown using markitdown
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"))
google_sheets_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.GOOGLE_SHEETS,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
salesforce_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.SALESFORCE,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
doc2markdown_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.DOC2MARKDOWN,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
google_sheets_tools = await aget_tools_from_mcp_url(
google_sheets_mcp_instance.server_url,
client=BasicMCPClient(google_sheets_mcp_instance.server_url)
)
salesforce_tools = await aget_tools_from_mcp_url(
salesforce_mcp_instance.server_url,
client=BasicMCPClient(salesforce_mcp_instance.server_url)
)
doc2markdown_tools = await aget_tools_from_mcp_url(
doc2markdown_mcp_instance.server_url,
client=BasicMCPClient(doc2markdown_mcp_instance.server_url)
)
google_sheets_agent = FunctionAgent(
name="google_sheets_agent",
tools=google_sheets_tools,
llm=llm,
)
salesforce_agent = FunctionAgent(
name="salesforce_agent",
tools=salesforce_tools,
llm=llm,
)
doc2markdown_agent = FunctionAgent(
name="doc2markdown_agent",
tools=doc2markdown_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[google_sheets_agent, salesforce_agent, doc2markdown_agent],
root_agent="google_sheets_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