How to integrate Cal MCP with Vercel AI SDK v6

This guide walks you through connecting Cal to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Cal agent that can check if your google calendar is synced, cancel a meeting using its unique id, see if your calendar is free tomorrow afternoon through natural language commands. This guide will help you understand how to give your Vercel AI SDK agent real control over a Cal account through Composio's Cal MCP server. Before we dive in, let's take a quick look at the key ideas and tools involved.

Cal logoCal
Api KeyOauth2

Cal is a meeting scheduling platform that offers shareable booking links and real-time calendar syncing. It streamlines the process of finding mutual availability to make scheduling effortless.

168 Tools

Introduction

This guide walks you through connecting Cal to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Cal agent that can check if your google calendar is synced, cancel a meeting using its unique id, see if your calendar is free tomorrow afternoon through natural language commands.

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

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

Also integrate Cal with

TL;DR

Here's what you'll learn:
  • How to set up and configure a Vercel AI SDK agent with Cal integration
  • Using Composio's Tool Router to dynamically load and access Cal 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 Cal MCP server, and what's possible with it?

The Cal MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Cal account. It provides structured and secure access to your scheduling and calendar management tools, so your agent can perform actions like confirming bookings, checking calendar availability, managing team members, and handling integrations on your behalf.

  • Instant meeting confirmation and cancellation: Ask your agent to confirm or cancel any meeting booking using a unique identifier, streamlining the back-and-forth of scheduling.
  • Real-time calendar availability checks: Let your agent fetch free/busy slots from your connected calendars to suggest optimal meeting times without revealing event details.
  • Team and organization management: Effortlessly add new members to teams or update organization attribute options, making group scheduling and administration smooth.
  • Integration status monitoring: Have your agent verify the synchronization status of connected calendars like Google Calendar, check Stripe payment integration, or review webhook subscriptions for reliability.
  • Calendar feed verification: Use your agent to validate and check accessibility of ICS calendar feeds, ensuring external calendars are synced and up-to-date.

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: ["cal"],
  });

  const mcpUrl = session.mcp.url;
What's happening:
  • We're creating a Tool Router session that gives your agent access to Cal 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 Cal-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 Cal 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 cal, 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 Cal 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 Cal 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: ["cal"],
  });

  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 cal, 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 Cal 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 Cal action and event your agent gets out of the box.

Add attendee

Tool to create a new attendee for an existing booking in Cal.

Add member to team

Adds a new member to a specified team within an organization by creating a team membership.

Add organization attribute option

Adds a new option to an organization's SINGLE_SELECT or MULTI_SELECT attribute.

Cancel booking via uid

Cancels an existing and active Cal.

Check calendar availability

Retrieves free/busy availability for a specified calendar to aid scheduling without revealing event details; requires an existing, accessible calendar, noting that data granularity can vary.

Check gcal synchronization status

Call this read-only action to verify the connection and synchronization status of a user's Google Calendar integration with Cal.

Check ics feed calendar endpoint

Checks an ICS feed URL (expected as a query parameter) to verify its validity, accessibility, and iCalendar data integrity.

Check Stripe status

Verifies if Stripe is correctly connected to the Cal scheduling system and functional for processing payments, reporting only on the integration's status.

Check team stripe integration status

Retrieves the Stripe integration status and related information for a team, primarily to verify account connection, subscription details, or payment setup; this is a read-only operation that does not modify Stripe settings.

Confirm booking by uid

