Skip to main content
Glama
JoelBChapmanII

Discord MCP

Discord MCP

Local, read-only Discord MCP server. It uses stdio and direct Discord REST API calls—there is no HTTP listener, Kubernetes deployment, Gateway connection, event cache, or write tool.

Safety boundaries

  • DISCORD_ALLOWED_GUILDS is required; the server fails to start without it.

  • DISCORD_ALLOWED_CHANNELS is optional but recommended. When set, all channel and message reads outside it are rejected.

  • Message tools always return message bodies. Enable Message Content Intent for the bot in Discord Developer Portal; without it, Discord returns empty content fields.

  • The bot needs only View Channel and Read Message History for the initial tools. Do not grant Administrator, management, moderation, webhook, invite, or voice permissions.

  • The bot token stays in your local MCP configuration or a local .env file; .env is ignored by Git.

Related MCP server: telegram-mcp

Tools

  • discord_list_guilds

  • discord_list_channels

  • discord_get_channel

  • discord_list_messages

  • discord_get_message

All tools are read-only. Message reads support a bounded limit (1–100) and a before or after cursor. The service never downloads attachments and never returns attachment URLs.

Setup

npm install

Copy .env.example to an ignored local .env file if you want a convenience template, then export it deliberately before running the development command:

set -a
. ./.env
set +a
npm run dev

Populate DISCORD_BOT_TOKEN and the numeric guild ID in that local file. Use Discord's Developer Mode to copy IDs. Add channel IDs to DISCORD_ALLOWED_CHANNELS before enabling the server for a shared guild.

Build and verify without contacting Discord:

npm run check
npm run build

Codex configuration

Export the configuration variables in the same local environment that launches the Codex CLI. Do not put the token in this repository or config.toml.

Add this local MCP entry to ~/.codex/config.toml, replacing the path with your clone path:

[mcp_servers.discord]
command = "node"
args = ["/absolute/path/to/discord-mcp/dist/index.js"]
cwd = "/absolute/path/to/discord-mcp"
env_vars = [
  "DISCORD_BOT_TOKEN",
  "DISCORD_ALLOWED_GUILDS",
  "DISCORD_ALLOWED_CHANNELS",
]

For example, in the shell you use to start Codex:

export DISCORD_BOT_TOKEN='...'
export DISCORD_ALLOWED_GUILDS='your-guild-id'
export DISCORD_ALLOWED_CHANNELS='your-test-channel-id'
codex

Build first, then restart Codex from that environment. If you use the ChatGPT desktop app rather than Codex CLI, configure the environment at the app-launch level or use the app's MCP-server form; a variable exported in an unrelated Terminal window will not be inherited by the already-running app.

Development

npm run dev
npm test
npm run typecheck

npm run dev reads environment variables from the current shell. It deliberately does not load .env automatically so the token cannot be accidentally supplied through an unexpected execution path.

Available Tools

5 tools
discord_get_channelGet Discord channel metadataA
Read-onlyIdempotent

Gets metadata for one allowlisted guild channel. This does not fetch messages.

ParametersJSON Schema
NameRequiredDescriptionDefault
channelIdYes

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds behavioral context by stating it doesn't fetch messages and that channels are 'allowlisted,' implying access restrictions not covered by annotations.

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 short sentences that are front-loaded with the verb and resource, followed by an exclusion. No filler or repetition.

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?

Given the tool's simplicity (one parameter, no output schema) and strong annotations, the description covers the necessary scope: what it returns and what it excludes. It could add examples or clarify 'allowlisted' but is sufficient for basic use.

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 single parameter channelId is self-explanatory from its name, and the description adds minimal constraint by clarifying the channel is 'one allowlisted guild channel.' With no schema description, the description slightly compensates, but doesn't explain ID format or retrieval behavior.

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 uses the specific verb 'Gets' plus resource 'Discord channel metadata', and explicitly distinguishes from message-fetching tools by stating 'This does not fetch messages.' This clearly places it among sibling tools.

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 implies usage for retrieving channel metadata when you need non-message channel info, and the exclusion of messages helps differentiate from discord_get_message. However, it doesn't explicitly name an alternative tool or state when to prefer it over other siblings.

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

discord_get_messageGet one Discord messageA
Read-onlyIdempotent

Gets one message from an allowlisted guild channel. The Discord application must have Message Content Intent enabled.

ParametersJSON Schema
NameRequiredDescriptionDefault
channelIdYes
messageIdYes

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive hints. The description adds meaningful constraints (allowlisted channel and intent requirement) but does not describe return behavior, errors, or other edge cases. It adds some value but not rich 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 short sentences, front-loaded with the core action and no unnecessary words. Every sentence contributes useful information.

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 get-by-ID tool with strong annotations, the description covers purpose, prerequisites, and access constraints. Lack of explicit return shape is a minor gap, especially since no output schema is present.

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 has no descriptions and the description does not explicitly document parameters. However, the parameter names 'channelId' and 'messageId' are self-explanatory and the description implies their roles. This is minimal but not absent.

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 uses a specific verb-resource pair, 'Gets one message', and clearly scopes it to an 'allowlisted guild channel.' This distinguishes it from siblings like discord_list_messages (list vs single fetch) and discord_get_channel (message vs channel).

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?

It gives clear context for when the tool works: only for allowlisted guild channels and with Message Content Intent enabled. It does not explicitly state alternatives or when not to use it, but the prerequisites are enough to guide selection among siblings.

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

discord_list_channelsList Discord channelsA
Read-onlyIdempotent

