---
title: "Discord Integration"
description: "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:

```typescript
import { discordIntegration } from "integrate-sdk/server";
```

## Setup

### 1. Create a Discord OAuth App

1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
2. Create a new OAuth application
3. Configure your redirect URI
4. 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:

```typescript
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:

```typescript
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:

```typescript
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:

```typescript
import { createMCPClient, discordIntegration } from "integrate-sdk";

const customClient = createMCPClient({
  integrations: [discordIntegration()],
});
```

## Configuration Options

<AutoTypeTable
  path="../src/integrations/discord.ts"
  name="DiscordIntegrationConfig"
/>


## Tools

### `discord_get_current_user`

Get current user

_No parameters._

### `discord_list_my_guilds`

List my guilds

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordListMyGuildsParams"
/>

### `discord_get_guild`

Get guild

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordGetGuildParams"
/>

### `discord_list_guild_channels`

List guild channels

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordListGuildChannelsParams"
/>

### `discord_get_channel`

Get channel

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordGetChannelParams"
/>

### `discord_send_message`

Send message

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordSendMessageParams"
/>

### `discord_list_messages`

List messages

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordListMessagesParams"
/>

### `discord_edit_message`

Edit message

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordEditMessageParams"
/>

### `discord_delete_message`

Delete message

<AutoTypeTable
  path="generated/tool-params/discord.ts"
  name="DiscordDeleteMessageParams"
/>

## Notes

- Category: Communication
- Authentication mode: OAuth
