How to integrate ActiveTrail MCP with Vercel AI SDK v6

Connect Vercel AI SDK v6 to ActiveTrail MCP. Create a new email campaign for vip subscribers, add a contact to the 'newsletter' list, and more using natural language, with authentication handled for you.

ActiveTrail logoActiveTrail
Api Key

ActiveTrail is a user-friendly email marketing and automation platform. It helps you reach subscribers and automate campaigns with ease.

159 Tools

Introduction

This guide walks you through connecting ActiveTrail to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working ActiveTrail agent that can create a new email campaign for vip subscribers, add a contact to the 'newsletter' list, get open rates for last week's campaigns through natural language commands.

This guide will help you understand how to give your Vercel AI SDK agent real control over a ActiveTrail account through Composio's ActiveTrail MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate ActiveTrail with

TL;DR

Here's what you'll learn:
  • How to set up and configure a Vercel AI SDK agent with ActiveTrail integration
  • Using Composio's Tool Router to dynamically load and access ActiveTrail tools
  • Creating an MCP client connection using HTTP transport
  • Building an interactive CLI chat interface with conversation history management
  • Handling tool calls and results within the Vercel AI SDK framework

What is Vercel AI SDK?

The Vercel AI SDK is a TypeScript library for building AI-powered applications. It provides tools for creating agents that can use external services and maintain conversation state.

Key features include:

  • streamText: Core function for streaming responses with real-time tool support
  • MCP Client: Built-in support for Model Context Protocol via @ai-sdk/mcp
  • Step Counting: Control multi-step tool execution with stopWhen: stepCountIs()
  • OpenAI Provider: Native integration with OpenAI models

What is the ActiveTrail MCP server, and what's possible with it?

The ActiveTrail MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your ActiveTrail account. It provides structured and secure access to your contacts, campaigns, automations, and performance reports, so your agent can manage audiences, create campaigns, send messages, review results, and track automation journeys on your behalf.

  • Contact and audience management: Have your agent create, update, import, or remove contacts, then organize them with groups, mailing lists, and segmentations.
  • Email and SMS campaigns: Direct your agent to create or update email campaigns, send campaigns to selected contacts, and prepare SMS campaigns.
  • Operational email delivery: Instruct your agent to send transactional or operational emails through your ActiveTrail account.
  • Campaign reporting: Let the agent retrieve performance reports for email, SMS, and push campaigns, including an overview of your email campaign results.
  • Automation and marketing resources: Have your agent review automations and contact journey logs, or retrieve templates, signup forms, content categories, and segmentation rule options.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Step by step09 STEPS
1

Prerequisites

Before you begin, make sure you have:
  • Node.js and npm installed
  • A Composio account with API key
  • An OpenAI API key
2

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
  • Keep the API key safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Navigate to your API settings and generate a new API key.
  • Store this key securely as you'll need it for authentication.
3

Install required dependencies

bash
npm install @ai-sdk/openai @ai-sdk/mcp @composio/core ai dotenv

First, install the necessary packages for your project.

What you're installing:

  • @ai-sdk/openai: Vercel AI SDK's OpenAI provider
  • @ai-sdk/mcp: MCP client for Vercel AI SDK
  • @composio/core: Composio SDK for tool integration
  • ai: Core Vercel AI SDK
  • dotenv: Environment variable management
4

Set up environment variables

bash
OPENAI_API_KEY=your_openai_api_key_here
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_user_id_here

Create a .env file in your project root.

What's needed:

  • OPENAI_API_KEY: Your OpenAI API key for GPT model access
  • COMPOSIO_API_KEY: Your Composio API key for tool access
  • COMPOSIO_USER_ID: A unique identifier for the user session
5

Import required modules and validate environment

typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});
What's happening:
  • We're importing all necessary libraries including Vercel AI SDK's OpenAI provider and Composio
  • The dotenv/config import automatically loads environment variables
  • The MCP client import enables connection to Composio's tool server
