Connectto Postgres, OneDrive, Klavis ReportGen MCP Servers

Create powerful AI workflows by connecting multiple MCP servers including Postgres, OneDrive, Klavis ReportGen for enhanced automation capabilities in Klavis AI.

Postgres icon

Postgres

featured

PostgreSQL is a powerful, open source object-relational database system

Available Tools:

  • query
OneDrive icon

OneDrive

coming soon

OneDrive is a file hosting service and synchronization service operated by Microsoft

Klavis ReportGen icon

Klavis ReportGen

featured

Generate visually appealing JavaScript web reports from search queries with Klavis AI.

Available Tools:

  • generate_web_reports

Quick Setup Guide

Follow these steps to connect LlamaIndex to these MCP servers

1

Create Your Account

Sign up for KlavisAI to access our MCP server management platform.

2

Configure Connections

Add your desired MCP servers to LlamaIndex and configure authentication settings.

3

Test & Deploy

Verify your connections work correctly and start using your enhanced AI capabilities.

LlamaIndex + KlavisAI Integration Snippets

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"))

postgres_mcp_instance = klavis_client.mcp_server.create_server_instance(
    server_name=McpServerName.POSTGRES,
    user_id="1234",
    platform_name="Klavis",
    connection_type=ConnectionType.STREAMABLE_HTTP,
)

onedrive_mcp_instance = klavis_client.mcp_server.create_server_instance(
    server_name=McpServerName.ONEDRIVE,
    user_id="1234",
    platform_name="Klavis",
    connection_type=ConnectionType.STREAMABLE_HTTP,
)

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,
)
postgres_tools = await aget_tools_from_mcp_url(
    postgres_mcp_instance.server_url, 
    client=BasicMCPClient(postgres_mcp_instance.server_url)
)
onedrive_tools = await aget_tools_from_mcp_url(
    onedrive_mcp_instance.server_url, 
    client=BasicMCPClient(onedrive_mcp_instance.server_url)
)
klavis_reportgen_tools = await aget_tools_from_mcp_url(
    klavis_reportgen_mcp_instance.server_url, 
    client=BasicMCPClient(klavis_reportgen_mcp_instance.server_url)
)

postgres_agent = FunctionAgent(
    name="postgres_agent",
    tools=postgres_tools,
    llm=llm,
)

onedrive_agent = FunctionAgent(
    name="onedrive_agent",
    tools=onedrive_tools,
    llm=llm,
)

klavis_reportgen_agent = FunctionAgent(
    name="klavis_reportgen_agent",
    tools=klavis_reportgen_tools,
    llm=llm,
)
workflow = AgentWorkflow(
    agents=[postgres_agent, onedrive_agent, klavis_reportgen_agent],
    root_agent="postgres_agent",
)

Frequently Asked Questions

Everything you need to know about connecting to these MCP servers

Ready to Get Started?

Join developers who are already using KlavisAI to power their LlamaIndex applications with these MCP servers.

Start For Free