How to integrate Discordbot MCP with Vercel AI SDK v6

This guide walks you through connecting Discordbot to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Discordbot agent that can add reaction emoji to welcome message, bulk delete spam messages in general channel, assign moderator role to user instantly through natural language commands. This guide will help you understand how to give your Vercel AI SDK agent real control over a Discordbot account through Composio's Discordbot MCP server. Before we dive in, let's take a quick look at the key ideas and tools involved.

Discordbot logoDiscordbot
Oauth2

Discordbot is an automation tool for Discord servers that handles moderation, messaging, and user engagement. It helps communities run smoothly by automating routine and complex tasks.

165 Tools

Introduction

This guide walks you through connecting Discordbot to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Discordbot agent that can add reaction emoji to welcome message, bulk delete spam messages in general channel, assign moderator role to user instantly through natural language commands.

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

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

Also integrate Discordbot with

TL;DR

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

The Discordbot MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Discordbot account. It provides structured and secure access to your Discord servers, so your agent can perform actions like moderating users, managing roles, handling group messages, triggering auto-moderation, and automating channel maintenance on your behalf.

  • User moderation and banning: Instruct your agent to ban or bulk ban users, delete their recent messages, and keep your community safe from unwanted behavior.
  • Role and membership management: Automatically assign roles, add users to servers or threads, and update member information to streamline onboarding and permissions.
  • Automated message handling: Let your agent bulk delete messages in a channel or add emoji reactions to keep conversations tidy and interactive.
  • Custom command creation: Enable your agent to create new global application commands, so your Discord server can respond to custom triggers and workflows.
  • Auto moderation rule setup: Have your agent set up or update auto moderation rules for your guild, ensuring safe and compliant community interactions around the clock.

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

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

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

Add recipient to group channel

Adds a user to a Discord group DM channel.

Add guild member