6

Create Tool Router session and initialize MCP client

typescript
async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["active_trail"],
  });

  const mcpUrl = session.mcp.url;
What's happening:
  • We're creating a Tool Router session that gives your agent access to ActiveTrail tools
  • The create method takes the user ID and specifies which toolkits should be available
  • The returned mcp object contains the URL and authentication headers needed to connect to the MCP server
  • This session provides access to all ActiveTrail-related tools through the MCP protocol
7

Connect to MCP server and retrieve tools

typescript
const mcpClient = await createMCPClient({
  transport: {
    type: "http",
    url: mcpUrl,
    headers: session.mcp.headers, // Authentication headers for the Composio MCP server
  },
});

const tools = await mcpClient.tools();
What's happening:
  • We're creating an MCP client that connects to our Composio Tool Router session via HTTP
  • The mcp.url provides the endpoint, and mcp.headers contains authentication credentials
  • The type: "http" is important - Composio requires HTTP transport
  • tools() retrieves all available ActiveTrail tools that the agent can use
8

Initialize conversation and CLI interface

typescript
let messages: ModelMessage[] = [];

console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log(
  "Ask any questions related to active_trail, like summarize my last 5 emails, send an email, etc... :)))\n",
);

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  prompt: "> ",
});

rl.prompt();
What's happening:
  • We initialize an empty messages array to maintain conversation history
  • A readline interface is created to accept user input from the command line
  • Instructions are displayed to guide the user on how to interact with the agent
9

Handle user input and stream responses with real-time tool feedback

