How to integrate Gleap MCP with Mastra AI

This guide walks you through connecting Gleap to Mastra AI using the Composio tool router. By the end, you'll have a working Gleap agent that can archive resolved support tickets from last week, send a chat message to follow up on feedback, list all articles in the onboarding collection through natural language commands. This guide will help you understand how to give your Mastra AI agent real control over a Gleap account through Composio's Gleap MCP server. Before we dive in, let's take a quick look at the key ideas and tools involved.

Gleap logoGleap
Api Key

Gleap is an all-in-one customer feedback tool for apps and websites. It helps you understand user pain points and improve software through direct, actionable insights.

179 Tools

Introduction

This guide walks you through connecting Gleap to Mastra AI using the Composio tool router. By the end, you'll have a working Gleap agent that can archive resolved support tickets from last week, send a chat message to follow up on feedback, list all articles in the onboarding collection through natural language commands.

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

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

Also integrate Gleap with

TL;DR

Here's what you'll learn:
  • Set up your environment so Mastra, OpenAI, and Composio work together
  • Create a Tool Router session in Composio that exposes Gleap tools
  • Connect Mastra's MCP client to the Composio generated MCP URL
  • Fetch Gleap tool definitions and attach them as a toolset
  • Build a Mastra agent that can reason, call tools, and return structured results
  • Run an interactive CLI where you can chat with your Gleap agent

What is Mastra AI?

Mastra AI is a TypeScript framework for building AI agents with tool support. It provides a clean API for creating agents that can use external services through MCP.

Key features include:

  • MCP Client: Built-in support for Model Context Protocol servers
  • Toolsets: Organize tools into logical groups
  • Step Callbacks: Monitor and debug agent execution
  • OpenAI Integration: Works with OpenAI models via @ai-sdk/openai

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

The Gleap MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Gleap account. It provides structured and secure access to your customer feedback data, so your agent can perform actions like managing support tickets, communicating with users, organizing help center content, and handling team workflows on your behalf.

  • Ticket creation and management: Instantly create new support tickets, archive resolved issues, or retrieve existing tickets to streamline customer support workflows.
  • Chat and user communication: Allow your agent to send new chat messages or fetch entire chat histories, making it easy to keep conversations going with users.
  • Help center organization: Create collections or retrieve articles in your help center, enabling your agent to help manage and organize your knowledge base content efficiently.
  • Team and user administration: Add new teams for ticket assignment or remove users from projects, so you can stay on top of team management tasks without lifting a finger.
  • Checklist and engagement tracking: Fetch detailed checklists to monitor user engagement or onboarding progress, giving your agent context to provide personalized support.

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 starting, make sure you have:
  • Node.js 18 or higher
  • A Composio account with an active API key
  • An OpenAI API key
  • Basic familiarity with TypeScript
2

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key.
  • You need credits or a connected billing setup to use the models.
  • Store the key somewhere safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Go to Settings and copy your API key.
  • This key lets your Mastra agent talk to Composio and reach Gleap through MCP.
3

Install dependencies

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

Install the required packages.

What's happening:

  • @composio/core is the Composio SDK for creating MCP sessions
  • @mastra/core provides the Agent class
  • @mastra/mcp is Mastra's MCP client
  • @ai-sdk/openai is the model wrapper for OpenAI
  • dotenv loads environment variables from .env
4

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_user_id_here
OPENAI_API_KEY=your_openai_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates your requests to Composio
  • COMPOSIO_USER_ID tells Composio which user this session belongs to
  • OPENAI_API_KEY lets the Mastra agent call OpenAI models
5

Import libraries and validate environment

typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Agent } from "@mastra/core/agent";
import { MCPClient } from "@mastra/mcp";
import { Composio } from "@composio/core";
import * as readline from "readline";

import type { AiMessageType } from "@mastra/core/agent";

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

if (!openaiAPIKey) 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 as string,
});
What's happening:
  • dotenv/config auto loads your .env so process.env.* is available
  • openai gives you a Mastra compatible model wrapper
  • Agent is the Mastra agent that will call tools and produce answers
  • MCPClient connects Mastra to your Composio MCP server
  • Composio is used to create a Tool Router session
6

Create a Tool Router session for Gleap

