Skip to main content
Glama
Discord MCP Server

Discord MCP Server

by vovafes

πŸ€– Discord MCP Server

Give Claude full access to Discord.
Read messages, send messages, manage threads, react, search history, send DMs β€” all through natural conversation.

Made by Claude for Claude MCP License: MIT


What is this?

Discord MCP Server is a Model Context Protocol server that bridges Claude and Discord. Once connected, you can talk to Claude in plain English and it will interact with your Discord account β€” no scripting, no dashboards, no manual API calls.

Uses a Discord user token β€” no bot registration needed.


Related MCP server: Discord MCP Server

Demo

You: "What are the last 15 messages in #general?"
You: "Send a message to #announcements: deployment done βœ…"
You: "Search #support for messages about 'login error'"
You: "DM user 123456789 and say hey, got a minute?"
You: "Create a thread called 'Release notes' from that last message"
You: "What are my recent mentions across all servers?"
You: "React to message 987654321 with πŸ‘"

Tools

Tool

Description

get_bot_info

Connected account info (username, ping, server count)

list_guilds

All Discord servers you're in

get_guild_info

Server details: members, boosts, verification level, etc.

list_channels

All channels in a server, sorted by position

get_channel_info

Info about a specific channel

get_messages

Fetch recent messages (up to 100), with pagination

send_message

Send a message, with optional reply

send_embed

Send a rich embed (title, description, fields, color, footer)

edit_message

Edit one of your own messages

delete_message

Delete a message

pin_message

Pin or unpin a message

add_reaction

React with a Unicode or custom emoji

create_thread

Start a thread from a message or create a standalone one

list_members

List server members with roles (up to 1 000)

get_user_info

Full profile of a user in a server

search_messages

Keyword search across recent channel history

get_pinned_messages

All pinned messages in a channel

get_dm_channels

List your open DM conversations

send_dm

Send a direct message to any user by ID

get_mentions

Recent messages that mention you across all servers


Requirements


Setup

1. Get your Discord User Token

  1. Open Discord in your browser at discord.com/app

  2. Press F12 β†’ Network tab

  3. Send any message or switch a channel

  4. Find any request to discord.com/api, click it, look at Request Headers

  5. Copy the value of the Authorization header β€” that's your token

Or paste this in the browser Console:

(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m)
  .find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()

⚠️ Your user token = your password. Never share it, commit it to git, or put it in public config files.


2. Install

git clone https://github.com/vovafes/discord-mcp-server.git
cd discord-mcp-server
npm install
npm run build

3. Connect to Claude Desktop

Edit your Claude Desktop config:

  • macOS β†’ ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows β†’ %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/absolute/path/to/discord-mcp-server/dist/index.js"],
      "env": {
        "DISCORD_USER_TOKEN": "YOUR_TOKEN_HERE"
      }
    }
  }
}

Restart Claude Desktop β€” the Discord tools will appear automatically.


4. Connect to Claude Code CLI

claude mcp add discord \
  --env DISCORD_USER_TOKEN=YOUR_TOKEN_HERE \
  -- node /absolute/path/to/discord-mcp-server/dist/index.js

Configuration

Variable

Required

Default

Description

DISCORD_USER_TOKEN

βœ…

β€”

Your Discord user token

REQUEST_DELAY_MS

❌

5000

Delay between REST calls in ms. Lower = faster, higher = safer.


Rate-Limit Protection

Discord enforces strict limits on user tokens. Three layers of protection are built in:

Global throttle

Every REST call passes through a shared gate that enforces a minimum gap of REQUEST_DELAY_MS (default 5 seconds) between consecutive requests.

Exponential back-off

On a 429 Too Many Requests response, the server automatically retries:

attempt 1 β†’ wait 2s
attempt 2 β†’ wait 4s
attempt 3 β†’ wait 8s
attempt 4 β†’ wait 16s  (then give up)

Hard scan caps

Bulk tools that touch many channels are capped to prevent runaway API storms:

Tool

Limit

search_messages

Max 500 messages (5 batches Γ— 100)

get_mentions

Max 20 channels scanned across all servers

To tune the throttle:

"env": {
  "DISCORD_USER_TOKEN": "...",
  "REQUEST_DELAY_MS": "2000"
}

Architecture

