Skip to main content
Glama
jslay88

discord-mcp

by jslay88

discord-mcp

A local MCP (Model Context Protocol) server for Discord, written in TypeScript. It lets MCP clients like Cursor and Claude Code read and send Discord messages through a bot account.

Tools

Tool

Description

list_servers

List servers the bot is a member of

list_channels

List channels in a server (with IDs and types)

read_messages

Read recent messages from a channel, with paging via before

send_message

Send a message to a channel, optionally as a reply

send_dm

Send a direct message to a user by ID

add_reaction

React to a message with an emoji

search_members

Search server members by name prefix

get_server_info

Get server name, description, member count, owner

Related MCP server: Discord Bridge MCP Server

Setup

1. Create a Discord bot

  1. Go to the Discord Developer Portal and click New Application.

  2. Under Bot, click Reset Token and copy the token — this is your DISCORD_TOKEN.

  3. Still under Bot, enable the Privileged Gateway Intents you want:

    • Message Content Intent — required to read message text.

    • Server Members Intent — required for search_members.

    (The server still works without these, but message content will be empty and member search unavailable.)

  4. Invite the bot to your server: under OAuth2 → URL Generator, select the bot scope, then permissions View Channels, Send Messages, Read Message History, Add Reactions. Open the generated URL and pick your server.

2. Build

npm install
npm run build

3. Register with your MCP client

Cursor — add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/absolute/path/to/discord-mcp/dist/index.js"],
      "env": {
        "DISCORD_TOKEN": "your-bot-token"
      }
    }
  }
}

Claude Code:

claude mcp add discord -e DISCORD_TOKEN=your-bot-token -- node /absolute/path/to/discord-mcp/dist/index.js

Notes

  • The bot connects to Discord lazily on the first tool call, so the server starts even before a token is configured.

  • Messages are capped at Discord's 2000-character limit.

  • DISCORD_BOT_TOKEN is accepted as an alternative to DISCORD_TOKEN.

Why a bot token instead of email/password?

Automating a regular user account (a "self-bot") violates Discord's Terms of Service and commonly results in permanent account bans. Bot tokens are the supported way to build integrations and take about two minutes to set up.

Available Tools

8 tools
add_reactionAdd reactionA

Add an emoji reaction to a message. Use a unicode emoji (e.g. 👍) or custom emoji in <:name:id> format.

ParametersJSON Schema
NameRequiredDescriptionDefault
emojiYesThe emoji to react with
channelIdYesThe channel ID containing the message
messageIdYesThe message ID to react to

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It adds useful behavioral context about accepted emoji formats (unicode or custom <:name:id>), which goes beyond the schema, but it does not disclose side effects, idempotency, permission requirements, or error behavior. It provides some value but not rich behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, each earning its place: the first states the purpose, the second clarifies the emoji parameter format. No redundancy, no fluff, and the purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description adequately covers what the tool does and the key parameter format, but with no annotations and no output schema, it omits important context such as return values, error cases, and whether repeated reactions are idempotent. For a simple tool, this is minimally viable but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description meaningfully adds to the schema's generic 'The emoji to react with' by specifying the accepted formats (unicode emoji or custom emoji in <:name:id> format), which helps the agent select a valid emoji value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Add an emoji reaction to a message.' This clearly distinguishes the tool from siblings like send_message and read_messages, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage context is implied by the specific purpose—use this when you want to react to an existing message—but there is no explicit guidance on when to use it versus alternatives, nor any exclusions mentioned. The description does not reference sibling tools like send_message or read_messages.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_server_infoGet server infoA

Get details about a Discord server: name, description, member count, owner.