typescript
async function main() {
  const session = await composio.create(
    composioUserID as string,
    {
      toolkits: ["gleap"],
    },
  );

  const composioMCPUrl = session.mcp.url;
  console.log("Gleap MCP URL:", composioMCPUrl);
What's happening:
  • create spins up a short-lived MCP HTTP endpoint for this user
  • The toolkits array contains "gleap" for Gleap access
  • session.mcp.url is the MCP URL that Mastra's MCPClient will connect to
7

Configure Mastra MCP client and fetch tools

typescript
const mcpClient = new MCPClient({
    id: composioUserID as string,
    servers: {
      nasdaq: {
        url: new URL(composioMCPUrl),
        requestInit: {
          headers: session.mcp.headers,
        },
      },
    },
    timeout: 30_000,
  });

console.log("Fetching MCP tools from Composio...");
const composioTools = await mcpClient.getTools();
console.log("Number of tools:", Object.keys(composioTools).length);
What's happening:
  • MCPClient takes an id for this client and a list of MCP servers
  • The headers property includes the x-api-key for authentication
  • getTools fetches the tool definitions exposed by the Gleap toolkit
8

Create the Mastra agent

typescript
const agent = new Agent({
    name: "gleap-mastra-agent",
    instructions: "You are an AI agent with Gleap tools via Composio.",
    model: "openai/gpt-5",
  });
What's happening:
  • Agent is the core Mastra agent
  • name is just an identifier for logging and debugging
  • instructions guide the agent to use tools instead of only answering in natural language
  • model uses openai("gpt-5") to configure the underlying LLM
9

Set up interactive chat interface

typescript
let messages: AiMessageType[] = [];

console.log("Chat started! Type 'exit' or 'quit' to end.\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({
    id: crypto.randomUUID(),
    role: "user",
    content: trimmedInput,
  });

  console.log("\nAgent is thinking...\n");

  try {
    const response = await agent.generate(messages, {
      toolsets: {
        gleap: composioTools,
      },
      maxSteps: 8,
    });

    const { text } = response;

    if (text && text.trim().length > 0) {
      console.log(`Agent: ${text}\n`);
        messages.push({
          id: crypto.randomUUID(),
          role: "assistant",
          content: text,
        });
      }
    } catch (error) {
      console.error("\nError:", error);
    }

    rl.prompt();
  });

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

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
What's happening:
  • messages keeps the full conversation history in Mastra's expected format
  • agent.generate runs the agent with conversation history and Gleap toolsets
  • maxSteps limits how many tool calls the agent can take in a single run
  • onStepFinish is a hook that prints intermediate steps for debugging

Complete Code

Here's the complete code to get you started with Gleap and Mastra AI:

typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Agent } from "@mastra/core/agent";
import { MCPClient } from "@mastra/mcp";
import { Composio } from "@composio/core";
import * as readline from "readline";

import type { AiMessageType } from "@mastra/core/agent";

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

if (!openaiAPIKey) 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 as string });

async function main() {
  const session = await composio.create(composioUserID as string, {
    toolkits: ["gleap"],
  });

  const composioMCPUrl = session.mcp.url;

  const mcpClient = new MCPClient({
    id: composioUserID as string,
    servers: {
      gleap: {
        url: new URL(composioMCPUrl),
        requestInit: {
          headers: session.mcp.headers,
        },
      },
    },
    timeout: 30_000,
  });

  const composioTools = await mcpClient.getTools();

  const agent = new Agent({
    name: "gleap-mastra-agent",
    instructions: "You are an AI agent with Gleap tools via Composio.",
    model: "openai/gpt-5",
  });

  let messages: AiMessageType[] = [];

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

  rl.prompt();

  rl.on("line", async (input: string) => {
    const trimmed = input.trim();
    if (["exit", "quit"].includes(trimmed.toLowerCase())) {
      rl.close();
      return;
    }

    messages.push({ id: crypto.randomUUID(), role: "user", content: trimmed });

    const { text } = await agent.generate(messages, {
      toolsets: { gleap: composioTools },
      maxSteps: 8,
    });

    if (text) {
      console.log(`Agent: ${text}\n`);
      messages.push({ id: crypto.randomUUID(), role: "assistant", content: text });
    }

    rl.prompt();
  });

  rl.on("close", async () => {
    await mcpClient.disconnect();
    process.exit(0);
  });
}

main();

Conclusion

You've built a Mastra AI agent that can interact with Gleap through Composio's Tool Router. You can extend this further by:
  • Adding other toolkits like Gmail, Slack, or GitHub
  • Building a web-based chat interface around this agent
  • Using multiple MCP endpoints to enable cross-app workflows
TOOLS

Supported Tools

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

Archive All Tickets

