How to integrate Outlook MCP with Vercel AI SDK v6

This guide walks you through connecting Outlook to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Outlook agent that can download latest attachments from your inbox, create new calendar for project deadlines, add rule to move newsletters to folder through natural language commands. This guide will help you understand how to give your Vercel AI SDK agent real control over a Outlook account through Composio's Outlook MCP server. Before we dive in, let's take a quick look at the key ideas and tools involved.

Outlook logoOutlook
Oauth2S2s Oauth2

Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.

282 Tools5 Triggers

Introduction

This guide walks you through connecting Outlook to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Outlook agent that can download latest attachments from your inbox, create new calendar for project deadlines, add rule to move newsletters to folder through natural language commands.

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

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

Also integrate Outlook with

TL;DR

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

The Outlook MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Outlook account. It provides structured and secure access to your email, calendar, and contacts, so your agent can perform actions like sending emails, organizing folders, managing your calendar, and handling attachments on your behalf.

  • Email organization and folder management: Let your agent create, delete, or organize mail folders to keep your inbox tidy and efficient.
  • Calendar and event creation: Easily have your agent set up new calendars, so you can organize meetings and events without lifting a finger.
  • Smart attachments handling: Automatically download files from your emails or add attachments to outgoing messages for seamless file management.
  • Automated rules and filtering: Direct your agent to create email rules that filter, sort, or take action on messages as they arrive.
  • Contact and category organization: Ask your agent to create new contact folders or master categories to streamline how you manage people and projects.

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

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

  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 outlook, 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 Outlook 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 & TRIGGERS

Supported Tools and Triggers

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

Accept calendar event invite

Accepts or tentatively accepts a calendar meeting invite on behalf of a user.

Add event attachment

Adds an attachment to a specific Outlook calendar event.

Add mail attachment

Tool to add an attachment to an email message.

Batch move messages

Batch-move up to 20 Outlook messages to a destination folder in a single Microsoft Graph $batch call.

Batch update messages

Batch-update up to 20 Outlook messages per call using Microsoft Graph JSON batching.

Create Calendar Event

Creates a new Outlook calendar event, ensuring `start_datetime` is chronologically before `end_datetime`.

Cancel user's calendar event

Tool to cancel an event in a specific calendar for a specified user and send cancellation notifications to all attendees.

Cancel user calendar group event

Tool to cancel an event in a user's calendar within a calendar group and send cancellation notifications to all attendees.

Cancel user calendar event

Tool to cancel a calendar event for a specified user and send cancellation notifications to all attendees.

Copy user's mail folder

Tool to copy a user's mail folder and its contents to another folder.

Copy child mail folder

Tool to copy a child mail folder to a destination folder.

Copy message to folder

Tool to copy an email message to another folder within the user's mailbox.

Copy message from child folder

Tool to copy an email message from a child folder (nested folder) to another folder within the user's mailbox.

Copy user message from folder

Tool to copy a message from a specific user's mail folder to another folder.

Create attachment upload session

Tool to create an upload session for large (>3 MB) message attachments.

Create attachment upload session in child folder

Tool to create an upload session for large (>3 MB) message attachments in child mail folders.

Create calendar

Tool to create a new calendar in the signed-in user's mailbox.

Create calendar event attachment

Tool to create a new attachment for an event in a specific calendar.

Create calendar event attachment upload session

Tool to create an upload session for large calendar event attachments in a specific calendar.

Create event in specific calendar

Tool to create a new event in a specific calendar for a user.

Create calendar group

Tool to create a new calendar group for a user.

Create user calendar group event attachment

Tool to create a new attachment for an event in a calendar within a calendar group for a specific user.

Create event extension

Tool to create a new open extension on a calendar event within a specific calendar group and calendar.

Create Calendar Permission

Tool to create a calendar permission for a specific calendar in a calendar group.

Create calendar group event attachment upload session

Tool to create an upload session for large calendar group event attachments.

Create contact

Creates a new contact in a Microsoft Outlook user's contacts folder.

Create contact folder

Tool to create a new contact folder in the user's mailbox.

Create user contact folder child folder

Tool to create a child contact folder within a parent contact folder for a specific user.

Create email draft

Creates a new Outlook email draft with subject, body, recipients, and an optional attachment.

Create a draft reply