Adds a user to a Discord guild using their OAuth2 access token (which must have guilds.

Assign role to guild member

Assigns a role to a guild member.

Add Reaction To Message

Adds an emoji reaction from the bot to a message.

Add thread member

Adds a user to a specific, unarchived thread.

Ban user from guild

Permanently bans a user from a Discord guild, optionally deleting their recent messages.

Bulk ban users from guild

Bans up to 200 users from a Discord guild, optionally deleting their recent messages.

Bulk Delete Messages

Bulk deletes messages in a Discord channel.

Create global application command

Creates a new global Discord application command.

Create auto moderation rule

Creates a new auto moderation rule for a Discord guild.

Create channel invite

Creates a new invite link for a Discord channel.

Initiate user channel with recipient

Creates a new direct message (DM) channel or retrieves an existing one, using recipient_id for a 1-on-1 DM or access_tokens for a group DM; this action only establishes or fetches the channel and does not send messages.

Create new guild

Creates a new Discord guild (server).

Create guild application command

Creates a new guild-specific application command.

Create guild channel

Creates a new Discord channel (text, voice, category, etc.

Create guild emoji

Creates a new custom emoji in a specified Discord guild, requiring CREATE_EXPRESSIONS permission and adherence to guild emoji limits.

Create guild from template

Creates a new Discord guild by applying channels, roles, and settings from a specified guild template code.

Create role with guild id

Creates a new role in a Discord guild with customizable name, permissions, color, hoist, mentionability, and icon.

Create guild scheduled event

Creates a new scheduled event in a Discord guild.

Create guild sticker

Uploads a PNG, APNG, GIF, or Lottie JSON file (max 512KB) as a new custom sticker to the specified Discord guild; requires Manage Expressions permission.

Create guild template

Creates a template of an existing Discord guild's structure (settings, roles, channels) but not its content (messages, members).

Post interaction callback

Sends a response to a Discord interaction (e.

Send Message To Channel

Sends a message to a Discord channel.

Create stage instance

Creates a new Stage instance in a Stage channel for hosting live audio events.

Create new thread in channel

Creates a new thread in a text, announcement, forum, or media channel.

Create thread from message

Creates a new thread from a specific message in a Discord channel, requiring CREATE_PUBLIC_THREADS permission.

Create channel webhook

Creates a new webhook in a specified Discord channel, requiring MANAGE_WEBHOOKS permission.

Crosspost Message

Crossposts a message from an announcement channel to all channels following it.

Delete All Reactions

Removes all reactions from a message.

Delete All Reactions By Emoji

Removes all reactions for a specific emoji from a message.

Delete global application command

Permanently deletes a global application command.

Delete auto moderation rule

Permanently deletes a specific auto moderation rule from a Discord guild.

Delete channel by id

Permanently deletes a Discord channel by its ID.

Delete channel permission override

Removes channel-specific permission overwrites for a user or role, reverting them to default permissions inherited from the server or category.

Remove user from group DM

Removes a recipient from a Discord group DM channel.

Delete guild by id

Permanently deletes a specified Discord guild (server).

Delete guild application command

Permanently deletes a guild-specific application command.

Delete guild emoji by id

Permanently deletes a specified custom emoji from a guild, requiring Manage Expressions permissions; cannot delete default emojis and is irreversible.

Delete guild integration

Permanently deletes a specific integration from a Discord guild, removing any associated webhooks and kicking the bot if present.

Delete guild member by id

Removes (kicks) a member from a Discord guild.

Delete guild member role

Removes a specified role from a member of a Discord guild.

Delete role from guild

Permanently deletes a specified role from a Discord guild, revoking it from all members.

Delete guild scheduled event

Permanently deletes a specific scheduled event from a Discord guild.

Delete guild sticker

Permanently deletes a custom sticker from a Discord guild; the specified guild and sticker must exist, and this action is irreversible.

Delete guild template by code

Deletes an existing guild template by its unique code from a specified guild, returning the deleted template's details.

Delete Message

Permanently deletes a message from a Discord channel.

Remove My Reaction

Removes the bot's own emoji reaction from a message.

Delete original webhook message

Permanently deletes the original (@original) message posted by a webhook or interaction response.

Delete stage instance

Permanently deletes the Stage instance for a given stage channel, ending the live audio event.

Remove thread member

Removes a user from a specified, unarchived thread.

Remove User Reaction

Removes a specific user's emoji reaction from a message.

Delete webhook by id

Permanently deletes a Discord webhook by its unique ID.

Delete webhook by token

Permanently deletes a Discord webhook using its ID and token, without bot authentication.

Delete webhook message

Deletes a message previously sent by a Discord webhook.

Execute GitHub-compatible webhook

Forwards GitHub event notifications to a Discord channel via a GitHub-compatible webhook endpoint.

Execute Slack-compatible webhook

Sends messages to Discord via its Slack-compatible webhook endpoint, supporting Slack attachment formatting.

Execute webhook

Executes a Discord webhook to send messages, embeds, or interactive components to a channel or thread.

Add follower to channel via webhook

Follows an Announcement Channel to relay its messages to a target channel via webhook.

List active threads in guild

Retrieves all active (non-archived) threads in a Discord guild that the bot can access.

Get application details

Retrieves the full details of a Discord application by its application_id.

Get global application command

Retrieves a specific global application command by its application ID and command ID.

Get application role connections metadata

Retrieves all role connection metadata records for a Discord application.

Get user role connection

Fetches the role connection object for the current user for a specified Discord application.

Get auto moderation rule

Retrieves the complete configuration of a specific auto moderation rule within a Discord guild.

Get bot gateway

Retrieves the WSS URL, recommended shard count, and session start limits for connecting a bot to the Discord Gateway.

Retrieve channel details

Retrieves detailed metadata for a specific Discord channel by its channel_id.

Get gateway URL

Retrieves the WebSocket URL to connect to Discord's Gateway for receiving real-time events.

Retrieve guild details

Retrieves detailed information for a specified Discord guild (server) by its guild_id, optionally including approximate member and presence counts if with_counts is true.

Get guild application command

Retrieves detailed information for a specific application command within a Discord guild.

Get guild command permissions

Retrieves the permissions for a specific application command within a guild.

Get guild ban

Fetches the ban details for a specific user in a Discord guild, if that user is currently banned.

Fetch emoji by guild and id

Retrieves details for a specific custom emoji within a specified Discord guild, requiring valid and accessible guild and emoji IDs.

Retrieve guild member by user id

Retrieves detailed information for a specific member of a Discord guild, provided the bot belongs to the guild and has necessary permissions.

Preview guild by id

Fetches a public preview of a Discord guild by its ID, if the guild has the preview feature enabled.

Get guild scheduled event

Retrieves a specific scheduled event from a Discord guild by its ID, optionally including the count of subscribed users.

Get guild onboarding

Retrieves the onboarding settings for a specified Discord guild, including prompts, options, default channels, and enabled status.

Retrieve sticker from guild

Retrieves a specific sticker from a Discord guild using the guild and sticker IDs; requires the sticker to exist in the guild.

Retrieve guild template with code

Retrieves the complete structure and details of a Discord guild template using its unique code.

Retrieve guild vanity url

Retrieves the vanity URL invite code and usage count for a Discord guild.

Retrieve guild webhooks

Retrieves all webhooks for a specified Discord guild, requiring MANAGE_WEBHOOKS permission.

Retrieve guild welcome screen

Retrieves the welcome screen configuration for a Discord guild with the Community feature enabled.

Retrieve guild widget json

Retrieves the public JSON widget data for a Discord guild, if the widget is enabled for that guild.

Get Guild Widget PNG

Tool to retrieve a PNG image widget for a Discord guild.

Retrieve guild widget settings

Retrieves the widget settings for a specified Discord guild, indicating if the widget is enabled and its configured channel ID.

Get Message

Retrieves a specific message from a Discord channel by channel and message ID.

Get my application

Retrieves detailed information about the current authenticated Discord application via /applications/@me.

Get my OAuth2 application

Retrieves detailed information about the OAuth2 application associated with the current authentication.

Retrieve original webhook message

Retrieves the original (@original) message from a Discord webhook or interaction response.

Get OAuth2 public keys

Retrieves Discord's OAuth2 public keys in JWK format for verifying access tokens.

Get stage instance

Retrieves the active Stage instance for a specified stage channel.

Get sticker

Retrieves a specific Discord sticker by its unique ID.

Retrieve thread member by id

Retrieves a member from a specified thread using their user ID, optionally including guild member details.

Get user

Fetches public information for a Discord user by their user ID.

Retrieve webhook by id

Retrieves detailed information for a Discord webhook by its unique ID.

Retrieve webhook by token

Retrieves a Discord webhook's configuration using its ID and token, without requiring bot authentication.

Retrieve webhook message

Retrieves a specific message previously sent by a Discord webhook.

Resolve invite by code

Resolves a Discord invite code to get its details, optionally including member counts and expiration.

Revoke invite by code

Revokes a Discord invite using its code, permanently preventing new joins via this link.

Join thread

Joins the authenticated user to a thread specified by channel_id.

Leave Guild

Enables the bot to leave a specified Discord guild (server).

Leave thread

Removes the currently authenticated user from a specified thread.

List global application commands

Fetches all global application commands for the specified Discord application.

List auto moderation rules

Retrieves all auto moderation rules for a specified Discord guild.

List channel invites

Fetches all active invites for a given Discord channel.

List Channel Webhooks

Retrieves all webhooks configured in a given Discord channel.

List guild command permissions

Retrieves all guild-level permission settings for all commands of a specific application within a guild.

List guild application commands

Fetches all application commands registered for a specific guild.

Get guild audit logs

Retrieves audit log entries for a specified Discord guild, requiring VIEW_AUDIT_LOG permission.

List guild bans

Fetches a list of users banned from a specified Discord guild.

Retrieve guild channels

Fetches all channels (text, voice, category, etc.

Retrieve guild emojis

Fetches all custom emoji objects for a specified Discord guild if the bot has access; returns only custom guild emojis, not standard Unicode or Nitro emojis.

List guild integrations

Lists all integration objects for a specified Discord guild.

List guild invites

Retrieves all currently active invite codes for a specified Discord guild.

Get guild members

Retrieves a list of members for a Discord guild.

List guild roles

Fetches all roles in a Discord guild, providing details for each role including permissions, color, position, and other attributes.

List guild scheduled events

Retrieves a list of scheduled events for a specified Discord guild, optionally including subscribed user counts.

List scheduled event users

Fetches users who have expressed interest in a specific scheduled event within a Discord guild.

Retrieve guild stickers

Retrieves all custom sticker objects for a Discord guild; does not include standard/Nitro stickers.

Get guild templates by guild id

Retrieves all guild templates for an existing Discord guild, specified by its ID.

List guild voice regions

Fetches a list of available voice regions for a specified Discord guild.

List Reactions By Emoji

Lists users who reacted to a message with a specific emoji.

Fetch Messages From Channel

Retrieves messages from a Discord channel, ordered newest first.

List my private archived threads

Retrieves private archived threads from a channel that the current user is a member of.

List Pinned Messages

Retrieves all pinned messages from a Discord channel.

List private archived threads

Lists private archived threads in a Discord channel, sorted by most recent archival.

List public archived threads

Lists public archived threads in a Discord channel, sorted by most recent archival.

List sticker packs

Fetches all available Nitro sticker packs from Discord, excluding custom or guild-specific sticker packs.

List thread members

Retrieves members of a specified Discord thread, with an option to include full guild member objects.

List voice regions

Lists all available Discord voice regions that can be used when setting a voice or stage channel's region.

Pin Message

Pins a message in a Discord channel.

Preview guild prune

Previews the number of members that would be pruned from a Discord guild based on inactivity days and optional roles; does not remove members.

Prune inactive guild members

Removes inactive members from a Discord guild.

Update guild onboarding configuration

Configures or updates a Discord guild's new member onboarding flow, including prompts, options, default channels, and enabled status.

Search guild members by username or nickname

Searches for members in a specific Discord guild by matching a query string against usernames and nicknames.

Modify channel permissions

Updates or creates a permission overwrite for a role (type 0) or member (type 1) within a Discord channel using allow and deny bitwise values.

Sync guild template

Synchronizes a guild template with its source guild, updating it to match the source's current configuration; does not affect guilds already created from this template.

Test bot token authentication

Tool to validate the configured Discord bot token by fetching the current authenticated bot user.

Trigger typing indicator

Shows the bot is typing in a Discord channel.

Unban user from guild

Revokes a ban for a user from a Discord guild, allowing them to rejoin.

Unpin Message

Unpins a message from a Discord channel.

Update application

Updates a Discord application's settings using its application_id.

Update global application command

Updates properties of a global application command.

Update user application role connection

Updates the current user's application role connection metadata for Discord's Linked Roles feature.

Update auto moderation rule

Updates an existing auto moderation rule in a Discord guild.

Update channel settings

Updates a Discord channel's settings (name, topic, permissions, etc.

Update guild settings

Updates settings for a Discord guild (server).

Update guild application command

Updates properties of a guild-specific application command.

Update guild emoji

Updates a custom emoji's name and/or role restrictions in a Discord guild; cannot create or delete emojis, and role updates for managed emojis may be restricted by their integration.

Modify guild member details

Updates a guild member's attributes including nickname, roles, voice state, timeout status, and flags.

Modify guild role

Updates a Discord guild role's attributes (name, permissions, color, etc.

Update guild scheduled event

Updates an existing scheduled event in a Discord guild.

Update guild sticker info

Modifies a guild sticker's name, description, or tags.

Update guild template

Updates a Discord guild template's name and/or description; omitted fields retain current values, and an empty string for description clears it.

Update guild welcome screen

Updates a guild's welcome screen configuration, including description, enabled status, and up to 5 welcome channels.

Update guild widget settings

Updates a Discord guild's widget settings, such as its enabled state or invite channel.

Edit Message

Edits a message previously sent by the bot.

Update my application

Updates settings for the current authenticated Discord application via /applications/@me.

Update bot's nickname in guild

Modifies the current bot's member profile (nickname) in a Discord guild.

Update current bot user profile

Updates the current bot user's Discord username and/or avatar.

Update original webhook message

Updates the original (@original) message previously sent by a webhook or interaction response.

Update own voice state

Updates the bot's own voice state in a guild Stage channel, such as toggling suppress or requesting to speak.

Update user voice state

Updates another user's voice state in a Discord stage channel.

Update webhook details

Updates properties of an existing Discord webhook such as name, avatar, or channel.

Update webhook by token

Updates a Discord webhook's name and/or avatar using its ID and token, without bot authentication.

Update webhook message

Updates a message previously sent by a webhook, allowing modification of content, embeds, attachments, or components.

FAQ

Frequently asked questions

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

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

Start with Discordbot.It takes 30 seconds.

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

Start building