Tool to archive all tickets matching specific type and status criteria.

Archive a Ticket

Tool to archive a ticket.

Clone Engagement

Tool to clone an existing engagement.

Create a Collection

Tool to create a help center collection.

Create AI Content

Tool to create or update AI content in Gleap's knowledge base.

Create a new chat message

Creates a new chat message in a Gleap chat session.

Create a new session

Create a new user session in Gleap and associate it with a project.

Create a new team

Tool to create a new team.

Create a new ticket

Create a new support ticket in Gleap with detailed information including title, description, type, priority, status, tags, and attachments.

Create Engagement Banner

Tool to create a new engagement banner in Gleap.

Create Engagement Checklist

Tool to create a new engagement checklist.

Create Engagement Cobrowse

Tool to create a new cobrowse product tour.

Create Engagement Email

Tool to create a new engagement email in Gleap.

Create Engagement Modal

Tool to create a new engagement modal in Gleap.

Create Engagement Product Tour

Tool to create a new product tour in Gleap.

Create Engagement Push Notification

Tool to create a new push notification in Gleap.

Create Engagement Tooltip

Tool to create a new engagement tooltip in Gleap.

Create feedback item

Tool to manually create a feedback item (bug) in a Gleap project.

Create Help Center Redirect

Tool to create a new redirect for help center URLs.

Create Message Template

Tool to create a new message template in Gleap.

Create new conversation with session

Create a new conversation with a session in Gleap.

Create QA Snippet

Tool to create a QA snippet (question-answer pair) in Gleap.

Create Tracker Ticket

Tool to create a tracker ticket in Gleap.

Delete AI Content

Tool to delete AI content by content ID.

Delete AI Content Batch

Tool to delete all AI content by batchId.

Delete a User from a Project

Removes a user (team member) from a Gleap project, revoking their access.

Delete Bugs

Tool to delete a bug/ticket by ID.

Delete Engagement Banner

Tool to delete an engagement banner.

Delete Engagement Chat Message

Deletes an engagement chat message from Gleap by its ID.

Delete Engagement Checklist

Tool to delete an engagement checklist by its ID.

Delete Engagement Cobrowse

Tool to delete a cobrowse product tour by its ID.

Delete Engagement Email

Tool to delete an engagement email by its ID.

Delete Engagement Modal

Tool to delete an engagement modal from a Gleap project.

Delete Engagement News

Tool to delete an engagement news article.

Delete Engagement Product Tour

Tool to delete an engagement product tour by its ID.

Delete Engagement Push Notification

Tool to delete an engagement push notification by its ID.

Delete Engagement Surveys

Tool to delete an engagement survey.

Delete Engagement Tooltips

Tool to delete an engagement tooltip.

Delete Engagement WhatsApp Message

Tool to delete an engagement WhatsApp message by its ID.

Delete Help Center Collection

Tool to delete a help center collection by ID.

Delete Help Center Redirect

Tool to delete a help center redirect.

Delete Message

Tool to delete a message (comment) from a bug or ticket.

Delete Message Template

Tool to delete a message template.

Delete Old AI Content Batches

Delete all AI content batches except the current batch.

Delete QA Answer

Tool to delete a QA answer (snippet) from a Gleap project.

Delete project session

Tool to delete a session from a Gleap project.

Delete session

Tool to delete a session by ID.

Delete Team

Tool to delete a team by ID.

Delete Ticket

Tool to delete a ticket by ID.

Export sessions

Tool to export sessions for the authenticated project in CSV format.

Export Statistics Lists

Tool to export statistics list data as CSV from Gleap.

Generate ticket draft reply

Tool to generate an AI-powered draft reply for a ticket.

Generate tracker ticket data

Tool to generate AI-powered tracker ticket data from an existing ticket.

Get a Checklist

Tool to retrieve a specific engagement checklist by its ID.

Get a Collection

Tool to retrieve a help center collection by ID.

Get AI content

Tool to retrieve AI content by its content ID.

Get all articles

Tool to retrieve articles in a help center collection.

Get all chat messages

Retrieves all engagement chat messages from the current Gleap project.

Get All Collections

Retrieves all help center collections for the authenticated project.

Get All Invitations for a Project

Retrieves all pending invitations for a project.

Get all sessions

Retrieves all user sessions for the authenticated project.

Get All Teams

Tool to retrieve all teams.

Get All Tickets

Retrieve tickets from a Gleap project with optional filtering, sorting, and pagination.

Get All Users for a Project

Tool to retrieve all users for a project.