Confirms an existing booking by `bookingUid` if the booking exists and is in a state allowing confirmation (e.

Connect to calendar

Initiates or checks the external connection status for a specified calendar, possibly returning a redirect URL for user authorization to complete integration, without altering calendar data.

Create membership for organization

Creates a new membership for a user within a Cal.

Create organization attributes

Creates a new custom attribute for an existing organization, used to enhance data collection for event bookings or user profiles.

Create organization team form workflow

Tool to create a new workflow for routing forms within an organization team.

Create organization webhook by org ID

Creates a webhook for an organization that sends HTTP POST notifications to a specified URL when triggered by events (e.

Create or update team profile

Creates a new team profile, or updates one if a 'slug' matches, customizing branding, scheduling, privacy, and operational details.

Create phone call event

Schedules a phone call event in Cal.

Create phone call for event type

Configures Cal.

Create team event type

Creates a new event type for a specified team in Cal.

Create team event types with custom options

Creates a highly customizable Cal.

Create team in organization

Creates a new team with customizable attributes within an existing and accessible Cal.

Create team invite link

Creates a shareable invite link for a Cal.

Create team membership with role

Adds a user to a team with a specified role, acceptance status, and impersonation settings; ensure `teamId` and `userId` refer to existing, valid entities.

Create user availability schedule

Creates a Cal.

Create user schedule in organization

Creates a new schedule defining a user's availability with weekly slots and date-specific overrides in an organization; setting 'isDefault' to true may replace an existing default schedule for the user.

Create webhook for event type

Creates a webhook for an existing `eventTypeId` in Cal.

Decline booking with reason

Declines a pending booking using its bookingUid, optionally with a reason; this action is irreversible and applies only to bookings awaiting confirmation.

Delete all team event type webhooks

Permanently deletes all webhooks associated with a specific team event type.

Delete conference app connection

Disconnects the specified conferencing application (e.

Delete destination calendar by id

Tool to remove an existing destination calendar by its unique ID.

Delete event type by id

Permanently deletes an existing event type by its ID, which invalidates its scheduling links; the operation is irreversible, and while existing bookings are unaffected, no new bookings can be made for this event type.

Delete event type in team

Permanently removes an event type's configuration from a team's scheduling options (e.

Delete membership in team

Use to permanently remove a user's membership from a specific team within an organization, which revokes their team-associated access but does not remove them from the organization.

Delete organization attribute

Permanently deletes an existing attribute (specified by `attributeId`) from an existing organization (specified by `orgId`); this action is irreversible and may affect features dependent on the attribute.

Delete organization attribute option

Permanently deletes a specified option from an organization's attribute.

Delete organization membership

Irreversibly deletes a user's membership from an organization, removing all associated access and permissions; the response confirms deletion without returning details of the deleted membership.

Delete org webhook

Permanently deletes an organization-level webhook by its ID.

Delete schedule by id

Permanently deletes a specific schedule using its unique identifier, which must correspond to an existing schedule.

Delete selected calendars

Removes a specified, currently selected calendar from the user's active list within the application, without deleting it from the external provider.

Delete selected slot

Deletes a previously selected time slot from the Cal schedule using its `uid`; the slot must exist and this action is irreversible.

Delete team by id

Permanently and irreversibly deletes an existing team and all its associated data from the Cal system, using the team's unique `teamId`.

Delete team event type in organization

Permanently removes a team event type from an organization's scheduling configuration.

Delete team from organization

Permanently and irreversibly deletes a specific team from a Cal.

Delete team memberships by id

Irreversibly removes a user's team membership in the Cal application, revoking access to that specific team; the user's overall Cal account remains active.

Delete user attribute option

Unassigns a specific attribute option from a user within an organization.

Delete user from organization

Permanently removes a user from a specific organization (user's system-wide account is unaffected), revoking their access rights therein; this action is irreversible via API and expects the user to be a current member.

Delete user schedule

Permanently deletes a specific user's schedule, provided the organization, user, and schedule (identified by `orgId`, `userId`, and `scheduleId`) exist.

Delete webhook by id

Permanently deletes an existing webhook by its `webhookId`, stopping future notifications; this action is irreversible.

Delete webhook for event type

Permanently deletes a specific webhook for an event type, halting its real-time notifications; this operation is irreversible and leaves the event type and other webhooks untouched.

Delete webhooks for event type

Call this to irreversibly delete all webhooks for a specific `eventTypeId` if the event type exists; details of deleted webhooks are not returned.

Disconnect calendar using credential id

Disconnects a calendar integration by its provider name and credential ID, irreversibly revoking Cal's access; external calendar data remains unaffected.

Edit attendee by ID

Tool to edit an existing attendee in a Cal.

Edit availability by ID

Tool to edit an existing availability by ID on Cal.

Edit booking by ID

Tool to edit an existing booking by its ID.

Edit event type by ID

Tool to edit an existing Cal.

Edit selected calendar by ID

Tool to edit a selected calendar by its composite ID in Cal.

Fetch all bookings

Fetches a list of bookings, optionally filtered by status, attendee, date range, or by event/team IDs (which must belong to/include the authenticated user respectively), with support for pagination and sorting.

Fetch event type details

Fetches all configuration settings and characteristics for a single event type (identified by orgId, teamId, and eventTypeId), which must exist and be accessible; this read-only action cannot list, create, or modify event types.

Fetch organization attribute by id

Retrieves a specific attribute of an organization, useful for fetching a single data point instead of the entire organization record.

Fetch provider access token

Fetches an OAuth access token for the specified `clientId` to authenticate API calls; this action only retrieves the token, not managing scheduling or calendar events.

Fetch schedule by id

Fetches comprehensive details for a specific, existing schedule using its `scheduleId`.

Fetch user schedule by org id

Retrieves a specific user's schedule within an organization, returning availability windows, timezone settings, and date-specific overrides.

Fetch webhook by event type id

Retrieves details for a single, specific webhook using its `webhookId` and associated `eventTypeId`.

Get all timezones

Retrieves all supported time zone identifiers (e.

Get available slots info

Retrieves available time slots for scheduling by considering existing bookings and availability, based on criteria like a specified time range and event type.

Get booking reference by id

Tool to find a specific booking reference by its ID.

Get booking references

Retrieves external references for a specific booking within an organization's team.

Get conference OAuth authorization url

Generates an OAuth 2.

Get default schedule details

Retrieves the Cal system's global default schedule configuration, not custom or user-specific ones.

Get destination calendars

Tool to retrieve all destination calendars configured for the authenticated user.

Get event type by team id

Retrieves a specific event type by its ID, requiring that the event type is associated with the given team ID.

Get event type private links

Retrieves all private booking links for a specific event type.

Get google calendar oauth authentication url

Generates the initial Google Calendar OAuth 2.

Get oauth clients user

Retrieves all managed users associated with a Platform OAuth client.

Get organization attribute assigned options

Retrieves all assigned attribute options for a specific attribute within an organization.

Get organization attribute assigned options by slug

Tool to retrieve all assigned attribute options for a specific attribute by its slug within an organization.

Get organization ID

Retrieves the organization ID associated with the currently authenticated user from the Cal.

Get organization schedules

Retrieves availability schedules for an organization.

Get organization teams event types

Retrieves event types, including names, durations, and custom settings for team scheduling, for all teams within an existing organization specified by `orgId`.

Get organization team workflows

Retrieves workflows configured for a specific team within an organization.

Get organization user schedules

Retrieves all availability schedules configured for a specific user within an organization.

Get private links for team event type

Get all private links for a team event type.

Get schedule for user in team

Retrieves all availability schedules for a specific user within a team and organization.

Get selected calendar by ID

Tool to retrieve a selected calendar by its compound ID (userId_integration_externalId).

Get stripe connect info

Retrieves Stripe Connect account details (ID, charges/payouts status, verification, settings) for the user's linked Cal.

Get Stripe Connect URL for team

Tool to get Stripe Connect authorization URL for a team within an organization.

Get team bookings

Retrieves all bookings for a specified team, optionally filtered by status, attendee details, date ranges, or event type IDs, with support for pagination and sorting.

Get team default conferencing app

Retrieves the default conferencing application configured for a specific team within an organization.

Get team details by organization ID and team ID

Retrieves comprehensive details for a specific team within an organization, including team metadata, configuration settings, branding options, and timezone/week preferences.

Get team event type webhook

Retrieves details for a specific webhook configured on a team event type.

Get team event type webhooks

Retrieves all webhooks configured for a specific team event type.

Get team information by team ID

Retrieves detailed information about a specific Cal.

Get team routing forms

Retrieves routing forms for a specific team within an organization.

Get team schedules

Retrieves availability schedules for all members of a specific team within an organization.

Get teams list

Retrieves all teams the user belongs to, including their names and members.

Get verified phone numbers

Retrieves a paginated list of verified phone numbers for a specific organization team.

Get webhook by id

Retrieves details for an existing and accessible webhook by its ID; this is a read-only operation.

Handle conferencing oauth callback for app

Processes an OAuth 2.

List all attendees

Tool to retrieve all attendees from Cal.

List booking references

Fetches one page of booking references in Cal.

List event types

Retrieves Cal event types, filterable by `username` (required if `eventSlug` is provided), multiple `usernames`, or organization details (`orgSlug` or `orgId`).

List organization memberships

Retrieves all memberships for a given organization, including user details, roles, status, and membership dates.

List team event types by org and team id

Retrieves all event types for a specific team within an organization, optionally filtering by a specific event slug.

Mark booking absent for UID

Marks the host and/or specified attendees as absent for an existing booking, typically used after a scheduled event to record no-shows.

Modify organization membership by id

Updates an organization membership's status (accepted), role, or impersonation settings, identified by `orgId` and `membershipId` in the path; requires at least one of these fields in the request to apply changes.

Modify org attribute by id

Partially updates an organization attribute using `orgId` and `attributeId`, allowing modification of its name, slug, type, or enabled status; changing the 'type' may affect existing data.

Patch organization attribute option

Partially updates a specific option for an organization's attribute, modifying its 'value' and/or 'slug'; at least one of 'value' or 'slug' must be provided.

Patch organization user details

Partially updates details for a user that exists within the specified organization.

Patch team details by ID

Updates specified details for an existing team identified by `teamId`; unspecified fields remain unchanged.

Patch webhook event type

Updates configuration (e.

Post calendar credentials

Use to submit/update authentication credentials (passed in the request body) for an existing calendar, enabling Cal to connect with external calendar services for synchronization.

Connect conferencing app

Connects or reconnects Cal.

Create a new booking

Creates a new booking for an event type at a specified start time.

Assign or create attribute option for user

Assigns an existing attribute option (using `attributeOptionId`) or creates a new one (using `value`) for a user, linking it to a specified `attributeId` which must already exist within the organization.

Add selected calendar

Links a new external calendar or updates an existing link to one, enabling synchronization with the Cal application by specifying the `integration` provider, the calendar's `externalId`, and the `credentialId`.

Post user to organization

Adds a new user to an existing organization (identified by `orgId` in path), requiring user's `email` and allowing extensive optional profile customization.

Create webhook subscription

Creates a new Cal.

Reassign booking to another user

Reassigns an existing booking to a specified user.

Reassign booking with uid

Reassigns the specified booking to a new team member, who is determined by the system rather than being specified in the request.

Request email verification code

Request an email verification code for a team's verified resources.

Reschedule booking by uid

Reschedules an existing booking (identified by `bookingUid`) to a new time.

Reserve slot for event

Temporarily reserves an available time slot for an existing and bookable event type, useful for high-demand slots to prevent double-bookings while the user completes the booking.

Retrieve attribute options for org

Retrieves all available options for a specific attribute within an organization.

Retrieve booking details by uid

Fetches comprehensive details for an existing booking, identified by its `bookingUid`.

Retrieve calendar busy times

To find busy calendar slots for scheduling/conflict detection, call this with a valid `credentialId`, an `externalId` accessible by it, and a recognized IANA `loggedInUsersTz`; returns only busy intervals, not event details or free slots.

Retrieve calendar list

Retrieves a list of all calendar summaries (no event details) associated with the authenticated user's account.

Retrieve current team for organization

Retrieves details of the team(s) for the currently authenticated user within the specified organization `orgId`.

Retrieve default conferencing settings

Retrieves an account's or organization's read-only default conferencing settings in Cal.

Retrieve event type by id

Retrieves comprehensive details for a specific, existing Cal.

Retrieve membership from organization

Retrieves detailed information about a specific membership within a particular organization.

Retrieve my information

Retrieves the authenticated user's core profile information (e.

Retrieve OAuth client user by ID

Retrieves detailed profile information for a specific managed user associated with an OAuth client.

Retrieve organization attributes

Retrieves detailed attributes (e.

Retrieve organization attributes options

Retrieves all attribute options assigned to a specific user within an organization.

Retrieve organization webhook by id

Retrieves detailed information, including configuration and status, for a specific webhook by its ID (`webhookId`) within a given organization (`orgId`).

Retrieve organization webhooks by org ID

Retrieves all webhooks configured for a specific organization, returning an array of webhook objects with their configuration details (ID, triggers, subscriber URL, active status, etc.

Retrieve provider details

Verifies and retrieves details for an OAuth client (provider) in Cal.

Retrieve schedules list

Retrieve all availability schedules for the authenticated Cal.

Retrieve team details in organization

Retrieves a paginated list of teams and their details for a specific organization ID; individual team member details or schedules are not included.

Retrieve team event types

Retrieves event types for a team within the Cal scheduling system; this action does not provide details on scheduled instances or member availability.

Retrieve team membership by id

Retrieves detailed information for a specific team membership by its ID within an organization's team.

Retrieve team membership details

Retrieves detailed attributes for a specific team membership by its ID and the team ID, such as member information, role, and status; does not list all team members.

Retrieve team memberships

Retrieves all memberships for a team, including member details, roles (MEMBER/OWNER/ADMIN), and invitation acceptance status.

Retrieve team memberships for organization

Retrieves all user memberships for a specific team within an organization, including each member's role (OWNER, ADMIN, MEMBER), acceptance status, impersonation settings, and detailed user information (email, username, name, avatar, bio).

Retrieve users in organization

Retrieves users associated with a specific organization ID, excluding individual scheduling or calendar data; the `orgId` must be a valid identifier for an existing organization.

Retrieve v2 conferencing info

Retrieves an authenticated Cal user's or organization's video conferencing configurations, capabilities, and installed apps, useful for understanding options before scheduling or verifying setups; provider availability may vary by subscription or settings.

Retrieve webhook details for OAuth client

Retrieves all webhook configurations for a specific OAuth client with optional pagination.

Retrieve webhooks for event type

Retrieves a paginated list of webhooks (including URLs, subscribed events, and status) for a specified, existing event type ID, useful for auditing configurations or troubleshooting.

Retrieve webhooks list

Retrieves a paginated list of webhooks from the user's Cal scheduling system account, which are used for real-time notifications on events like new bookings, cancellations, or updates.

Save calendar entry

Saves or updates a calendar's settings using a GET request, typically for data already on the server or simple updates via query parameters.

Save calendar ics feeds

Imports and saves one or more publicly accessible external iCalendar (ICS) feed URLs into the Cal.

Save OAuth credentials via GCal API

Completes the Google Calendar OAuth 2.

Save stripe details

Completes the Stripe OAuth flow by saving Stripe details; call this when a user is redirected back from Stripe with an authorization `code` and `state`.

Set default conferencing app

Sets the specified, valid, and configured conferencing application as the default for new meetings for the authenticated user.

Update destination calendar integration

Updates the destination calendar for syncing events, using `integration` and `externalId` (typically from `/calendars` endpoint).

Update OAuth client user settings

Updates specified profile and scheduling preference fields for a user associated with an OAuth client; `defaultScheduleId`, if provided, must be an existing, valid schedule for the user.

Update oauth client webhook

Updates specified properties of an existing webhook for an OAuth client; omitted fields remain unchanged.

Update private link

Updates a private link for a team event type within an organization.

Update schedule by ID

Updates an existing schedule by its ID, allowing partial modification of properties; providing `availability` or `overrides` replaces them entirely.

Update team event type

Tool to update a team event type in Cal.

Update team event type webhook

Updates a webhook for a team event type.

Update team information by id

Updates an existing team's information by its ID within a specified organization; the `slug`, if provided, must be unique within the organization.

Update team membership by id

Updates properties of an existing team membership.

Update team membership properties

Updates attributes like acceptance status, role, or impersonation settings for an existing team membership within an organization.

Update user profile details

Updates the profile information and preferences for the authenticated user, affecting only the fields provided in the request.

Update user schedule in organization

Modifies an existing schedule for a specified user within an organization by updating only the provided fields; the organization, user, and schedule must already exist.

Update webhook by id

Updates an existing Cal.

Update webhook for organization

Updates an existing webhook for an organization.

FAQ

Frequently asked questions

With a standalone Cal MCP server, the agents and LLMs can only access a fixed set of Cal tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Cal 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 Cal tools.

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

Start with Cal.It takes 30 seconds.

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

Start building