Discord MCP Server
Allows reading messages, discovering channels, sending messages, and monitoring Discord communities using web scraping.
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 MCP Serversummarize discussions from the last 24 hours across my Discord servers"
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 Server
A Model Context Protocol (MCP) server that lets LLMs read messages, discover channels, send messages, and monitor Discord communities using web scraping.
Features
List Discord servers and channels you have access to
Read recent messages with time filtering (newest first)
Send messages to Discord channels (automatically splits long messages)
Web scraping approach - works with any Discord server you can access as a user
No bot permissions or API tokens required
Related MCP server: discord-mcp
Quick Start with Claude Code
# Add Discord MCP server
claude mcp add discord-mcp -s user -e DISCORD_EMAIL=your_email@example.com -e DISCORD_PASSWORD=your_password -e DISCORD_HEADLESS=true -- uvx --from git+https://github.com/elyxlz/discord-mcp.git discord-mcp
# Start Claude Code
claudeUsage Examples
# List your Discord servers
> use get_servers to show me all my Discord servers
# Read recent messages (max_messages is required)
> read the last 20 messages from channel ID 123 in server ID 456
# Send a message (long messages automatically split)
> send "Hello!" to channel 123 in server 456
# Send a long message (will be split automatically)
> send a very long message with multiple paragraphs to channel 123 in server 456
# Monitor communities
> summarize discussions from the last 24 hours across my Discord serversAvailable Tools
get_servers- List all Discord servers you have access toget_channels(server_id)- List channels in a specific serverread_messages(server_id, channel_id, max_messages, hours_back?)- Read recent messages (newest first, max_messages required)send_message(server_id, channel_id, content)- Send messages to channels (automatically splits long messages)
Manual Setup
Prerequisites
Python 3.10+ with
uvpackage managerDiscord account credentials
Installation
git clone https://github.com/elyxlz/discord-mcp.git
cd discord-mcp
uv sync
uv run playwright installConfiguration
Create .env file:
DISCORD_EMAIL=your_email@example.com
DISCORD_PASSWORD=your_password
DISCORD_HEADLESS=trueRun Server
uv run python main.pyClaude Desktop Integration
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"discord": {
"command": "uvx",
"args": ["--from", "git+https://github.com/elyxlz/discord-mcp.git", "discord-mcp"],
"env": {
"DISCORD_EMAIL": "your_email@example.com",
"DISCORD_PASSWORD": "your_password",
"DISCORD_HEADLESS": "true"
}
}
}
}Development
# Type checking
uv run pyright
# Formatting
uvx ruff format .
# Linting
uvx ruff check --fix --unsafe-fixes .
# Testing
uv run pytest -v tests/Security Notes
Use app passwords if 2FA is enabled
Consider using a dedicated Discord account for automation
Server includes delays to avoid rate limiting (0.5s between split messages)
Always use
DISCORD_HEADLESS=truein production
Troubleshooting
Login issues: Verify credentials, use app password for 2FA
Browser errors: Run
uv run playwright install --forceRate limits: Reduce
max_messages, monitor for Discord warnings (server auto-splits long messages with delays)Cookie issues: Delete
~/.discord_mcp_cookies.jsonif neededMessage splitting: Long messages (>2000 chars) automatically split into multiple messages with 0.5s delays
Legal Notice
Ensure compliance with Discord's Terms of Service. Only access information you would normally have access to as a user. Use for legitimate monitoring and research purposes.
Available Tools
4 toolsget_channelsB
List all channels in a specific Discord server
| Name | Required | Description | Default |
|---|---|---|---|
| server_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 of behavioral disclosure. It only states the obvious action 'List' without mentioning permissions, rate limits, whether private channels are included, or any other behavioral details. This is a minimal transparency gap for a read-only operation.
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 description is a single, front-loaded sentence with no wasted words. It communicates the essential purpose clearly.
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 simple list tool, the description is adequate but not complete. Since there is no output schema, it does not hint at the return format (e.g., channel names, objects, metadata). This is a gap, though not severe for a basic listing operation.
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% (server_id has no description). The phrase 'in a specific Discord server' adds some context for the parameter but does not explain the ID format, how to obtain it, or any constraints. The description fails to compensate for the lack of schema-level parameter details.
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 clearly states the tool's action ('List all channels') and its scope ('in a specific Discord server'), distinguishing it from sibling tools like get_servers, read_messages, and send_message.
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?
The description implies that a server_id is required but provides no explicit guidance on when to use this tool over alternatives or how to obtain the server_id (e.g., via get_servers). Usage context is only inferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_serversA
List all Discord servers (guilds) you have access to
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral disclosure. It states that it lists servers the user has access to, which conveys a read-only, access-limited behavior. However, it does not disclose any details about pagination, sorting, or the structure of the returned data.
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 description is a single, concise sentence that is front-loaded with the verb and resource. There is no unnecessary information, making it highly efficient.
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 tool with no parameters and no output schema, the description adequately explains the tool's purpose and scope. However, it does not describe the return format or fields, which might be useful for an agent to consume the results, but given the simplicity, this is a minor gap.
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 has zero parameters, so the baseline score is 4. The description correctly indicates that no parameters are needed by simply stating the operation.
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 uses the specific verb 'List' and identifies the resource as 'Discord servers (guilds)' with the scope 'you have access to'. This clearly distinguishes it from sibling tools like get_channels, which list channels.
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?
The description implies usage for retrieving accessible Discord servers but does not explicitly state when to use this tool versus alternatives like get_channels or read_messages. There is no 'when to use' or 'use this instead of' guidance, only the intrinsic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_messagesA
Read recent messages from a specific channel
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | ||
| channel_id | Yes | ||
| hours_back | No | ||
| max_messages | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of conveying safety. The word 'read' implies a non-destructive operation. However, it does not disclose details like time window behavior, ordering, or pagination limits, which are left to parameter names and defaults.
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 description is a single, front-loaded sentence with no wasted words. It succinctly conveys the core function without repetition or unnecessary detail, making it easy to parse.
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?
Given the lack of annotations and output schema, the description is too sparse. It omits any mention of return format, the meaning of 'recent' (hours_back), or the need to first retrieve server/channel IDs via sibling tools. This leaves important gaps for safe and correct invocation.
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%, and the description does not explain the parameters. 'Recent' hints at hours_back, but it does not clarify the meaning of server_id, channel_id, or max_messages, or how they interact. The agent must infer from parameter names alone.
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 clearly states the action ('read'), the resource ('recent messages'), and the scope ('from a specific channel'). It effectively distinguishes this from siblings like get_servers and get_channels (which list resources) and send_message (which writes).
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?
The description implies that this tool is used to read messages in a channel, but it does not explicitly state when to use it versus alternatives or mention prerequisites (e.g., needing server_id and channel_id from get_servers/get_channels). Usage context is present but not elaborated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_messageB
Send a message to a specific Discord channel. Long messages are automatically split.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| server_id | Yes | ||
| 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. It discloses one behavioral trait: long messages are automatically split. However, it omits other important behaviors such as permission requirements, error handling, or whether sending is permanent/destructive. This is partial transparency.
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 description is two sentences, with the main action front-loaded and the behavioral note appended. Every sentence earns its place with no redundancy or unnecessary detail.
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?
Given the tool has no annotations, no output schema, and 0% parameter coverage, the description is too minimal. It lacks guidance on usage, parameter semantics, and return behavior. The auto-split detail is useful but insufficient for reliable invocation.
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. It does not explain the server_id, channel_id, or content parameters beyond their names. The auto-split note implicitly relates to content but doesn't specify format or limits. The description adds no value over the schema's basic names/types.
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 uses the specific verb 'send' with the resource 'message to a specific Discord channel', clearly distinguishing it from sibling tools like get_servers, get_channels, and read_messages. It immediately conveys the tool's core action and target.
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?
No guidance is provided about when to use this tool versus alternatives. It does not mention read_messages for reading, nor does it explain any preconditions like needing server/channel IDs. The description simply states the action without usage context or exclusions.
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.
4 tool updates
v0.2.0- First observed
get_channels - First observed
get_servers - First observed
read_messages - First observed
send_message
TDQS
Scored across 4 tools
Each tool targets a distinct resource and action: servers list, channels list, messages read, messages send. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern (get_servers, get_channels, read_messages, send_message). The verbs are specific and the nouns clearly indicate the target resource.
Four tools is an ideal size for a focused Discord server. Each tool covers a necessary step in the interaction flow without redundancy or bloat.
The surface covers the core read/send workflow well: discover servers, discover channels, read messages, send messages. Missing edit/delete operations are a minor gap, but the primary use case is fully supported.
Maintenance
Related MCP Connectors
Give your agent live data from Twitter, Reddit, the web and GitHub. No API keys, no scraping stack.
Enable language models to perform advanced AI-powered web scraping with enterprise-grade reliabili…
Cloud scraping & crawling API for AI agents. Turn any URL into clean, LLM-ready markdown.
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables LLMs to interact with Discord channels by sending and reading messages through Discord's API, with a focus on maintaining user control and security.37227MIT
- AlicenseAqualityFmaintenanceEnables LLMs to read and send Discord messages, list servers and channels, and monitor unread messages via a selfbot that uses a user token (violates Discord ToS).8201MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to send and read messages in Discord channels, manage servers, channels, and roles via Discord's API.372MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to read and write Discord messages, search content, and compute channel statistics via a Discord bot.MIT