Skip to main content
Prerequisites Before you begin, create an account and get your API Key.

Getting started

Connect to Plai to create and manage Facebook, Instagram, and LinkedIn ad campaigns through AI agents.
  • API
  • UI
  • Open Source
1

Install the SDKs (optional)

pip install klavis
2

Create a Strata MCP Server with Plai

from klavis import Klavis
from klavis.types import McpServerName

klavis_client = Klavis(api_key="YOUR_API_KEY")

# Create a Strata MCP server with Plai
response = klavis_client.mcp_server.create_strata_server(
    servers=[McpServerName.PLAI],
    user_id="user123"
)

API Reference

Full Strata API endpoints
3

Authenticate with API Key

klavis_client.mcp_server.set_strata_auth(
    strata_id=response.strata_id,
    server_name=McpServerName.PLAI,
    auth_data={
        "api_key": "YOUR_PLAI_API_KEY"
    }
)
🎉 Your Plai MCP Server is ready! Once authentication is complete, you can use your MCP server URL with any MCP-compatible client.

Available Tools

With our progressive discovery approach, Klavis System is capable of enabling all tools for Plai. Please use the get_tools API for more details. If you find any tool that is missing, please reach out to contact@klavis.ai.

Next Steps