Set up Discord in Metorial for Claude, ChatGPT and Cursor
Share Discord with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or bot token sign-in, 17 tools (2 read-only).
To give your team Discord in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Discord integration in a Metorial portal, and each person signs in to Discord with their own account. Agents can send, edit, and delete messages in channels. The integration has 17 tools, 2 read-only, 11 write and 4 destructive, plus 5 triggers.
What you'll learn
- How an admin shares Discord in a portal and how each person connects
- The 10 OAuth scopes Discord can request, and what each one allows
- How to keep the 2 read-only tools and reject the other 15
Before you start
- A portal with at least one access group
- An account with Discord for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Bot Token | API token | botToken |
| OAuth2 (default) | OAuth | Signs in to Discord |
The portal and metorial setup use OAuth2 unless someone picks another method.
Bot Token
To connect, a person enters:
botToken: Bot token from the Discord Developer Portal
OAuth2
People sign in to Discord and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
identify | Identify | Access basic user info (no email) |
email | Access user email address | |
guilds | Guilds | List the user's guilds |
guilds.join | Guilds Join | Add users to a guild (bot must already be a member) |
guilds.members.read | Guild Members Read | Read a user's guild member info |
connections | Connections | Access user's linked third-party accounts |
bot | Bot | Install a bot user to a guild |
applications.commands | App Commands | Register application commands in a guild |
webhook.incoming | Incoming Webhook | Generate an incoming webhook via OAuth2 flow |
role_connections.write | Role Connections | Update a user's role connection metadata |
Use your own Discord OAuth app
With your own OAuth app, people see your company's name on the Discord consent screen, and the client ID and secret belong to you.
Start the credentials in Metorial
In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Discord and copy the Redirect URI.
Register the app with Discord
In the Discord Developer Portal, create an application, open its OAuth2 settings and add the redirect URI from Metorial as a redirect. Copy the client ID and client secret from the same page.
OAuth acts as the person who signed in. To post as a bot in your servers instead, use the Bot Token method with a token from the same application. A bot left as Public Bot can be added to servers by anyone with its link, so turn that off for an internal bot.
Finish in Metorial
Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Discord integration.
Admin: share Discord in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Discord. Under Auth Method, keep OAuth2 or pick another. For how members connect, choose Each person connects, so everyone signs in to Discord as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Discord.
Choose who gets it
Add the access groups that should see Discord. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Discord integration. Once it exists, check which groups have it:
Employee: connect Discord
In the portal
Open Discord in the catalog
Sign in to your portal and open Discord. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Discord sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses OAuth2. To connect with Bot Token instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your Discord connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 2 read-only tools, such as get_audit_log and get_current_user, and lose the 11 write tools, such as manage_guild or send_message, and the 4 destructive tools, such as manage_roles or manage_emojis.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 17 tools, minus any you rejected. get_audit_log needs guildId, so replace the placeholders. It fetches audit log entries for a Discord guild.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (2)
get_audit_log: Fetch audit log entries for a Discord guild. NeedsguildId.get_current_user: Get the Discord account behind this connection: the bot user for a bot token, or the signed-in user for an OAuth connection.
Write tools (11)
manage_threads: Manage Discord threads and forum posts: create a thread from a message, create a standalone thread or forum post, update (rename, archive, lock) a thread, add a member, or list active and archived threads.manage_auto_moderation: Manage auto moderation rules in a Discord guild. NeedsactionandguildId.manage_scheduled_events: Manage guild scheduled events in Discord. NeedsactionandguildId.manage_channels: List, get, create, update, or delete channels in a Discord guild.manage_webhooks: List, create, update, delete, or execute webhooks in a Discord channel or guild. Needsaction.send_message: Send a message to a Discord channel. NeedschannelId.manage_messages: Manage messages in a Discord channel. NeedsactionandchannelId.manage_invites: List, create, or delete Discord invites. Needsaction.manage_guild: Get information about a Discord guild (server), list the current user's guilds, or update guild settings such as name, description, verification level, and notification preferences. Needsaction.manage_members: List, get, search, update, kick, ban, or unban members in a Discord guild. NeedsactionandguildId.open_dm_channel: Open (or reuse) the direct message channel between the bot and a Discord user.
Destructive tools (4)
manage_reactions: Add or remove emoji reactions on a Discord message.manage_roles: List, create, update, or delete roles in a Discord guild.manage_application_commands: List, get, create, update, or delete Discord application commands at global or guild scope. Needsaction,scopeandapplicationId.manage_emojis: List, get, create, update, or delete custom guild emojis in Discord. NeedsactionandguildId.
Triggers
Discord has 5 triggers, which fire on events in Discord:
new_message: Triggers when a new message is posted in a Discord channel.inbound_webhookguild_update: Triggers when a guild (server) setting changes, such as name, description, icon, verification level, owner, or other server-level properties.channel_update: Triggers when channels in a Discord guild are created, deleted, or updated.member_update: Triggers when guild members change.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Discord there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Discord on metorial.com: the integration overview