Creates a draft reply in the specified user's Outlook mailbox to an existing message (identified by a valid `message_id`), optionally including a `comment` and CC/BCC recipients.

Create Email Rule

Create email rule filter with conditions and actions

Create user calendar event attachment

Tool to create a new attachment for a user's calendar event.

Create event attachment upload session

Tool to create an upload session for large calendar event attachments.

Create user mail folder message forward draft

Tool to create a forward draft of an Outlook message for a specific user.

Create mail folder

Tool to create a new mail folder.

Create message in mail folder

Tool to create a new message in a specific mail folder.

Create mail folder message attachment

Tool to add an attachment to a message in a specific mail folder.

Create mail folder message attachment upload session

Tool to create an upload session for large (>3 MB) message attachments in a specific mail folder.

Create User Mail Folder Message Rule

Tool to create a message rule in a user's mail folder.

Create user calendar event extension

Tool to create a new open extension on a calendar event for a specific user.

Create user calendar permission

Tool to create a new calendar permission for a specific user's calendar.

Create message in user's child folder

Tool to create a new draft message in a child folder within a user's mail folder.

Create user contact in folder

Tool to create a new contact in a specific user's contact folder.

Create user contact extension

Tool to create a new open extension on a contact within a user's contact folder.

Create contact extension

Tool to create a new open extension on a contact within a child folder.

Create contact in child folder

Tool to create a new contact in a child folder within a contact folder.

Create calendar event for user

Tool to create a new calendar event for a specific user.

Create me event attachment upload session

Tool to create an upload session for large event attachments.

Create forward draft

Tool to create a draft forward of an existing message.

Create user Focused Inbox override

Tool to create a Focused Inbox override for a sender identified by SMTP address for a specific user.

Create reply-all draft for user message

Tool to create a draft reply-all to a user's message.

Create reply-all draft for child folder message

Tool to create a draft reply-all to a message in a child folder.

Create message attachment

Tool to create an attachment for a message.

Create reply-all draft in folder

Tool to create a reply-all draft for a message in a mail folder.

Create To Do task

Tool to create a new task in Microsoft To Do within a specified task list.

Create user calendar event attachment

Tool to create a new attachment for an event in a specific user's calendar.

Create calendar in user's calendar group

Tool to create a new calendar in a calendar group for a specific user.

Create user calendar group event

Tool to create a new calendar event in a specific user's calendar within a calendar group.

Create user contact extension

Tool to create a new open extension on a specific user's contact.

Create calendar permission via event

Tool to create a calendar permission via an event's calendar.

Create user message extension

Tool to create a new open extension on a message in a child mail folder for any user.

Create user mail folder message extension

Tool to create a new open extension on a message in a user's mail folder.

Create reply draft for user mail folder message

Tool to create a reply draft for a message in a user's mail folder.

Create user mail folders child folders

Tool to create a new child folder under a specified mail folder for a user.

Create user master category

Tool to create a new category in a user's master category list.

Create user message

Tool to create a new draft message in a user's mailbox.

Create user message attachment

Tool to create an attachment on a message in a user's mail folder.

Decline calendar event

Tool to decline an invitation to a calendar event.

Delete calendar

Tool to delete a calendar other than the default calendar from a user's mailbox.

Delete calendar event

Tool to delete a calendar event from a user's Outlook calendar.

Delete user calendar event attachment

Delete user calendar event attachment

Delete event from specific calendar

Tool to delete an event from a specific calendar in Outlook.

Delete user calendar group calendar

Tool to delete a calendar from a specific user's calendar group in Microsoft Outlook.

Delete calendar group

Tool to delete a calendar group other than the default calendar group.

Delete user calendar group calendar event

Tool to delete a calendar event from a specific user's calendar within a calendar group.

Delete calendar group event attachment

Tool to delete an attachment from an event in a calendar within a calendar group.

Permanently Delete Calendar Group Event

Tool to permanently delete a calendar event from a calendar within a calendar group.

Permanently Delete Calendar

Permanently deletes a calendar from a user's mailbox.

Delete User Calendar Group Calendar Permission

Tool to delete a calendar permission from a user's calendar within a calendar group.

Permanently Delete Child Contact Folder

Permanently deletes a child contact folder.

Delete Child Folder Message

