Create powerful AI workflows by connecting multiple MCP servers including Klavis ReportGen, Coinbase, Google Jobs for enhanced automation capabilities in Klavis AI.
Generate visually appealing JavaScript web reports from search queries with Klavis AI.
Coinbase is a secure online platform for buying, selling, transferring, and storing cryptocurrency. Access real-time prices, manage your portfolio, track transactions, and get detailed cryptocurrency information
Google Jobs is a comprehensive job search platform that aggregates listings from across the web. Search for jobs by location, company, employment type, and more, with detailed information about requirements, benefits, and application processes
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"))
klavis_reportgen_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.KLAVIS_REPORTGEN,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
coinbase_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.COINBASE,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
google_jobs_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.GOOGLE_JOBS,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
klavis_reportgen_tools = await aget_tools_from_mcp_url(
klavis_reportgen_mcp_instance.server_url,
client=BasicMCPClient(klavis_reportgen_mcp_instance.server_url)
)
coinbase_tools = await aget_tools_from_mcp_url(
coinbase_mcp_instance.server_url,
client=BasicMCPClient(coinbase_mcp_instance.server_url)
)
google_jobs_tools = await aget_tools_from_mcp_url(
google_jobs_mcp_instance.server_url,
client=BasicMCPClient(google_jobs_mcp_instance.server_url)
)
klavis_reportgen_agent = FunctionAgent(
name="klavis_reportgen_agent",
tools=klavis_reportgen_tools,
llm=llm,
)
coinbase_agent = FunctionAgent(
name="coinbase_agent",
tools=coinbase_tools,
llm=llm,
)
google_jobs_agent = FunctionAgent(
name="google_jobs_agent",
tools=google_jobs_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[klavis_reportgen_agent, coinbase_agent, google_jobs_agent],
root_agent="klavis_reportgen_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