Discord Integration
Send and manage Discord messages; list guilds and channels (bot token required on server for channel APIs)
The Discord integration provides access to send and manage Discord messages; list guilds and channels (bot token required on server for channel APIs) through the Integrate MCP server.
Installation
The Discord integration is included with the SDK:
import { discordIntegration } from "integrate-sdk/server";Setup
1. Create a Discord OAuth App
- Go to Discord Developer Portal
- Create a new OAuth application
- Configure your redirect URI
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Discord integration to your server configuration. The integration automatically reads DISCORD_CLIENT_ID and DISCORD_CLIENT_SECRET from your environment variables:
import { createMCPServer, discordIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
discordIntegration({
}),
],
});You can override the environment variables by passing explicit values:
discordIntegration({
clientId: process.env.CUSTOM_DISCORD_ID,
clientSecret: process.env.CUSTOM_DISCORD_SECRET,
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("discord");
const result = await client.discord.getCurrentUser({});
console.log(result);If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, discordIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [discordIntegration()],
});Configuration Options
export interface DiscordIntegrationConfig {
/** Discord application OAuth2 client id (defaults to DISCORD_CLIENT_ID) */
clientId?: string;
Tools
discord_get_current_user
Get current user
No parameters.
discord_list_my_guilds
List my guilds
export interface DiscordListMyGuildsParams {
limit?: number;
discord_get_guild
Get guild
export interface DiscordGetGuildParams {
guild_id: string;
discord_list_guild_channels
List guild channels
export interface DiscordListGuildChannelsParams { guild_id: string }
discord_get_channel
Get channel
export interface DiscordGetChannelParams { channel_id: string }
discord_send_message
Send message
export interface DiscordSendMessageParams {
channel_id: string;
discord_list_messages
List messages
export interface DiscordListMessagesParams {
channel_id: string;
discord_edit_message
Edit message
export interface DiscordEditMessageParams {
channel_id: string;
discord_delete_message
Delete message
export interface DiscordDeleteMessageParams {
channel_id: string;
Notes
- Category: Communication
- Authentication mode: OAuth