Tool to delete a message from a child mail folder in Outlook.

Delete Contact

Permanently deletes an existing contact, using its `contact_id` (obtainable via 'List User Contacts' or 'Get Contact'), from the Outlook contacts of the user specified by `user_id`.

Delete contact folder

Tool to delete a contact folder from the user's mailbox.

Delete user contact folder child folder

Tool to delete a child contact folder from a parent contact folder for a specific user.

Delete Contact from Folder

Tool to permanently delete a contact from a specific contact folder.

Permanently Delete Contact Folder

Permanently deletes a contact folder.

Permanently Delete User Contact from Child Folder

Tool to permanently delete a contact from a child folder for a specific user.

Permanently Delete Contact from Folder

Permanently deletes a contact from a specific contact folder.

Permanently Delete Contact

Permanently deletes a contact.

Delete contact extension

Tool to delete a navigation property extension from a contact within a child folder.

Delete Email Rule

Delete an email rule permanently; deletion is irreversible.

Delete event attachment

Tool to delete an attachment from an Outlook calendar event.

Delete event extension

Tool to delete an open extension from a calendar event in a calendar group.

Permanently Delete Event

Permanently deletes a calendar event.

Delete mail folder

Delete a mail folder from the user's mailbox.

Delete Mail Folder Message

Tool to delete a message from a specific mail folder in Outlook.

Delete master category

Tool to delete a category from the user's master category list.

Delete User Calendars Calendar Permission

Tool to delete a calendar permission from a specific user's calendar.

Delete contact extension

Tool to delete an open extension from a contact.

Delete user contact folder contact extension

Tool to delete an extension from a contact in a user's contact folder.

Delete user event extension

Tool to delete an open extension from a user's calendar event.

Delete user event attachment

Tool to delete an attachment from a user's Outlook event.

Delete inference classification override

Tool to delete an inference classification override for a specific sender.

Delete mail folder child folder

Tool to delete a child mail folder from a parent mail folder.

Permanently Delete Child Mail Folder

Permanently deletes a child mail folder from a parent mail folder.

Delete mail folder message rule

Tool to delete a message rule from a specific mail folder.

Delete user message extension

Delete user message extension

Delete message extension

Tool to delete a navigation property extension from a message within a mail folder.

Delete Message Attachment

Tool to delete an attachment from a message.

Delete Message

Tool to permanently delete an Outlook email message by its message_id.

Delete Message Attachment

Tool to delete an attachment from a message in a nested mail folder structure.

Delete message extension

Tool to delete an open extension from an Outlook message.

Delete User Calendar Permission

Tool to delete a calendar permission from a specific user's calendar.

Permanently Delete User Calendar Event

Tool to permanently delete a calendar event from a specific user's calendar.

Delete Contact from User's Child Folder

Tool to delete a contact from a child folder in a user's contact folder.

Delete User Child Folder Message Permanently

Tool to permanently delete a message from a user's child mail folder in Outlook.

Permanently Delete User Event

Tool to permanently delete a calendar event for a specified user.

Permanently Delete User Mail Folder

Permanently deletes a mail folder for a specific user.

Dismiss user calendar event reminder

Tool to dismiss a reminder for a specific event in a user's calendar.

Dismiss event reminder

Tool to dismiss a reminder for a specific calendar event.

Dismiss user calendar group event reminder

Tool to dismiss a reminder for an event in a user's calendar within a calendar group.

Dismiss user event reminder

Tool to dismiss a reminder for a specific user's calendar event.

Download Outlook attachment

Downloads a specific file attachment from an email message in a Microsoft Outlook mailbox; the attachment must contain 'contentBytes' (binary data) and not be a link or embedded item.

Find Meeting Times

Suggests meeting times based on organizer and attendee availability, time constraints, and duration requirements.

Forward message

Tool to forward a message.

Forward user calendar event

Tool to forward a calendar event from a specific user's calendar to new recipients.

Get event from calendar

Tool to retrieve a specific event from a specified calendar.

Get calendar event attachment

Tool to retrieve a specific attachment from an event within a calendar.

Get calendar from event

Tool to retrieve the parent calendar that contains a specific event.

Get calendar from calendar group

Tool to retrieve a specific calendar from a calendar group in Microsoft Outlook.

Get calendar group

