Create powerful AI workflows by connecting multiple MCP servers including Metabase, SendGrid for enhanced automation capabilities in Klavis AI.
Metabase is an open-source business intelligence tool. Create dashboards, run queries, visualize data, share insights, and manage collections via OpenAPI integration
SendGrid is a cloud-based email delivery platform. Send transactional and marketing emails, manage contacts, track email analytics, handle bounces, and manage templates via OpenAPI integration
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"))
metabase_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.METABASE,
user_id="1234",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
sendgrid_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.SENDGRID,
user_id="1234",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
metabase_tools = await aget_tools_from_mcp_url(
metabase_mcp_instance.server_url,
client=BasicMCPClient(metabase_mcp_instance.server_url)
)
sendgrid_tools = await aget_tools_from_mcp_url(
sendgrid_mcp_instance.server_url,
client=BasicMCPClient(sendgrid_mcp_instance.server_url)
)
metabase_agent = FunctionAgent(
name="metabase_agent",
tools=metabase_tools,
llm=llm,
)
sendgrid_agent = FunctionAgent(
name="sendgrid_agent",
tools=sendgrid_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[metabase_agent, sendgrid_agent],
root_agent="metabase_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