Get a ticket

Retrieves complete details for a specific ticket by its ID.

Get current user

Retrieves the authenticated user's profile including email, name, user type, availability status, notification preferences, and 2FA settings.

Get engagement activities count

Tool to retrieve the count of activities for a specific engagement.

Get engagement banner

Tool to retrieve an engagement banner by its ID.

Get Engagement Banners

Tool to retrieve all engagement banners from a Gleap project.

Get engagement chat message

Retrieves a specific engagement chat message by its ID.

Get Engagement Checklists

Tool to retrieve all engagement checklists for a project.

Get Engagement Cobrowse

Retrieves all cobrowse product tours for the authenticated project.

Get engagement cobrowse by ID

Tool to retrieve a specific cobrowse product tour by its ID.

Get engagement email

Retrieves a specific engagement email by its ID.

Get Engagement Emails

Tool to retrieve all engagement emails from a Gleap project.

Get engagement modal

Tool to retrieve an engagement modal by its ID.

Get Engagement Modals

Tool to retrieve all engagement modals from a Gleap project.

Get Engagement News

Tool to retrieve all engagement news articles from a Gleap project.

Get engagement news article

Retrieves a specific engagement news article by its ID.

Get a Product Tour

Tool to retrieve a specific engagement product tour by its ID.

Get Engagement Product Tours

Tool to retrieve all engagement product tours for a project.

Get engagement push notification

Retrieves a specific engagement push notification by its ID.

Get Engagement Push Notifications

Tool to retrieve all engagement push notifications from a Gleap project.

Get Engagements Activities

Tool to retrieve all activities for a specific engagement.

Get engagement recipients

Tool to find and retrieve recipients for a specific engagement.

Get engagement statistics

Tool to retrieve statistics for a specific engagement.

Get Engagement Survey

Tool to retrieve a survey by its ID.

Get Engagement Surveys

Tool to retrieve all engagement surveys from a Gleap project.

Get Survey Responses

Tool to retrieve all survey responses for a specific survey.

Get Engagement Survey Response Samples

Tool to retrieve survey response samples for a specific engagement survey.

Summarize Survey Responses

Tool to retrieve an AI-generated summary of survey responses.

Get Engagement Tooltip by ID

Tool to retrieve a specific engagement tooltip by its ID.

Get Engagement Tooltips

Tool to retrieve all engagement tooltips for the authenticated project.

Get engagement WhatsApp message

Retrieves a specific engagement WhatsApp message by its ID.

Get Help Center Sources

Retrieves all configured help center sources (knowledge base content sources) for the project.

Get Invitations

Retrieves all invitations for the authenticated user.

Get message template

Retrieves a specific message template by its ID from a Gleap project.

Get Message Templates

Retrieve all message templates for the authenticated project.

Get notification ticket

Retrieves detailed information about a Gleap ticket using its notification share token.

Get project

Retrieves complete details for a specific project by its ID.

Get Projects

Retrieves all projects accessible to the authenticated user.

Get archived bugs

Tool to retrieve archived bugs for a specific project.

Get Projects Help Center Collections

Tool to get all help center collections for a project.

Get project sessions

Tool to retrieve all sessions for a specific project.

Get Projects Tickets

Tool to retrieve all tickets from a specific Gleap project.

Get project users

Tool to get project users by project ID.

Get a session

Retrieves detailed information for a specific session by its ID.

Get session activities

Retrieves all activities for a specific session by session ID.

Get session Chargebee info

Tool to retrieve Chargebee billing information for a specific session.

Get Session Checklists

Retrieve all engagement checklists associated with a user session in Gleap.

Get session events by ID

Tool to retrieve all streamed events for a specific session by its ID.

Get session LemonSqueezy info

Tool to retrieve LemonSqueezy subscription and payment information for a specific session.

Get Session Shopify Info

Retrieve Shopify information associated with a user session in Gleap.

Get Shared Help Center Answer

Retrieves an answer to a question from the shared help center knowledge base.

Get email client bounce statistics

Tool to retrieve email client bounce statistics from Gleap.

Get Email Client Usage Statistics

Tool to retrieve email client usage statistics from Gleap.

Get email overview statistics

Tool to retrieve email overview statistics from Gleap.

Get statistics facts

Tool to retrieve fact data for various statistics from Gleap.

Get Statistics Heatmap

Retrieve heatmap data for activity patterns in Gleap.

Get Statistics Lists

Tool to retrieve statistics list data from Gleap.