Tool to retrieve the properties and relationships of a calendar group object.

Get event extension

Tool to retrieve an open extension from a calendar event within a specific calendar group and calendar.

Get User Calendar Group Schedule

Tool to retrieve free/busy schedule information for a specific user's calendar within a calendar group.

Get user calendar permission

Tool to retrieve a specific calendar permission for a user's calendar.

Get user calendar permission

Tool to retrieve a specific calendar permission from a user's calendar.

Get Calendar Schedule

Tool to get free/busy schedule information for users, distribution lists, or resources.

Get Calendar View

Get events ACTIVE during a time window (includes multi-day events).

Get child folder message

Tool to retrieve a specific email message from a child mail folder.

Get child folder message MIME content

Tool to get the MIME content of a message from a child mail folder.

Get child mail folder

Tool to retrieve a specific child mail folder from a parent mail folder.

Get contact extension

Tool to retrieve an open extension from a contact in Microsoft Graph.

Get contact folder

Tool to retrieve a specific contact folder by ID.

List user contact folders

Tool to retrieve contact folders from a specific user's mailbox.

Get contact from folder

Tool to retrieve a specific contact from a contact folder by its ID.

Get drafts mail folder

Tool to get the drafts mail folder.

Get calendar event

Retrieves the full details of a specific calendar event by its ID from a user's Outlook calendar, provided the event exists.

Get event attachment

Tool to retrieve a specific attachment from an Outlook calendar event by attachment ID.

Get event calendar from calendar group

Tool to retrieve the calendar that contains a specific event within a calendar group.

Get inference classification

Tool to get inference classification settings for the authenticated user.

Get mailbox settings

Tool to retrieve mailbox settings.

Get mail delta

Retrieve incremental changes (delta) of messages in a mailbox.

Get mail folder

Tool to retrieve a mail folder by ID or well-known name.

Get mail folder message

Tool to retrieve a specific message from a mail folder by its ID.

Get user mail folder message rule

Tool to retrieve a specific message rule from a user's mail folder.

Get mail tips

Tool to retrieve mail tips such as automatic replies and mailbox full status.

Get master categories

Tool to retrieve the user's master category list.

Get master category

Tool to retrieve properties of a specific category from the user's master category list.

Get user's default calendar

Tool to get the properties and relationships of the signed-in user's default calendar.

Get user child contact folder

Tool to retrieve a specific child contact folder for a user by ID.

Get contact from child folder

Tool to retrieve a specific contact from a nested child folder within a contact folder.

Get contact photo

Tool to get the binary media content of a contact's profile photo.

Get contact

Retrieves a specific Outlook contact by its `contact_id` from the contacts of a specified `user_id` (defaults to 'me' for the authenticated user).

Get user contact extension

Tool to retrieve a specific open extension from a user's contact.

Get user event attachment

Tool to retrieve a specific attachment from a user's calendar event.

Get event calendar

Tool to retrieve the calendar that contains a specific event.

Get message extension

Tool to retrieve a specific extension from a message in a user's mailbox.

Get message MIME content

Tool to get the MIME content of a message.

Get user outlook

Tool to retrieve the outlookUser object for a specified user.

Get email message

Retrieves a specific email message by its ID from the specified user's Outlook mailbox.

Get user message extension

Tool to retrieve a specific extension from a user's message.

Get attachment from nested folder message

Tool to retrieve a specific attachment from a message located in a nested mail folder structure.

Get Outlook profile

Retrieves the Microsoft Outlook profile for a specified user.

Get schedule

Retrieves free/busy schedule information for specified email addresses within a defined time window.

Get supported languages

Tool to retrieve supported languages in the user's mailbox.

Get supported time zones

Tool to get the list of time zones supported for a user as configured on their mailbox server.

Get user's calendar

Tool to get the properties and relationships of a specific calendar for a user.

Get allowed calendar sharing roles for user calendar

Tool to retrieve allowed calendar sharing roles for a specific user on a given calendar.

Get user calendar event

Tool to retrieve a specific calendar event from a user's primary calendar.

Get user calendar group calendar permission

Tool to retrieve a specific calendar permission for a user's calendar within a calendar group.

Get user calendar group event

Tool to retrieve a specific event from a user's calendar within a calendar group.

Get user calendar group event attachment