ParametersJSON Schema
NameRequiredDescriptionDefault
serverIdYesThe Discord server (guild) ID

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It accurately implies a read-only operation ('Get details') and enumerates the returned fields, but it does not mention permissions, error behavior (e.g., if the server ID is invalid), or whether the output follows a specific format. This is adequate but leaves notable gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the key action ('Get details about a Discord server') and then lists the specific returned fields. There is no redundant or irrelevant content—every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with one fully described parameter, the description is quite complete: it specifies the action, target resource, and the returned attributes. It lacks details about output format or error handling, but the mentioned fields provide sufficient context for most AI agent usage, especially given the presence of sibling tools for broader operations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema describes the sole parameter serverId as 'The Discord server (guild) ID', which is already clear and provides 100% schema coverage. The description adds no additional parameter semantics, so the baseline score of 3 is appropriate—the schema carries the meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ('Get') and a clear resource ('details about a Discord server'), listing the exact attributes returned (name, description, member count, owner). This distinguishes it from sibling tools like list_servers (which lists all servers) and send_message (which sends messages), so the purpose is unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly sets the context: use this tool when you need details about a specific Discord server. However, it does not explicitly mention when not to use it or name alternatives such as list_servers for enumerating server IDs. This is a minor gap, so it's one point away from a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_channelsList channelsB

List channels in a Discord server, including their IDs and types.

ParametersJSON Schema
NameRequiredDescriptionDefault
serverIdYesThe Discord server (guild) ID

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden of behavioral disclosure. However, it only mentions the output (IDs and types) and does not state whether this is read-only, whether permissions are needed, or how errors or empty results are handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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. Every word earns its place, and there is no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list operation with one parameter and no output schema, the description is mostly complete. It states the output content (IDs and types), which is useful given no output schema. However, it omits any mention of limitations, such as whether all channel types are included or if the bot must be a server member.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides complete coverage (100%) for the single parameter serverId, including its description. The tool description adds no further semantic meaning beyond what the schema already states, so it meets the baseline without exceeding it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List channels') and the resource ('in a Discord server'), and adds that it returns IDs and types. This distinguishes it from sibling tools like list_servers and get_server_info, which operate on servers, not channels.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. It does not mention any filters, prerequisites, or cases where another tool would be more appropriate. The description only states what it does, not when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_serversList serversA

List Discord servers (guilds) the bot is a member of.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the tool performs a read-only enumeration of servers the bot belongs to, but it does not detail return format, pagination, or rate limits. The behavior is straightforward, yet more context would improve transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no unnecessary words. It efficiently adds the key scope 'the bot is a member of' beyond the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

As a zero-parameter list tool, the description is sufficient for basic understanding. However, without an output schema, the return value's structure is unspecified, which is a minor gap given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, which is evident from the empty schema. The description adds no parameter-specific details because none exist, and per the baseline for zero-parameter tools, this is acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the verb 'List' and the resource 'Discord servers (guilds)', with an explicit scope of 'the bot is a member of'. This distinguishes the tool from siblings like list_channels and get_server_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you need to enumerate guilds the bot belongs to, but it does not explicitly contrast with sibling tools or specify when not to use it. No exclusions or alternative references are provided, so the usage context is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_messagesRead messagesA

Read recent messages from a channel or DM. Optionally pass before (a message ID) to page further back in history.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of messages to fetch (1-100)
beforeNoOnly fetch messages before this message ID
channelIdYesThe channel ID to read from

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses read-only behavior and pagination via `before`, but omits details like ordering, error handling, or return format. This is adequate for a simple read tool but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the purpose and a single optional usage hint. No redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a moderate-complexity read operation with 3 parameters and no output schema, the description covers purpose, scope, and pagination while relying on the schema for parameter details. It does not mention return format but implies it via 'recent messages'. This is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds only minor value by framing `before` as a paging mechanism, which is already implied by the schema's wording. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action ('Read'), the resource ('messages'), and the scope ('from a channel or DM'), while also noting the pagination option. This fully distinguishes it from siblings like send_message, add_reaction, and list_channels.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool (reading recent messages, paging back in history) but does not explicitly contrast it with alternatives or mention when not to use it. Sibling names provide some differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_membersSearch membersA

