Create powerful AI workflows by connecting multiple MCP servers including Mixpanel, WordPress, LinkedIn for enhanced automation capabilities in Klavis AI.
Mixpanel is a powerful product analytics platform that helps teams understand user behavior, track events, analyze conversion funnels, measure retention, and make data-driven decisions with real-time insights and advanced segmentation capabilities
WordPress is an open-source content management system for building websites and blogs
LinkedIn is a business and employment-oriented online 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"))
mixpanel_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.MIXPANEL,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
wordpress_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.WORDPRESS,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
linkedin_mcp_instance = klavis_client.mcp_server.create_server_instance(
server_name=McpServerName.LINKEDIN,
user_id="1234",
platform_name="Klavis",
connection_type=ConnectionType.STREAMABLE_HTTP,
)
mixpanel_tools = await aget_tools_from_mcp_url(
mixpanel_mcp_instance.server_url,
client=BasicMCPClient(mixpanel_mcp_instance.server_url)
)
wordpress_tools = await aget_tools_from_mcp_url(
wordpress_mcp_instance.server_url,
client=BasicMCPClient(wordpress_mcp_instance.server_url)
)
linkedin_tools = await aget_tools_from_mcp_url(
linkedin_mcp_instance.server_url,
client=BasicMCPClient(linkedin_mcp_instance.server_url)
)
mixpanel_agent = FunctionAgent(
name="mixpanel_agent",
tools=mixpanel_tools,
llm=llm,
)
wordpress_agent = FunctionAgent(
name="wordpress_agent",
tools=wordpress_tools,
llm=llm,
)
linkedin_agent = FunctionAgent(
name="linkedin_agent",
tools=linkedin_tools,
llm=llm,
)
workflow = AgentWorkflow(
agents=[mixpanel_agent, wordpress_agent, linkedin_agent],
root_agent="mixpanel_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