typescript
rl.on("line", async (userInput: string) => {
  const trimmedInput = userInput.trim();

  if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
    console.log("\nGoodbye!");
    rl.close();
    process.exit(0);
  }

  if (!trimmedInput) {
    rl.prompt();
    return;
  }

  messages.push({ role: "user", content: trimmedInput });
  console.log("\nAgent is thinking...\n");

  try {
    const stream = streamText({
      model: openai("gpt-5"),
      messages,
      tools,
      toolChoice: "auto",
      stopWhen: stepCountIs(10),
      onStepFinish: (step) => {
        for (const toolCall of step.toolCalls) {
          console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
What's happening:
  • We use streamText instead of generateText to stream responses in real-time
  • toolChoice: "auto" allows the model to decide when to use ActiveTrail tools
  • stopWhen: stepCountIs(10) allows up to 10 steps for complex multi-tool operations
  • onStepFinish callback displays which tools are being used in real-time
  • We iterate through the text stream to create a typewriter effect as the agent responds
  • The complete response is added to conversation history to maintain context
  • Errors are caught and displayed with helpful retry suggestions

Complete Code

Here's the complete code to get you started with ActiveTrail and Vercel AI SDK:

typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});

async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["active_trail"],
  });

  const mcpUrl = session.mcp.url;

  const mcpClient = await createMCPClient({
    transport: {
      type: "http",
      url: mcpUrl,
      headers: session.mcp.headers, // Authentication headers for the Composio MCP server
    },
  });

  const tools = await mcpClient.tools();

  let messages: ModelMessage[] = [];

  console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
  console.log(
    "Ask any questions related to active_trail, like summarize my last 5 emails, send an email, etc... :)))\n",
  );

  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: "> ",
  });

  rl.prompt();

  rl.on("line", async (userInput: string) => {
    const trimmedInput = userInput.trim();

    if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
      console.log("\nGoodbye!");
      rl.close();
      process.exit(0);
    }

    if (!trimmedInput) {
      rl.prompt();
      return;
    }

    messages.push({ role: "user", content: trimmedInput });
    console.log("\nAgent is thinking...\n");

    try {
      const stream = streamText({
        model: openai("gpt-5"),
        messages,
        tools,
        toolChoice: "auto",
        stopWhen: stepCountIs(10),
        onStepFinish: (step) => {
          for (const toolCall of step.toolCalls) {
            console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});

Conclusion

You've successfully built a ActiveTrail agent using the Vercel AI SDK with streaming capabilities! This implementation provides a powerful foundation for building AI applications with natural language interfaces and real-time feedback.

Key features of this implementation:

  • Real-time streaming responses for a better user experience with typewriter effect
  • Live tool execution feedback showing which tools are being used as the agent works
  • Dynamic tool loading through Composio's Tool Router with secure authentication
  • Multi-step tool execution with configurable step limits (up to 10 steps)
  • Comprehensive error handling for robust agent execution
  • Conversation history maintenance for context-aware responses

You can extend this further by adding custom error handling, implementing specific business logic, or integrating additional Composio toolkits to create multi-app workflows.
TOOLS

Supported Tools

Every ActiveTrail action and event your agent gets out of the box.

Add Group Member

Tool to add a member to a group in ActiveTrail.

Add Mailing List Member

Tool to add a member to a mailing list in ActiveTrail.

Get Contact Growth

Retrieves daily contact growth statistics showing active (subscribed) and inactive (unsubscribed) contact counts over a specified date range.

Create a New Group

Creates a new contact group in ActiveTrail for organizing and segmenting contacts.

Create Campaign

Tool to create a new email campaign in ActiveTrail.

Create Campaign for Contacts

Tool to create and send a new campaign to specific contacts in ActiveTrail.

Create Contact

Creates a new contact in ActiveTrail with the provided information.

Create Content Category

Tool to create a new content category in ActiveTrail account.

Create New Mailing List

Tool to create a new mailing list in ActiveTrail.

Create Order

Tool to create new orders in ActiveTrail commerce system.

Create Segmentation

Create a new contact segmentation in ActiveTrail.

Create Smart Code Site

Creates a new Smart Code tracking site in ActiveTrail.

Create SMS Campaign

Tool to create a new SMS campaign in ActiveTrail.

Create SMS Operational Message

Tool to create a new operational SMS transactional message.

Create Webhook

Create a new webhook for event notifications in ActiveTrail.

Delete content category

Tool to delete a specific content category by ID.

Delete group member

Tool to delete a group member by ID.

Delete Automations

Tool to delete one or more automations from Active Trail.

Delete Campaign

Tool to remove a campaign from ActiveTrail account.

Delete Contact

Tool to permanently remove a contact from the ActiveTrail account by their unique contact ID.

Delete group by ID

Tool to delete a group by ID.

Delete Mailing List

Tool to permanently remove a mailing list from the ActiveTrail account by its unique ID.

Delete Smart Code Site

Tool to remove a Smart Code site from ActiveTrail.

Delete Template

Tool to remove a template from ActiveTrail account.

Delete template category

Tool to delete a template category by ID.

Delete Webhook

Tool to remove a webhook from ActiveTrail account by its ID.

Delete webhook parameter

Removes a specific parameter from a webhook configuration in ActiveTrail.

Get Account Balance

Tool to retrieve email and SMS credit balance for the account.

Get specific content category

Tool to retrieve specific category details by ID.

Get ActiveCommerce Integration Data

Retrieves the account's ActiveCommerce integration configuration data including mailing list and group associations.

Get Account Merge Status

Check if the ActiveTrail account has any pending account merge operations.

Get All Campaign Reports

Tool to retrieve a full overview of all campaign reports with comprehensive metrics.

Get All Groups

Tool to retrieve the full list of account groups with pagination and filtering.

Get All Sent Campaigns

Tool to retrieve campaigns with optional filtering by date, mailing list, and search criteria.

Get Automation Log

Tool to track contacts through automation journey by retrieving detailed logs.

Get Automation Queue Logs

Tool to retrieve contacts that did not finish a specific automation.

Get Automation SMS Campaign Summary Report

Tool to retrieve SMS campaigns' summary reports for a specific automation.

Get Automation Email Campaign Summary Report

Tool to retrieve email campaigns' summary reports for a specific automation.

Get Automations

Tool to list account automations with filtering and pagination.

Get Automation Details

Tool to retrieve detailed configuration of a specific automation excluding step-by-step execution details.

Get Automation Email Campaign Steps

Tool to retrieve all email campaign steps in an automation workflow.

Get Automation SMS Campaign Steps

Tool to retrieve all SMS campaign steps in an automation workflow.

Get Automation Trigger Types

Tool to retrieve all available start trigger options for automations.

Get Campaign Bounces

Tool to retrieve bounce details by domain for a specific campaign.

Get Campaign Click-Through Data

Retrieves detailed click-through data for all links in a campaign or optionally for a specific link.

Get Campaign Design

Tool to retrieve campaign design configuration including visual layout and HTML content.

Get Campaign Domains Report

Tool to retrieve a report by domain for a specific campaign.

Get Campaign Opens

Tool to retrieve contacts who opened a specific campaign email.

Get Campaign Report

Retrieves comprehensive performance metrics for a specific email campaign by its ID.

Get Campaign Bounced Emails by Type

Tool to retrieve bounced email details filtered by bounce type for a specific campaign.

Get Campaign Spam Complaints

Tool to retrieve contacts who reported a specific campaign as spam.

Get Campaign Email Activity Report

Tool to retrieve all contacts' activity on a specific campaign.

Get Campaign Sent Emails

Tool to retrieve contacts who received a specific campaign email.

Get Campaign Unopened Contacts

Tool to retrieve contacts who did not open a specific campaign.

Get Campaign Scheduling

Retrieves the scheduling configuration for a specific email campaign, including send status and scheduled datetime.

Get Campaign by ID

Tool to retrieve complete campaign information including send settings, design, template, and A/B test configuration.

Get Campaign Details

Tool to retrieve detailed campaign information including name, subject, and settings.

Get Campaign Segment Settings

Tool to retrieve campaign sending settings including target groups and sending restrictions.

Get Sent Campaigns

Tool to retrieve a list of all sent campaigns from ActiveTrail.

Get Campaign Template

Retrieves template details (design, content, subject line, sender info) for a specific email campaign.

Get Campaign Unsubscribed Contacts

Retrieves the list of contacts who unsubscribed from a specific email campaign.

Get Commerce Schema

Tool to retrieve order fields schema information from the ActiveTrail commerce API.

Get Contact Activity

Tool to retrieve contact's email engagement history including opens and clicks.

Get Contact Details

Tool to retrieve complete details of a specific contact by their ID.

Get Contact Fields

Tool to retrieve account contact fields filtered by type.

Get Contact Groups

Tool to retrieve all groups associated with a specific contact.

Get Contact List

Tool to retrieve account contacts filtered by status and date range.

Get Contact's Errors

Tool to retrieve bounce and error history for a specific contact.

Get Contact's Mailing Lists

Tool to retrieve all mailing lists associated with a specific contact.

Get Contacts Merges

Tool to retrieve contacts experiencing merge conflicts with filtering options.

Get Contact SMS Statistics

Tool to retrieve contact interaction statistics for a specific transactional SMS.

Get Contact's Statistics for Campaign

Tool to retrieve contact's interaction statistics for a specific campaign.

Get Contacts Subscription All Contacts

Tool to get contacts' subscription status and the source of their status (if known).

Get Contacts Subscription Status

Get daily breakdown of contact status statistics over a date range.

Get Contacts Subscription Subscribers

Tool to retrieve all contacts who subscribed and the source of their subscription status.

Get Contacts Subscription Unsubscribers

Tool to retrieve all contacts who unsubscribed and the source of their unsubscription status.

Get Contacts Unsubscribers SMS

Tool to retrieve all contacts who unsubscribed from receiving SMS messages.

Get Contacts With SMS State

Tool to retrieve account's contacts list with SMS subscription state.

Get Content Categories

Tool to retrieve all content categories from the ActiveTrail account.

Get Customer Stats for Transactional Message

Tool to retrieve customer interaction statistics for a specific transactional message.

Get Executive Report

Retrieve executive performance report for the ActiveTrail account, providing email marketing metrics over the past 12 months.

Get External Schema

Tool to retrieve contact field schema information for the account.

Get Group Details

Tool to retrieve detailed information about a specific group by its unique identifier.

Get Group Contents by ID

Tool to retrieve all group members by group ID with pagination and filtering.

Get Group Events

Tool to retrieve all events for a specific group with optional filtering by event type, event date, and subscriber creation date.

Get Landing Pages

Tool to retrieve landing pages from the ActiveTrail account with pagination support.

Get Mailing List

Tool to retrieve basic information about a specific mailing list by its unique identifier.

Get Mailing List Members

Tool to retrieve all members belonging to a specific mailing list.

Get Mailing Lists

Tool to retrieve all mailing lists from the ActiveTrail account.

Get Order

Tool to retrieve complete details of a specific order from ActiveTrail commerce system.

Get Push Campaign Opens

Retrieves a list of contacts who opened a specific push notification campaign, including contact details and when they opened the notification.

Get Push Campaign Delivered Report

Tool to retrieve contacts who successfully received a specific push notification campaign.

Get Push Campaign Failed Delivery Report

Tool to retrieve the failed delivery report for a specific push campaign.

Get Push Campaign Reports

Retrieves push notification campaign performance metrics and reports filtered by date range, send type, or search term.

Get Push Campaign Sent Report

Tool to retrieve the list of contacts who were sent a specific push notification campaign, including contact details, device types, and sent timestamps.

Get Push Campaign Report Summary

Tool to retrieve aggregated summary statistics for push notification campaigns filtered by date range.

Get Push Campaigns

Tool to retrieve push notification campaigns with optional filtering by date, campaign ID, and search criteria.

Get Segmentation Rule Field Types

Retrieve a reference dictionary of all available field types that can be used in segmentation rules for ActiveTrail automation.

Get Segmentation Rule Operations

Retrieves available rule operations for segmentation by field type.

Get Segmentation Rule Types

Tool to retrieve available segmentation rule types for automation.

Get Segmentation Rule Types Mapping

Tool to retrieve the complete mapping of segmentation rule types with their associated field types and operations from ActiveTrail.

Get Segmentations

Retrieve all contact segmentations from your ActiveTrail account.

Get Sending Profiles

Tool to retrieve account email sending profiles.

Get Signup Forms

Tool to retrieve all signup forms from the ActiveTrail account.

Get Smart Code Sites

Retrieves all Smart Code tracking sites configured in the ActiveTrail account.

Get SMS Campaign by ID

Tool to retrieve detailed information about a specific SMS campaign by its unique identifier.

Get SMS Campaign Clickers

Retrieve contacts who clicked links in an SMS campaign with detailed click analytics.

Get SMS Campaign Delivered Report

Tool to retrieve delivery confirmations for a specific SMS campaign.

Get SMS Campaign Estimate

Tool to calculate the estimated number of messages for a given SMS campaign.

Get SMS Campaign Report

Tool to retrieve summary report for a specific SMS campaign by ID.

Get SMS Campaign Report Clicks

Tool to retrieve detailed click event data for links in SMS campaigns.

Get SMS Campaign Failed Delivery Report

Tool to retrieve the failed delivery report for a specific SMS campaign.

Get SMS Campaign Reports

Tool to retrieve SMS campaign performance metrics and reports with filtering options.

Get SMS Campaign Sent Contacts Report

Tool to retrieve all contacts that an SMS campaign was sent to.

Get SMS Campaign Report Summary

Retrieve aggregate summary metrics for SMS campaigns across a filtered date range.

Get SMS Campaign Unsubscribed Contacts

Tool to retrieve contacts who unsubscribed from a specific SMS campaign.

Get SMS Sending Profiles

Tool to retrieve SMS sending profiles configured for the account.

Get Template

Tool to retrieve detailed information about a specific template from the account's saved templates.

Get Template Content

Tool to retrieve HTML content of a specific template.

Get Templates

Tool to retrieve saved templates from the ActiveTrail account.

Get Template Categories

Tool to retrieve all template categories from 'my templates' section.

Get Transactional Messages Classification

Tool to retrieve all classification options for operational/transactional messages.

Get Transactional SMS Message

Tool to retrieve detailed information about a specific transactional SMS message by its unique identifier.

Get Two-Way SMS Replies

Tool to retrieve virtual number SMS replies with filtering options.

Get Automation Update Actions

Retrieves all available update action types that can be applied to contacts within automation workflows.

Get User Social Accounts

Retrieve social media accounts (Facebook, Instagram, etc.

Get Webhook by ID

Tool to retrieve detailed information about a specific webhook by its unique identifier.

Get Webhooks

Tool to list account webhooks with optional filtering.

Get Webhook Parameters

Retrieves custom parameters configured for a specific webhook.

Import New Contacts

Tool to import new contacts into a group in ActiveTrail.

List SMS Campaigns

Tool to retrieve SMS campaigns with optional filtering by date, search term, and type.

List Transactional SMS Messages

Tool to retrieve all SMS transactional messages with pagination support.

Create Campaign from Template

Creates a new email campaign from an existing template.

Create Template Category

Tool to create a new template category in ActiveTrail.

Add Webhook Parameter

Tool to add a new parameter to an existing webhook in your ActiveTrail account.

Send Test Webhook Request

Tool to send a test webhook request with configurable URL and parameters.

Update content category

Tool to update a specific content category by ID.

Update Campaign Segment Settings

Tool to update campaign sending settings including groups and sending restrictions.

Remove Contact from Mailing List

Removes a specific contact from a mailing list in ActiveTrail.

Remove external contacts from group

Tool to remove contacts from a group via external ID.

Send Operational Message

Tool to send operational email messages to individual recipients (limited to 500 messages per request).

Send Operational Message Email

Tool to send transactional/operational email messages via ActiveTrail.

Test Webhook

Send a test request to a configured webhook to verify it's working correctly.

Update Campaign

Tool to update draft campaigns in ActiveTrail.

Update Campaign Design

Tool to update the design and HTML content of an email campaign in ActiveTrail.

Update Campaign Scheduling

Tool to configure send schedule for draft campaigns.

Update Campaign Details

Updates an email campaign's core details including name, subject line, sender profile, category, and delivery settings.

Update Campaign Template

Tool to update the template associated with an email campaign in ActiveTrail.

Update Contact

Tool to update an existing contact's information by ID.

Update Group

Updates an existing group in ActiveTrail by its ID.

Update Order

Updates an existing order in the ActiveTrail commerce system.

Update Segmentation

Tool to update an existing segmentation's name and/or rules by its ID.

Update Smart Code Site

Updates an existing Smart Code tracking site in ActiveTrail.

Update SMS Operational Message

Tool to update an operational SMS transactional message by ID.

Update Template

Tool to update an existing email template in ActiveTrail account.

Update Template Category

Tool to update an existing template category in ActiveTrail.

Update Template Content

Tool to update the HTML content of an email template in ActiveTrail.

Update Webhook

Tool to update an existing webhook configuration in ActiveTrail.

Update Webhook Parameter

Tool to update an existing webhook parameter in your ActiveTrail account.

FAQ

Frequently asked questions

With a standalone ActiveTrail MCP server, the agents and LLMs can only access a fixed set of ActiveTrail tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from ActiveTrail and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Vercel AI SDK v6 fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right ActiveTrail tools.

Yes, absolutely. You can configure which ActiveTrail scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your ActiveTrail data and credentials are handled as safely as possible.

Start with ActiveTrail.It takes 30 seconds.

Managed auth, hosted MCP servers, and every ActiveTrail tool your agent needs.Free to start.

Start building