Tool to retrieve a specific attachment from an event within a calendar group for a user.

Get message from child folder

Tool to retrieve a specific message from a child folder within a user's mail folder hierarchy.

Get event extension

Tool to retrieve a specific open type extension from a user's calendar event by its extension ID or name.

Get user message attachment

Tool to retrieve a specific attachment from a message in a mail folder hierarchy.

List user calendar event attachments

Tool to list attachments for a calendar event within a specific calendar for a user.

List user calendar group calendar events

Tool to list events from a specific calendar within a calendar group for a user.

List calendars in calendar group

Tool to retrieve calendars belonging to a specific calendar group.

List user calendar group event attachments

Tool to list attachments for a calendar event within a specific calendar group for a user.

List Outlook calendar groups

Tool to list calendar groups in the signed-in user's mailbox.

List calendar permissions

Tool to list calendar permissions for a specific calendar within a calendar group.

List Outlook calendars

Tool to list calendars in the signed-in user's mailbox.

List calendar view delta

Tool to get calendar events that have been added, deleted, or updated in a calendar view.

List chat messages

Tool to list messages in a Teams chat.

List Teams chats

Tool to list Teams chats.

List user child folder contacts

Tool to retrieve contacts from a user's child contact folder.

List child folder messages

Tool to list messages from a child folder within a parent mail folder.

List child mail folders

Tool to list subfolders (childFolders) under a specified Outlook mail folder.

List contact folder child folders

Tool to list child folders under a specified contact folder.

List contact folders delta

Tool to get contact folders that have been added, deleted, or updated.

List contacts delta

Retrieve incremental changes (delta) of contacts in a specified folder.

List Email Rules

List all email rules from inbox.

List event attachments

Tool to list attachments for a specific Outlook calendar event.

List event calendar permissions

Tool to list calendar permissions for the calendar containing a specific event.

List event instances

Tool to retrieve individual occurrences of a recurring calendar event within a specified time range.

List events

Retrieves events from a user's Outlook calendar via Microsoft Graph API.

List Inference Classification Overrides

Tool to list inference classification overrides that control Focused Inbox sender rules.

List mail folder message attachments

Tool to get attachments from a message in a specific mail folder.

List mail folder message rules

Tool to list message rules for a specific mail folder.

List mail folder messages

Tool to list messages from a specific mail folder including subfolders.

List mail folders

Tool to list a user's top-level mail folders.

List mail folders delta

Tool to get incremental changes to mail folders.

List user calendar permissions

Tool to list calendar permissions for a specific user's calendar.

List message attachments from child folder

Tool to list attachments from a message in a nested child mail folder.

List Messages

Retrieves a list of email messages from a specified mail folder in an Outlook mailbox, with options for filtering (including by conversationId to get all messages in a thread), pagination, and sorting; ensure 'user_id' and 'folder' are valid, and all date/time strings are in ISO 8601 format.

List Outlook attachments

Lists metadata (name, size, contentType, isInline — but not `contentBytes`) for all attachments of a specified Outlook email message.

List places

Retrieves a collection of place objects defined in a tenant by type.

List primary calendar permissions

Tool to list calendar permissions from a user's primary calendar.

List event reminders

Tool to retrieve reminders for events occurring within a specified time range.

List sent items messages

Tool to list all messages in the SentItems mail folder of the signed-in user's mailbox.

List To Do task lists

Tool to list Microsoft To Do task lists for the signed-in user.

List tasks from a To Do list

Tool to list tasks within a specified Microsoft To Do task list, including status and due dates.

List calendar event instances

Tool to retrieve instances (occurrences) of a recurring event from a specific calendar within a date range.

List user calendar event attachments

Tool to list attachments for a user's calendar event.

List event instances

Tool to list instances (occurrences) of a recurring event within a specified date range from a user's calendar in a calendar group.

Get Calendar View from User Calendar Group

Tool to get calendar view from a specific calendar within a calendar group for a user.

List user calendar permissions

Tool to list calendar permissions for a specific user's specific calendar.

List user calendars events

Tool to retrieve events from a specific calendar for a user.

Get calendar view from user's calendar

Tool to get calendar view from a specific user's calendar.

List user contacts

Tool to retrieve contacts from a specific user's mailbox.

List users

Tool to list users in Microsoft Entra ID.

