Skip to main content
Glama
vovafes

discord-mcp

by vovafes

Discord MCP Server

A Model Context Protocol (MCP) server that gives Claude (and any other MCP-compatible AI) full access to Discord using a user token — read and send messages, manage threads, react, search message history, send DMs, and more.

Note: This server uses a Discord user token, not a bot token. No app registration needed — just grab your token and go.

Demo

Ask Claude things like:

  • "What are the latest 20 messages in #general?"

  • "Send a message to #announcements saying the deployment is done."

  • "Search #support for messages about 'login error'."

  • "Send a DM to user 123456789 saying 'hey, got a minute?'"

  • "What are my recent mentions across all servers?"

  • "Create a thread called 'Bug report' on that last message."

  • "List all members of my server."


Related MCP server: MCP-Discord

Features

Tool

Description

get_bot_info

Show the connected account's username, ping, and server count

list_guilds

List all servers you're in

get_guild_info

Detailed info about a server (members, boosts, verification, 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 before/after pagination

send_message

Send a plain-text message, with optional reply

send_embed

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

edit_message

Edit one of your own messages

delete_message

Delete a message

pin_message

Pin or unpin a message

add_reaction

React to a message with a Unicode or custom emoji

create_thread

Start a thread from a message or create a standalone thread

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

Get all pinned messages in a channel

get_dm_channels

List your open DM channels

send_dm

Send a direct message to any user by ID

get_mentions

Find recent messages that mention you across all servers


Requirements

  • Node.js 18 or later

  • Your Discord user token


Setup

1. Get your Discord User Token

  1. Open Discord in your browser (discord.com/app).

  2. Press F12 to open DevTools → Network tab.

  3. Send any message or switch channels.

  4. Filter requests by messages or any API call, click one, and look at the Request Headers.

  5. Find the Authorization header — its value is your user token.

Alternatively, in the Console tab paste:

(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 is like a password. Never share it, commit it to git, or expose it publicly. Anyone with your token has full access to your account.

2. Install the MCP Server

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

3. Configure Claude Desktop (or any MCP client)

Open your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the discord-mcp server entry:

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

Restart Claude Desktop. The Discord tools will appear in Claude's tool list.

4. Configure Claude Code CLI

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

Usage Examples

Once connected, talk to Claude naturally:

"List all my Discord servers."
"Show the 20 most recent messages in channel ID 123456789."
"Send 'Hello!' to channel 987654321."
"Search #help for 'connection refused'."
"Pin message ID 111222333 in channel 444555666."
"Create a thread called 'Discussion' from message 777888999."
"Add a 👍 reaction to message 000111222 in channel 333444555."
"List all members in guild 666777888."
"Send a DM to user 111222333 saying 'are you free?'"
"Show my recent mentions."

Environment Variables

Variable

Required

Default

Description

DISCORD_USER_TOKEN

Yes

Your Discord user token

REQUEST_DELAY_MS

No

5000

Minimum delay between REST calls (ms). Raise this if you get 429s.

Rate-Limit Protection

Discord enforces strict rate limits on user tokens. The server has three layers of protection built in:

1. Per-request throttle Every REST call goes through a shared queue that enforces a minimum gap of REQUEST_DELAY_MS (default 1 000 ms) between consecutive requests. This keeps the request rate well below Discord's per-route limits.

2. Exponential back-off on 429 If Discord returns a rate-limit response anyway, the server automatically retries — waiting 2 s → 4 s → 8 s → 16 s before each attempt (up to 4 retries, capped at 30 s).

3. Hard scan caps Bulk scanning tools that touch many channels at once are capped to prevent runaway API usage:

  • search_messages — scans at most 5 batches × 100 messages = 500 messages

  • get_mentions — scans at most 20 channels across all servers

If you're on many large servers or see errors, increase REQUEST_DELAY_MS:

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

Development

# Run in dev mode (no build step)
DISCORD_USER_TOKEN=your_token npm run dev

# Build
npm run build

# Run built output
DISCORD_USER_TOKEN=your_token npm start

Architecture

Claude / MCP Client
       │
       │ stdio (JSON-RPC)
       ▼
discord-mcp (Node.js)
       │
       │ discord.js (WebSocket + REST)
       ▼
  Discord API

The server speaks MCP over stdio — no HTTP port, no network exposure. Claude Desktop (or any MCP host) spawns the process directly.


License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    A Discord Model Context Protocol server that enables AI assistants to interact with Discord, providing functionality for sending messages, managing channels, handling forum posts, and working with reactions.
    22
    915
    101
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A Discord MCP server that enables AI assistants to interact with Discord platforms, providing functionalities like sending messages, managing channels, creating forum posts, and handling webhooks.
    21
    915
    1
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A Discord Model Context Protocol server that enables AI assistants to interact with Discord by sending messages, managing channels, handling forum posts, managing webhooks, and processing reactions.
    22
    134
    5
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vovafes/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server