discord-mcp
Provides tools to read Discord servers, channels, threads, and DMs, and to post messages as a bot via Discord's REST API. Supports listing servers and channels, reading recent messages across a server, and sending messages with mention safeguards.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@discord-mcpSummarize everything posted in my Discord server today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
discord-mcp
Read Discord and post to it from a Claude chat, on demand, with no bot process left running.
"Summarize what happened in my server today." "Post this to #announcements."
Why another Discord MCP server?
Most Discord MCP servers log in to the Discord gateway as a bot and stay connected while the client runs. That is fine for one session. It gets awkward when:
every Claude session that loads the server opens another gateway connection for the same bot, and
you already run something on that bot token, such as the official Claude Code Discord channel plugin.
discord-mcp never connects to the gateway. A tool call makes a few REST requests and returns.
Typical gateway-based server | discord-mcp | |
Connection | Bot logs in and stays connected per session | None. REST calls only while a tool runs |
Ten Claude sessions open | Ten bot logins | Nothing running between calls |
Next to the Claude Code channel plugin | A second login on the same token | Reads the plugin's token file. No conflict |
"What happened today?" | Read channel by channel |
|
Mass pings | Up to the model |
|
Built to sit next to the official Claude Code Discord plugin
Claude Code has an official Discord channel plugin (discord@claude-plugins-official).
It pushes your Discord DMs into a running session, so you can message Claude from your phone.
Its tools only work in chats you have allowlisted, by design.
discord-mcp covers the other direction.
From any Claude chat, ask Claude to read any channel the bot can see, or to post somewhere.
Point both at the same bot: discord-mcp reads the plugin's ~/.claude/channels/discord/.env, so there is one token to manage.
Related MCP server: claude-discord-mcp
Tools
Tool | What it does |
| Servers the bot is in |
| Channels and active threads, in category order |
| Messages in one channel, thread or DM, oldest first (up to 500) |
| Recent messages across every channel and active thread in a server |
| Post as the bot. Splits text over 2,000 characters at line breaks |
Messages come back compact: id, time, author, content, plus reply_to, attachments, embeds, thread_id, bot or system when present.
User mentions like <@123> are rewritten to @name.
Setup
1. Create a bot
Skip this if you already set up the Claude Code Discord channel plugin.
In the Discord Developer Portal, create an application. Under Bot, click Reset Token and copy it.
Under Bot → Privileged Gateway Intents, turn on Message Content Intent. Without it, Discord returns other people's messages with empty text.
Invite the bot to each server you want to read. Replace
<APPLICATION_ID>:https://discord.com/oauth2/authorize?client_id=<APPLICATION_ID>&scope=bot&permissions=274878008384This grants View Channels, Send Messages, Send Messages in Threads, Read Message History, Attach Files and Add Reactions.
2. Give it the token
Use either one:
the
DISCORD_BOT_TOKENenvironment variable, ora file at
~/.claude/channels/discord/.envwith one line,DISCORD_BOT_TOKEN=...(runchmod 600on it).
If you ran /discord:configure for the channel plugin, the file already exists.
3. Add it to Claude Code
claude mcp add --scope user discord -- uvx --from git+https://github.com/qgasdg/discord-mcp discord-mcpFor Claude Desktop, add this to claude_desktop_config.json:
{
"mcpServers": {
"discord": {
"command": "uvx",
"args": ["--from", "git+https://github.com/qgasdg/discord-mcp", "discord-mcp"]
}
}
}Configuration
Variable | Default | Purpose |
| none | Bot token. Takes priority over the |
|
| Where to find |
| local timezone | IANA timezone for timestamps, such as |
Example prompts
"List my Discord servers and their channels."
"Read the last 24 hours across the server and summarize it by channel."
"What did people say about the release in #general this week?"
"Reply to that last message in #support: we're looking into it."
Limits
The bot only sees servers it was invited to and channels it may view. Private channels need the bot's role added.
It cannot read your personal account or your own DMs. Doing that needs a self-bot, which breaks Discord's terms.
Bots cannot use Discord's search API. "Search" means reading recent messages and letting Claude filter them.
Archived forum posts are not listed. Active threads are.
Messages are posted as the bot, not as you.
Safety
send_messagetells Claude to show you the channel and text and get your OK before posting. Claude Code also asks before an MCP tool runs, unless you have allowed it.Anyone in a server can write text that Claude will read. Treat message content as untrusted input, and be careful about allowing
send_messagewithout a prompt.
Development
git clone https://github.com/qgasdg/discord-mcp && cd discord-mcp
python3 -m venv .venv && .venv/bin/pip install -e .
claude mcp add --scope user discord -- "$PWD/.venv/bin/python" "$PWD/discord_mcp.py"한국어 요약
Claude 채팅에서 필요할 때 디스코드 채널을 읽고 메시지를 보내는 MCP 서버입니다. 봇이 디스코드에 계속 접속해 있지 않고, 도구를 부를 때만 REST API를 호출합니다. 그래서 세션을 여러 개 열어도 봇이 중복 접속하지 않습니다. Claude Code 공식 디스코드 채널 플러그인과 같은 봇 토큰 파일을 함께 쓰고, 같이 켜도 충돌하지 않습니다. 설치는 위 "Setup" 순서를 따르세요.
License
MIT
Available Tools
5 toolslist_channelsA
List a server's channels and active threads, in category order.
server_id: a server ID from list_servers Channels of type "forum" hold no messages themselves; read their threads instead.
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, and it does disclose useful traits: results are ordered by category, active threads are included, and forum channels are empty of messages. It says nothing about permissions, pagination, or whether archived/hidden channels are excluded, which leaves real gaps for a zero-annotation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short lines, front-loaded with what the tool returns, followed by the parameter note and the one edge case that matters. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need no explanation, and this low-complexity single-parameter read tool is otherwise well covered by the prerequisite and forum caveat. Only pagination/no-archive behavior is left unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% for the single parameter, so the description must compensate, and it does by telling the agent where server_id comes from (list_servers). It doesn't describe the ID's format, but the key semantic — provenance — is covered.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (list a server's channels and active threads) plus a scope detail (category order), so the agent knows exactly what comes back. It doesn't explicitly contrast itself with read_messages or read_server_recent, so the sibling differentiation is only implicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear prerequisite chain ('server_id: a server ID from list_servers') and a concrete routing rule for forum channels ('read their threads instead'), which points the agent elsewhere for that case. It stops short of stating the general boundary versus read_messages for non-forum channels.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_serversA
List the Discord servers (guilds) the bot is a member of.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does disclose a meaningful constraint: only servers the bot itself is a member of are returned, which prevents false expectations about completeness. It doesn't discuss ordering or pagination, but for a zero-parameter read with an output schema that gap is minor.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with the key scoping qualifier at the end and zero filler. Nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Zero parameters plus an existing output schema mean return values need no explanation; the only residual gaps are ordering and whether all guilds are guaranteed to be returned. For a simple enumeration tool this is close to complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes no parameters, so there is nothing to disambiguate; baseline 4 applies. The description correctly implies no filtering options are available.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb (List) and resource (Discord servers/guilds), and even clarifies the synonym 'guilds' and the scope 'the bot is a member of'. It is clearly distinct from siblings like list_channels and read_messages, though it doesn't name them explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is the discovery step before list_channels, but the description never states when to use it versus alternatives or what to do next. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_messagesA
Read messages from one channel, thread, or DM, oldest first.
channel_id : a channel or thread ID from list_channels limit : maximum number of messages (default 50, max 500) since_hours: if set, only messages from the last N hours. e.g. 24 = the last day before : read messages older than this message ID (to page further back)
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| before | No | ||
| channel_id | Yes | ||
| since_hours | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does add value beyond structured fields: chronological ordering, a hard cap of 500 that the schema does not mention, and the paging mechanism via 'before'. It still omits the safety profile (read-only nature), permissions/scope requirements, and what a returned message looks like, which matter for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The behavior sentence is front-loaded, followed by a compact aligned parameter glossary. Every line carries information; the minor cost is the slightly list-like layout, but nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a four-parameter tool with no output schema and no annotations, the invocation side is well covered (params, ordering, paging, cap). The missing piece is the response side: without an output schema, the description should say what a message object contains or how many/how paging metadata is returned.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it largely does: all four parameters are explained, including where channel_id originates, limit's default and max, since_hours' time-window semantics with a concrete example, and before's use for backward paging. Only limit's default is redundant with the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Read messages from one channel, thread, or DM') plus an ordering guarantee ('oldest first'), which tells an agent exactly what it gets back. It does not explicitly contrast with the sibling read_server_recent, so the agent must infer that this one is scoped to a single channel/thread rather than a whole server.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Useful routing hints are present for parameters: channel_id must come 'from list_channels' and 'before' is for paging further back. However, there is no explicit statement of when to prefer this over read_server_recent, and no exclusions or prerequisites, so the when-to-use guidance is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_server_recentA
Collect recent messages from every channel and active thread in a server.
server_id : a server ID from list_servers since_hours : how many hours back to read (default 24) per_channel_limit: maximum messages per channel (default 100, max 500) Channels with no new messages are skipped without an API call. Channels the bot cannot view are listed under "skipped" with the reason.
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | ||
| since_hours | No | ||
| per_channel_limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose non-obvious runtime behavior: empty channels are skipped without an API call, and unviewable channels surface in a 'skipped' list with a reason. It omits ordering of returned messages, rate-limit behavior, and the overall shape of the collected output, keeping it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The capability statement is front-loaded in one sentence, then parameters are given in a compact aligned block; nothing is padded. The aligned-parameter format is slightly unusual but every line carries meaning, so it stays close to optimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-parameter aggregation tool with no output schema and no annotations, the description covers inputs well and hints at the 'skipped' output key, but never sketches what a collected message looks like or how results are ordered. Adequate, with a real gap on the return side.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description documents all three parameters: it names the source of server_id (list_servers), explains since_hours as lookback with its default, and gives per_channel_limit a default of 100 plus a max of 500 that appears nowhere in the schema. That fully compensates for the empty schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource with scope: 'Collect recent messages from every channel and active thread in a server.' The server-wide aggregation is clear, but it never explicitly contrasts itself with read_messages (single-channel), so the agent must infer the split from the word 'every'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'recent' plus the since_hours default, and the pointer that server_id comes from list_servers is a useful grounding cue. There is no explicit when-not statement or named alternative, so the agent gets context but no routing rule.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_messageA
Post a message as the bot to a channel, thread, or DM.
Always show the user the target channel and the exact text, and get their confirmation, before calling this. channel_id: target channel or thread ID content : message text. Over 2000 characters, it is split at line breaks reply_to : message ID to reply to (optional) @everyone, @here, and role mentions never ping; only user mentions do.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| reply_to | No | ||
| channel_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses that messages post as the bot, that content over 2000 characters is split at line breaks, and that @everyone/@here/role mentions never ping while user mentions do. It omits permission requirements, rate limits, and failure behavior, which keeps it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core action, then a confirmation rule, then a compact parameter list — no filler sentences. The inline param block is slightly list-like but earns its space given zero schema coverage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a three-parameter mutation tool with no annotations and no output schema, it covers action, preconditions, parameter meaning, and message edge cases. The remaining gap is the return value (e.g., the created message ID) and error behavior, which matter for a write operation with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% with no parameter descriptions, so the description must compensate, and it documents all three: channel_id (channel or thread ID), content (with the 2000-character splitting rule), and reply_to (message ID to reply to). The splitting rule in particular is behavior the schema cannot express.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence gives a precise verb and resource ('Post a message as the bot') plus the destination scope (channel, thread, or DM). It is unambiguously distinct from the read-only siblings (read_messages, list_channels) without needing the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It specifies a mandatory precondition workflow: show the target channel and exact text and obtain confirmation before calling. It does not name alternatives, but among the listed siblings there is no competing send tool, so the omission is minor rather than misleading.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
list_channels - First observed
list_servers - First observed
read_messages - First observed
read_server_recent - First observed
send_message
TDQS
Scored across 5 tools
The five tools have mostly distinct purposes: listing servers, listing channels, reading messages, reading a server's recent messages, and sending messages. The only potential overlap is between read_messages and read_server_recent, but their scope (one channel vs. all channels in a server) is clearly described.
All tool names follow a consistent snake_case verb_noun pattern (list_servers, list_channels, read_messages, read_server_recent, send_message). The slight variation in read_server_recent is still predictable and readable.
Five tools is a well-scoped size for a Discord bot focused on discovering servers/channels, reading messages, and sending messages. Each tool has a clear role and there is no redundant clutter.
The core read-and-send workflow is covered, but the surface lacks message editing/deletion, direct message lookup by ID, and any way to discover DM channels despite read_messages and send_message claiming DM support. These are notable gaps for a general Discord messaging toolset.
Maintenance
Related MCP Connectors
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
Connect a Discord bot (bot token from the developer portal) to read/send messages, list guilds and c
Hosted Slack MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.4 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to interact with Discord servers, including sending messages, reading channels, managing threads, and adding reactions via natural language commands.3 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to read messages, discover channels, send messages, and monitor Discord communities using the Discord HTTP API.-
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with Discord through the REST API, supporting message reading and sending, channel and guild management, threads, pins, and reactions.17MIT