╔══════════════════╗
β•‘  Claude / MCP    β•‘
β•‘     Client       β•‘
β•šβ•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•
         β”‚ stdio (JSON-RPC)
╔════════▼═════════╗
β•‘  discord-mcp     β•‘  ← this server
β•‘  (Node.js)       β•‘
β•šβ•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•
         β”‚ discord.js (WebSocket + REST)
╔════════▼═════════╗
β•‘  Discord API     β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

The server speaks MCP over stdio β€” no open ports, no HTTP server. The MCP host (Claude Desktop, Claude Code, etc.) spawns it as a subprocess.


Development

# Dev mode β€” no build step needed
DISCORD_USER_TOKEN=your_token npm run dev

# Build
npm run build

# Run built output
DISCORD_USER_TOKEN=your_token npm start

Made by Claude for Claude πŸ€–

Built with discord.js Β· Model Context Protocol SDK

Available Tools

20 tools
add_reactionA

Add an emoji reaction to a message

Inputs: emoji (required), channel_id (required), message_id (required).

create_threadA

Create a thread from a message or a standalone thread in a channel

Inputs: name (required), channel_id (required), message_id, auto_archive_minutes.

delete_messageB

Delete a message

Inputs: channel_id (required), message_id (required).

edit_messageA

Edit one of your own messages

Inputs: content (required), channel_id (required), message_id (required).

get_channel_infoA

Get information about a specific channel

Inputs: channel_id (required).

get_dm_channelsA

List open DM conversations

Inputs: no named parameters.

get_guild_infoB

Get detailed information about a Discord server

Inputs: guild_id (required).

get_meA

Get information about the connected Discord account

Inputs: no named parameters.

get_mentionsA

Find recent messages that mention you (scans up to 20 channels across all servers)

Inputs: limit.

get_messagesB

Retrieve recent messages from a channel

Inputs: channel_id (required), after, limit, before.

get_pinned_messagesB

Get all pinned messages in a channel

Inputs: channel_id (required).

get_user_infoB

Get a user's profile in a server

Inputs: user_id (required), guild_id (required).

list_channelsA

List all channels in a Discord server

Inputs: guild_id (required).

list_guildsA

List all Discord servers the account is in

Inputs: no named parameters.

list_membersB

List members in a server

Inputs: guild_id (required), limit.

pin_messageB

Pin or unpin a message

Inputs: channel_id (required), message_id (required), pin.

search_messagesA

Search for messages containing a keyword in a channel (scans up to 500 recent messages)

Inputs: query (required), channel_id (required), limit.

send_dmA

Send a direct message to a user by their ID

Inputs: content (required), user_id (required).

send_embedA

Send a rich embed message to a channel

Inputs: title (required), channel_id (required), url, color, +3 more.

send_messageC

Send a message to a channel

Inputs: content (required), channel_id (required), reply_to.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 20 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: message retrieval (recent, pinned, search, mentions), sending (message, embed, DM), and management (edit, delete, pin, react), plus guild/channel/member info. No two tools overlap; even send_message and send_embed are clearly separated by format.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case pattern (e.g., get_messages, send_dm, create_thread, list_guilds). Collection retrieval uses list_* while single-item retrieval uses get_*, creating a clear and predictable convention. No mixed casing or irregular verbs.

    Tool Count4/5

    20 tools is slightly above the typical 3-15 range but justified by the breadth of Discord functionality covered: message actions, server/channel info, DMs, and threads. Each tool has a distinct purpose with no unnecessary redundancy, so the count feels appropriate for a feature-rich Discord MCP server.

    Completeness4/5

    The tool surface covers core messaging lifecycle (create, read, update, delete, pin, react), channel/guild/member inspection, and direct messaging. Minor gaps exist (e.g., no message-by-ID fetch, no file upload, no reaction removal), but agents can work around these with search and pin tools. The missing server management features are outside the apparent scope of this read/message-centric server.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables interaction with Discord through natural language, including reading and sending messages, managing servers, and user actions.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with Discord through the REST API and real-time events, supporting message management, user info, channel operations, and more with security controls.
      16 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude to manage Discord servers through the Discord API, supporting server info, messaging, channel management, webhooks, and user interactions.
      2 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Code to interact with Discord servers, including sending messages, reading channels, managing threads, and adding reactions via natural language commands.
      9 npm
      MIT