Lists channels in one allowlisted Discord guild. Optional channel allowlisting is applied.

ParametersJSON Schema
NameRequiredDescriptionDefault
guildIdYes

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, covering the safety profile. The description adds meaningful behavioral context beyond annotations by noting that the guild must be allowlisted and that optional channel allowlisting may filter results. This is valuable and not contradictory.

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 action 'Lists channels'. It contains no redundant phrasing or unnecessary detail, earning its place efficiently.

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 parameter, strong annotations, and no output schema, the description provides sufficient context. It states the guild scope and allowlisting behavior, though it could be slightly clearer about what 'allowlisting' entails or potential error cases, but this is not a significant gap.

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

Parameters2/5

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 for parameter meaning. While it mentions 'one allowlisted Discord guild', it does not explicitly describe the 'guildId' parameter or its format, leaving the connection implied. The single parameter name is self-explanatory, but the description adds no direct semantic clarification.

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 lists channels in a specific Discord guild, using a specific verb (lists) and resource (channels). It distinguishes itself from siblings like discord_list_guilds (lists guilds) and discord_get_channel (gets one channel) by specifying the scope of one allowlisted guild.

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 description: it is for listing channels within a particular guild. However, it does not explicitly mention when to use this tool over alternatives or provide exclusion criteria, such as 'use discord_get_channel for a single channel'.

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

discord_list_guildsList allowed Discord guildsA
Read-onlyIdempotent

Lists only the Discord guilds explicitly allowed by local configuration.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare the operation as read-only, idempotent, and non-destructive. The description adds the important behavioral constraint that only guilds allowed by local configuration are returned, which is not conveyed by annotations. No contradiction detected.

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 starts with the verb and clearly specifies the resource and constraint. No unnecessary words or repetition.

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

Completeness5/5

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

Given the tool's simplicity (no parameters, no output schema), the description adequately explains its purpose and filtering behavior. It provides enough information for an agent to select and invoke this tool correctly.

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 no parameters, so the schema fully covers the input (100% coverage). The description adds context about the filtering behavior but there are no parameter details to elaborate. Baseline for zero parameters is 4.

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: listing Discord guilds that are explicitly allowed by local configuration. The verb 'Lists' is specific and the resource is well-defined, distinguishing it from sibling tools that operate on 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 implies when to use this tool: when you need the locally allowed Discord guilds, not all guilds. It does not explicitly name alternatives or state when not to use it, but the context is reasonably clear given the sibling tools.

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

discord_list_messagesList Discord messagesA
Read-onlyIdempotent

Reads a bounded page of messages from one allowlisted guild channel. The Discord application must have Message Content Intent enabled.

ParametersJSON Schema
NameRequiredDescriptionDefault
afterNo
limitNo
beforeNo
channelIdYes

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, openWorld, non-destructive), the description adds meaningful constraints: 'bounded page' (pagination limit), 'allowlisted guild channel' (access restriction), and the requirement of Message Content Intent (prerequisite). These are useful operational details not captured by annotations.

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 concise sentences: the first clearly states the core function and scope, the second adds a crucial prerequisite. No redundant information, perfectly 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 covers the primary purpose and a key restriction, but since there is no output schema, it does not explain the return format or pagination behavior (e.g., how to request the next page). Given the tool's four parameters and complexity, this is a noticeable gap, though the description is adequate for basic usage.

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

Parameters2/5

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

The schema has zero description coverage, and the description does not explain the `after` and `before` parameters or their relationship. It only mentions 'bounded page,' which hints at `limit` but leaves `after`/`before` semantics ambiguous. Relies heavily on parameter names, which may not be self-explanatory for pagination.

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 reads a bounded page of messages from a specific channel, using the specific verb 'reads' and resource 'messages.' It also distinguishes from siblings by mentioning 'messages' rather than guilds/channels and 'bounded page' implying a list operation.

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?

Provides clear context: it targets one allowlisted guild channel and requires Message Content Intent. This indicates when to use it (for reading messages from a specific channel) and implies the need for allowlisting, but does not explicitly name alternative tools for single-message retrieval.

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. 5 tool updatesv0.1.0
    • First observeddiscord_get_channel
    • First observeddiscord_get_message
    • First observeddiscord_list_channels
    • First observeddiscord_list_guilds
    • First observeddiscord_list_messages

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: listing guilds, listing channels, getting channel metadata, listing messages, and getting a single message. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow the consistent pattern of 'discord_' + verb + '_' + noun, using lowercase snake_case throughout (list_guilds, get_channel, list_messages). This makes the set predictable and easy to navigate.

Tool Count5/5

With 5 tools, the server is well-scoped and focused on read-only Discord operations. Each tool covers a distinct aspect of the domain without excess or omissions that would make the set feel thin.

Completeness3/5

The tool set provides solid read coverage (guilds, channels, messages), but lacks any write operations like sending messages or creating/deleting channels. This is a notable gap for a general-purpose Discord MCP, though it may be intentional for a read-only use case.

Maintenance

ActivitySlowing
ResponsivenessNo issues

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

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for interacting with Discord via REST API, enabling guild, channel, and message operations using a bot token.
    7
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Read-only MCP server for self-hosted Telegram access via Telethon. Enables reading messages, chats, and media but disallows any write operations.
    10
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for Discord that lists guilds, channels, and reads or searches messages using a self-bot account via discord.py-self.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A local MCP server that reads Discord servers and channels and optionally sends messages with explicit allowlists, read-only by default.
    49
    MIT

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

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