Search for members in a server by username or nickname prefix.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (1-100)
queryYesUsername or nickname prefix to search for
serverIdYesThe Discord server (guild) ID

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It reveals that search is by prefix (not exact match) and within a server, which is useful. However, it does not mention case sensitivity, match limit behavior, ordering, or result format—gaps that could matter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the core purpose without fluff. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple search tool with fully described schema parameters, the description is nearly complete. It lacks output format details and pagination behavior, but these are not critical for a basic member search, especially given the simplicity of the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, as all parameters have descriptions. The description adds no meaning beyond the schema since it effectively restates the query parameter's schema description. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Search for members in a server by username or nickname prefix.' It specifies the resource (members), the action (search), and the scope (by prefix in a server), distinguishing it from all sibling tools which deal with servers, channels, and messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use this tool: when you need to find members by name prefix. It does not mention alternatives or exclusions, but the context is unambiguous given the sibling tools operate on different resources.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_dmSend direct messageA

Send a direct message to a user by their user ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
userIdYesThe Discord user ID to DM
contentYesMessage text (max 2000 characters)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic action, with no mention of side effects, permissions, failure modes, or what happens if the user cannot be messaged. For a mutating operation, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that immediately conveys the core functionality. No filler or redundant information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is sufficient for a simple two-parameter tool with full schema coverage, but it lacks contextual completeness around usage timing, error handling, or any operational nuances. It provides the minimum viable information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters include meaningful descriptions (userId, content with max length). The tool description adds 'by their user ID' which reinforces the purpose but does not add significant new meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Send a direct message') and the target ('a user by their user ID'). This uniquely identifies the tool's purpose and distinguishes it from sibling tools like 'send_message' which likely sends to a channel.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you need to DM a user based on their ID, but it does not provide explicit guidance on when to choose this over alternatives like 'send_message'. No exclusions or alternative recommendations are offered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

send_messageSend messageA

Send a message to a channel. Optionally reply to an existing message by passing replyToMessageId.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesMessage text (max 2000 characters)
channelIdYesThe channel ID to send to
replyToMessageIdNoMessage ID to reply to

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full responsibility for disclosing behavioral traits. It only states the basic send action and the reply option, but does not mention potential side effects (e.g., message visibility, permissions, rate limits) or failure behavior. For a mutation tool, this lacks important contextual information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, two sentences with no filler. It front-loads the primary action and includes the only optional behavior in a clear, efficient manner. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple send-message tool with 3 fully described parameters and no output schema, the description adequately covers the core functionality and the optional reply. It lacks information about permissions or return values, but given the simplicity and schema coverage, it is complete enough for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage of parameters with clear descriptions, so the baseline is 3. The description adds a small clarification about replyToMessageId ('Optionally reply to an existing message'), but this is mostly redundant with the schema's 'Message ID to reply to'. No significant additional semantic value is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Send a message to a channel', which specifies the verb, resource, and recipient. It also mentions the optional reply functionality, distinguishing it from sibling tools like send_dm. This is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for channel messages by saying 'to a channel', but does not explicitly contrast with send_dm or mention when not to use it. The optional reply behavior is noted, but there are no explicit alternatives or exclusions, leaving the usage context 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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv0.1.0
    • First observedadd_reaction
    • First observedget_server_info
    • First observedlist_channels
    • First observedlist_servers
    • First observedread_messages
    • First observedsearch_members
    • First observedsend_dm
    • First observedsend_message

TDQS

A3.8/5.0
Disambiguation4/5

Most tools are clearly distinct (list_servers vs list_channels vs get_server_info). The only potential confusion is between send_message (to a channel) and send_dm (to a user), but the descriptions make the distinction clear.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (list_servers, send_message, add_reaction). No mixed conventions or vague verbs, making the API predictable.

Tool Count5/5

8 tools is well-scoped for a Discord server bot, covering essential operations without being too sparse or bloated. Each tool earns its place.

Completeness3/5

Core workflows like reading/sending messages and listing servers/channels are covered, but there are notable gaps such as editing/deleting messages, managing channels, or retrieving specific members. This creates dead ends for some common use cases.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

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/jslay88/discord-mcp'

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