Get Statistics Raw Data

Tool to retrieve raw statistics data from Gleap.

Get Tickets By Session Query

Find tickets by session query parameters such as email, userId, phone, or custom data.

Get Tickets Export

Export tickets from Gleap project with optional filtering and sorting.

Get Tickets Export Fields

Retrieve available fields for ticket export from Gleap.

Search Tickets by Term

Search for tickets using a text search term in Gleap.

Get Tickets Count

Tool to get the total count of tickets in a Gleap project.

Get current user's permissions

Tool to retrieve the current user's role permissions.

Get users unified inbox

Retrieves tickets from the unified inbox for the authenticated user.

Get users unified inbox ticket

Retrieves complete details for a specific ticket from the unified inbox by its ID.

Identify or update user

Identify or update a user's information in Gleap.

Import session

Import user sessions into Gleap for tracking and analytics.

Import sessions from Intercom

Import user sessions from Intercom into Gleap.

Indicate user typing

Tool to indicate that a user is typing in a ticket conversation.

Indicate user viewing

Tool to indicate that a user is viewing a ticket.

Link a Ticket

Tool to link a ticket.

Mark Survey Responses as Read

Tool to mark all survey responses as read for a given survey.

Merge tickets

Tool to merge multiple tickets into a single target ticket in Gleap.

Post a comment on a bug

Tool to post a comment/message on a bug or ticket in Gleap.

Create Engagement News Article

Tool to create a new engagement news article in Gleap.

Create Engagement Survey

Tool to create a new survey in Gleap.

Create WhatsApp Engagement Message

Tool to create a new WhatsApp message in Gleap for user engagement.

Reassign all tickets to user

Tool to reassign all tickets to the authenticated user.

Resubscribe a Session

Tool to resubscribe a session.

Search for sessions

Search for sessions in Gleap using various filter criteria.

Search messages

Search messages in Gleap by search term.

Search sessions by index

Search for sessions in a project using the session search index.

Send Engagement Email Preview

Tool to send a preview of an engagement email to specified email addresses.

Send ticket transcript

Tool to send ticket conversation transcript to multiple email addresses.

Snooze a Ticket

Tool to snooze a ticket for a specified duration.

Suggest FAQ from message

Tool to suggest a FAQ from a message.

Toggle Collection Publish Status

Tool to toggle the publish status of a help center collection.

Track events

Track custom user events in Gleap for analytics and user behavior monitoring.

Unarchive a Ticket

Tool to unarchive a ticket.

Unlink a Ticket

Tool to unlink a ticket.

Unsubscribe sessions

Tool to unsubscribe one or more user sessions from communications.

Update AI Content by Content ID

Tool to update AI content by content ID.

Update a team

Tool to update an existing team.

Update a ticket

Tool to update an existing ticket/bug in Gleap.

Update a User for a Project

Tool to update a user’s role in a project.

Update Chat Message

Updates an existing chat message in Gleap by its ID.

Update a Checklist

Tool to update an engagement checklist by its ID.

Update Engagement Banner

Tool to update an engagement banner.

Update Engagement Cobrowse

Tool to update an existing cobrowse product tour.

Update Engagement Email

Tool to update an existing engagement email.

Update Engagement Modal

Tool to update an existing engagement modal.

Update Engagement News

Tool to update an engagement news article.

Update Engagement Product Tour

Tool to update an existing product tour.

Update Engagement Push Notification

Tool to update an existing push notification.

Update Engagement Survey

Tool to update an existing engagement survey in Gleap.

Update Engagement Tooltips

Tool to update an engagement tooltip.

Update Engagement WhatsApp Message

Tool to update an existing engagement WhatsApp message.

Update Helpcenter Collection

Tool to update a help center collection.

Update help center redirect

Tool to update an existing help center redirect.

Update message template

Tool to update an existing message template in Gleap.

Update project

Tool to update a Gleap project's configuration including name, description, notification settings, and feedback tags.

Update QA Answer

Updates an existing QA answer/snippet in Gleap.

Update a session

Tool to update an existing session in Gleap.

Update user

Tool to update a user's profile information including name, availability, profile image, onboarding status, and notification settings.

Vote for ticket

Tool to vote for a ticket in Gleap.

FAQ

Frequently asked questions

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

Yes, you can. Mastra AI 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 Gleap tools.

Yes, absolutely. You can configure which Gleap 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 Gleap data and credentials are handled as safely as possible.

Start with Gleap.It takes 30 seconds.

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

Start building