Move mail folder

Tool to move a mail folder and its contents to another mail folder.

Move child mail folder

Tool to move a child mail folder to a different parent folder.

Move message to folder

Move a message to another folder within the specified user's mailbox.

Move message from child folder

Tool to move a message from a child folder to another destination folder.

Move message from folder

Tool to move a message from a specific mail folder to another destination folder.

Permanently Delete Message

Permanently deletes an Outlook message by moving it to the Purges folder in the dumpster.

Pin message

Tool to pin a message in an Outlook chat.

Query Emails

Query Outlook emails within a SINGLE folder using OData filters.

Reply to Email

Sends a reply to an Outlook email message with optional HTML formatting, identified by `message_id`, allowing optional CC and BCC recipients.

Search Outlook messages

Search Outlook messages using powerful KQL syntax.

Send draft

Tool to send an existing draft message.

Send email

Sends an email with subject, body, recipients, and optional attachments via Microsoft Graph API.

Snooze user calendar group event reminder

Tool to snooze a reminder for a user's calendar event within a calendar group to a new time.

Snooze event reminder

Tool to postpone an event reminder until a new time.

Snooze user calendar event reminder

Tool to snooze a reminder for a calendar event in a specific user calendar to a new time.

Snooze user event reminder

Tool to snooze a reminder for a user's calendar event to a new time.

Update calendar event

Updates specified fields of an existing Outlook calendar event.

Update event in specific calendar

Tool to update an event in a specific Outlook calendar.

Update calendar group

Tool to update the properties of a calendar group object.

Update Calendar Group Calendar Permission

Tool to update a calendar permission within a calendar group.

Update user calendar in calendar group

Tool to update a calendar within a calendar group in a user's mailbox.

Update user calendar group event

Tool to update an event in a calendar within a calendar group for a specific user.

Update calendar permission

Tool to update calendar permission levels for share recipients or delegates.

Update child folder contact

Tool to update a contact in a child contact folder within a parent contact folder.

Update Contact

Updates an existing Outlook contact, identified by `contact_id` for the specified `user_id`, requiring at least one other field to be modified.

Update user contact folder

Tool to update the properties of a contact folder for a specific user.

Update user contact folder child folder

Tool to update a child folder within a contact folder for a specific user.

Update contact in folder

Tool to update a contact within a specific contact folder.

Update email message

Updates specified properties of an existing email message; `message_id` must identify a valid message within the specified `user_id`'s mailbox.

Update Email Rule

Update an existing email rule

Update event extension

Tool to update an open extension on a calendar event in Microsoft Graph.

Update event extension in calendar group

Tool to update an open extension on a calendar event within a calendar group.

Update Inference Classification

Tool to update the inferenceClassification resource for a user.

Update mailbox settings

Tool to update mailbox settings for the signed-in user.

Update mail folder

Tool to update the display name of a mail folder.

Update master category

Tool to update the color of a category in the user's master category list.

Update contact extension

Tool to update an open extension on a contact in a contact folder.

Update user calendar

Tool to update the properties of a user's calendar.

Update user calendar event

Tool to update an event in a specific user's calendar.

Update user calendar permission

Tool to update calendar permission levels for a specific user's calendar.

Update user calendar by ID

Tool to update properties of a specific calendar by ID for a specific user.

Update user child folder message

Tool to update a message in a child folder within a user's mailbox.

Update user contact extension

Tool to update an open extension on a contact in a user's contact folder.

Update user contact extension

Tool to update an open extension on a contact in a user's contact folder.

Update user contact extension (v3)

Tool to update an open extension on a contact directly under a user's contacts collection.

Update user events extensions

Tool to update an open extension on a user's calendar event.

Update User Inference Classification Override

Tool to update the classification of messages from a specific sender in a user's Focused Inbox.

Update user mail folder message

Tool to update properties of a message in a specific mail folder for a user.

Update user message extension

Tool to update an open extension on a message within a specific user's mail folder.

Update user mail folder message rule

Tool to update a message rule in a user's mail folder.

Update user mail folder child folder

Tool to update a child folder within a mail folder for a specific user.

Update user message extension

Tool to update an open extension on a user's message.

FAQ

Frequently asked questions

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

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

Start with Outlook.It takes 30 seconds.

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

Start building